Skip to main content
AP

AP2

v0.2.0-alpha.2OAuth2alpha

Agent-to-Agent Payment Protocol de Google. Autorización, auditoría y establecimiento de confianza entre agentes de pago autónomos.

22 herramientas1 env vars🌐 GLOBALalpha — validación pendiente

Qué puede hacer tu agente

AP2 le da a tu agente 22 tools que llama directo — elegí las que necesite, en Claude, Cursor o cualquier cliente MCP.

  • register_agentRegister an AI agent as a trusted payer in the AP2 network. Defines the agent's identity, capabilities, and spending limits.
  • get_agentGet agent registration details, trust status, and current spend usage
  • list_agentsList registered agents with optional filters
Ejemplo de llamada
// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("register_agent", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-ap2@alpha

Quickstart

Agregá esta entrada a tu claude_desktop_config.json (o a la config de cualquier cliente compatible con MCP).

claude_desktop_config.json
{
  "mcpServers": {
    "ap2": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-ap2@alpha"
      ],
      "env": {
        "AP2_API_KEY": "<your_ap2_api_key>"
      }
    }
  }
}

Después de reiniciar, tu agente puede llamar cualquiera de las 22 herramientas de abajo — probá register_agent primero.

Variables de entorno · 1

Necesarias para autenticar el server. Almacenadas cifradas al usar el hosting gestionado de CodeSpar.

AP2_API_KEY
obligatoriosecret

API key for ap2

Herramientas disponibles · 22

Cada herramienta es independiente — tu agente carga solo lo que necesita para reducir contexto y tiempo de respuesta.

WRITEregister_agent
Register an AI agent as a trusted payer in the AP2 network. Defines the agent's identity, capabilities, and spending limits.
READget_agent
Get agent registration details, trust status, and current spend usage
READlist_agents
List registered agents with optional filters
DELETErevoke_agent
Revoke an agent's payment authorization. The agent will no longer be able to make or receive payments.
WRITEauthorize_payment
Request payment authorization with scoped limits. Returns an authorization token that can be used to execute the payment.
READget_authorization
Get authorization details including status, limits, and expiry
READlist_authorizations
List payment authorizations with optional filters
WRITEexecute_payment
Execute an authorized payment. Requires a valid authorization token.

Frameworks compatibles

MCP es un protocolo — cualquier framework que lo hable puede montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Cualquier cliente MCPProtocolo

Preguntas frecuentes

Corré `npx -y @codespar/mcp-ap2` y agregá el bloque de config de arriba a tu cliente MCP — Claude, Cursor, VS Code o cualquier cliente compatible con MCP. Sin build, sin SDK. ¿Preferís hosted? El tier gestionado de CodeSpar lo corre por vos, con la auth resuelta.
AP2 — MCP server · 22 tools | CodeSpar