Pay-per-call CVE intelligence MCP server, x402 native — autonomous experiment
Go to file
Kaouani Jaouad ca764b6766 Add MCP Streamable HTTP transport (JSON-RPC 2.0 at /mcp/rpc)
Implements the real MCP transport per spec 2025-03-26 so Smithery/mcp.so/
glama auto-scanners actually recognize Aegis402 as an MCP server.

- src/mcp_rpc.py: stateless JSON-RPC handler with initialize, ping,
  tools/list, tools/call, notifications, batches, Origin validation
- /mcp/rpc routes wired in src/server.py (POST + 405 GET)
- tools/call enforces x402 via the same middleware as /scan; payment
  required is returned as JSON-RPC error -32001 with the full x402
  challenge in the data field
- mcp_manifest + server-card + sitemap + landing all point to /mcp/rpc
- 9/9 in-process tests pass; prod smoke tests confirm initialize,
  tools/list, paid tools/call, and 405 GET all behave per spec
2026-04-13 13:18:31 +02:00
data Initial public release — Aegis402 v0.1.0 2026-04-13 11:47:05 +02:00
decisions Initial public release — Aegis402 v0.1.0 2026-04-13 11:47:05 +02:00
deploy Phase 4 distribution audit: server-card.json + auth-wall findings 2026-04-13 11:57:32 +02:00
plan Initial public release — Aegis402 v0.1.0 2026-04-13 11:47:05 +02:00
recherche Initial public release — Aegis402 v0.1.0 2026-04-13 11:47:05 +02:00
src Add MCP Streamable HTTP transport (JSON-RPC 2.0 at /mcp/rpc) 2026-04-13 13:18:31 +02:00
tests Initial public release — Aegis402 v0.1.0 2026-04-13 11:47:05 +02:00
.gitignore Phase 4 distribution audit: server-card.json + auth-wall findings 2026-04-13 11:57:32 +02:00
JAOUAD_TODO.md Phase 4 distribution audit: server-card.json + auth-wall findings 2026-04-13 11:57:32 +02:00
JOURNAL.md Add MCP Streamable HTTP transport (JSON-RPC 2.0 at /mcp/rpc) 2026-04-13 13:18:31 +02:00
README.md Initial public release — Aegis402 v0.1.0 2026-04-13 11:47:05 +02:00
STATE.md Phase 4 distribution audit: server-card.json + auth-wall findings 2026-04-13 11:57:32 +02:00
requirements.txt Initial public release — Aegis402 v0.1.0 2026-04-13 11:47:05 +02:00

README.md

IA Business Autonome — Aegis402

Projet exploratoire : monter un business 100% opérable par un agent IA seul, sans humain dans la boucle, avec 2000€ de capital initial.

Statut

Phase : Build local complet, productionisation gratuite finalisée, en attente d'engagement capital pour deploy Décision produit : Aegis402 — MCP server CVE intelligence, x402-natif Date : 2026-04-13

Quickstart local

./venv/bin/python -m src.ingest_ghsa     # mirror GHSA (1000 advisories)
./venv/bin/python -m src.ingest_kev      # mirror CISA KEV (1559 entries)
./venv/bin/uvicorn src.server:app --host 127.0.0.1 --port 8743
curl -X POST http://127.0.0.1:8743/scan \
  -H 'content-type: application/json' \
  -d '{"deps":[{"ecosystem":"pip","package":"rembg","version":"2.0.74"}]}'

Endpoints

  • GET / — liveness
  • GET /health — DB count, ingest freshness
  • POST /scan — scan up to 200 deps, returns CVE/KEV hits
  • GET /mcp — MCP manifest for marketplace discovery
  • GET /payment — current x402 paywall config

Files

  • src/server.py — FastAPI app
  • src/scan.py — version range matcher + scan_dependency
  • src/ingest_ghsa.py — GHSA mirror with cursor pagination
  • src/ingest_kev.py — CISA KEV mirror
  • src/wallet.py — encrypted Base wallet (AES-256-GCM)
  • src/x402_middleware.py — x402 paywall + facilitator client
  • src/mcp_manifest.py — MCP manifest builder
  • deploy/cloud-init.yaml — VPS bootstrap
  • deploy/aegis402-ingest.{service,timer} — systemd cron unit
  • deploy/marketplace_copy.md — pre-written listings + HN post

Documents

  • decisions/DECISION_001_produit.md — pourquoi ce produit, critères d'échec
  • plan/ARCHITECTURE.md — carte technique du système
  • plan/PLAN_90_JOURS.md — exécution jour par jour
  • recherche/01_findings_infra.md — état infra crypto/paiement 2026
  • recherche/02_findings_marche.md — état marché agent économie 2026

Logique en une phrase

Une IA seule en 2026 ne peut pas être un sujet légal, donc elle doit être un sujet économique sur le sous-web crypto-natif (x402 + MCP), en vendant à d'autres agents ce que les humains sont trop ennuyés ou trop chers pour faire eux-mêmes : du data feed structuré, frais, et contextualisé.

Pourquoi CVE intelligence en particulier

  1. Gap explicite documenté par x402.org/ecosystem
  2. Données 100% publiques sans anti-bot (NVD, KEV, GH Advisories)
  3. Marché en feu (45M$+ de pertes 2026 sur AI agent vulns)
  4. Distribution agent-native via marketplaces MCP existantes
  5. Coût marginal quasi-nul, marge >90%