Skip to content
chernikov27Public

About

Inspect OpenAPI and MCP services for agent readiness and x402 metadata.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

AgentSpec

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.

Run Locally

npm run dev

The API listens on:

http://localhost:4020

No external dependencies are required for the current MVP.

Recommended workflow:

  1. Open Terminal 1 and start the server.
  2. Leave Terminal 1 open.
  3. Open Terminal 2 and run checks with curl or the smoke test.

In a second terminal, run the smoke test:

npm run smoke

Test

npm test

Using portable Node directly:

"/Users/sergejcernikov/Desktop/тест клод/.codex-runtime/node-v24.15.0-darwin-arm64/bin/node" --test

Example Calls

Inspect OpenAPI:

curl -s http://localhost:4020/inspect/openapi \
  -H 'content-type: application/json' \
  --data @examples/openapi-weather.json

Inspect MCP tools:

curl -s http://localhost:4020/inspect/mcp \
  -H 'content-type: application/json' \
  --data @examples/mcp-tools.json

Generate 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."}}'

Local 402 Simulation

Run:

npm run dev:402

Then paid endpoints return 402 unless you pass:

x-agentspec-dev-payment: paid

This is only a local development simulation. Production settlement should use the official x402 middleware and facilitator.

Troubleshooting

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 dev

Then test that port:

AGENTSPEC_BASE_URL=http://127.0.0.1:4021 npm run smoke

Project Docs

  • docs/service-plan.md
  • docs/x402-integration.md
  • Brand/brand-brief.md

About

Inspect OpenAPI and MCP services for agent readiness and x402 metadata.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages