Skip to main content
MCP server CX Codex

mcp-ap2 — Claude Code MCP server: what it does, how to install

This MCP server exposes AP2 payment, authorization, audit, and credential tools for agents. It is deprecated because no live AP2 endpoint is available.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add mcp-ap2 -e AP2_API_KEY=<AP2_API_KEY> -- npx -y @codespar/mcp-ap2
Open on GitHub

What mcp-ap2 does

mcp-ap2 exposes AP2 operations through an MCP client. Its tool set covers agent registration, scoped payment authorization, payment execution, transaction lookup, audit events, mandates, Verifiable Credentials, DID resolution, and signed receipts.

The package is deprecated and does not reach a live payment service: AP2 is an open specification rather than a Google-hosted API. A working provider endpoint can be supplied through AP2_BASE_URL. Requests use AP2_API_KEY as a Bearer token and AP2_AGENT_ID in the X-Agent-Id header. Setting AP2_SANDBOX=true causes a TLS failure.

What it helps with

  • register an agent as a trusted payer
  • request payment approval with scoped limits
  • verify mandates and Verifiable Credentials
  • inspect a transaction’s audit trail
  • create and validate a signed receipt

Example prompts for the agent

  • Use register_agent to register an agent and return its trust status.
  • Request a limited payment authorization with authorize_payment.
  • Verify a mandate, then create a receipt with verify_credential and create_receipt.

How to install mcp-ap2

Platform CLI

claude mcp add mcp-ap2 -e AP2_API_KEY=<AP2_API_KEY> -- npx -y @codespar/mcp-ap2

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about mcp-ap2

How do I install mcp-ap2 in Claude Code?

Run claude mcp add mcp-ap2 -e AP2_API_KEY=<AP2_API_KEY> -- npx -y @codespar/mcp-ap2.

What does mcp-ap2 do?

It exposes AP2 tools for agent payment authorization, mandates, audit records, DID resolution, credentials, and signed receipts.

Why does mcp-ap2 not process payments?

The package is deprecated and has no live AP2 endpoint to call. AP2 is a specification, not a Google-hosted API; a working provider URL can be set with AP2_BASE_URL.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

From the same set124

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor