Turn any API into an agent-ready x402 service.
AgentSpec inspects OpenAPI specs, MCP tools, and API docs, then generates readiness scores, risk notes, recommendations, and x402 Bazaar metadata drafts.
npm run devThe API listens on:
http://localhost:4020
No external dependencies are required for the current MVP.
Recommended workflow:
- Open Terminal 1 and start the server.
- Leave Terminal 1 open.
- Open Terminal 2 and run checks with
curlor the smoke test.
In a second terminal, run the smoke test:
npm run smokenpm testUsing portable Node directly:
"/Users/sergejcernikov/Desktop/тест клод/.codex-runtime/node-v24.15.0-darwin-arm64/bin/node" --testInspect OpenAPI:
curl -s http://localhost:4020/inspect/openapi \
-H 'content-type: application/json' \
--data @examples/openapi-weather.jsonInspect MCP tools:
curl -s http://localhost:4020/inspect/mcp \
-H 'content-type: application/json' \
--data @examples/mcp-tools.jsonGenerate Bazaar metadata from an existing report:
curl -s http://localhost:4020/generate/bazaar-metadata \
-H 'content-type: application/json' \
--data '{"service":{"name":"Weather Utility","path":"/forecast","method":"GET","description":"Read-only forecast lookup for agents."}}'Run:
npm run dev:402Then paid endpoints return 402 unless you pass:
x-agentspec-dev-payment: paidThis is only a local development simulation. Production settlement should use the official x402 middleware and facilitator.
If server startup says:
address already in use 127.0.0.1:4020
another AgentSpec server is already running. Use that server, stop the old server with Ctrl+C, or start a new one on another port:
PORT=4021 npm run devThen test that port:
AGENTSPEC_BASE_URL=http://127.0.0.1:4021 npm run smokedocs/service-plan.mddocs/x402-integration.mdBrand/brand-brief.md