Connect Claude
Claude chooses the order. The agent gateway signs the request, and the merchant checks the human's grant before accepting it.
Stateless Streamable HTTP · No stdioClaude Code on this computer
The demo already serves the agent gateway at:
/agent/mcp
Run this in your Claude Code project directory:
claude mcp add --transport http --scope local kya-shopping-agent http://localhost:4949/agent/mcp
- Open Claude Code and run
/mcp. Confirm kya-shopping-agent is connected. - Ask: Use place_order to order 2 risotto. Do not pay. If consent is needed, show me the authorization URL and wait.
- Open the consent link, approve the grant, then ask Claude to retry.
Available tools: browse_catalog and place_order. Keep npm run demo running.
Claude Desktop or web chat
Custom connectors run from Anthropic's cloud. This computer's localhost address is not reachable there.
Once an authenticated HTTPS deployment is ready, add its /agent/mcp URL under Customize → Connectors → Add custom connector. The current endpoint is for local HTTP clients; a public deployment is a separate step.
Two endpoints, one verified order
/agent/mcp is Claude's connection. The gateway holds the demo agent's key and presents a fresh proof on every merchant request.
/mcp is the merchant's protected endpoint. It uses @kya-os/mcp to verify the delegation and holder proof, check revocation and sign its response. Both endpoints use the MCP SDK's Streamable HTTP transport.
Stateless describes the transport: no MCP session ID is required. Keys, approved grants, replay protection and revocation records still have state. This is a single-presenter demonstration.
Opening an MCP endpoint in a browser sends GET. These endpoints accept POST and return HTTP 405 for GET; use an MCP client to connect.