Skip to main content
AP

AP2

v0.2.0-alpha.2OAuth2alpha

Agent-to-Agent Payment Protocol do Google. Autorização, auditoria e estabelecimento de confiança entre agentes de pagamento autônomos.

22 ferramentas1 env vars🌐 GLOBALalpha — validação pendente

O que seu agente faz

O AP2 dá ao seu agente 22 tools que ele chama direto — escolha as que precisar, no Claude, Cursor ou qualquer 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
Exemplo de chamada
// 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

Adicione esta entrada ao seu claude_desktop_config.json (ou a config de qualquer cliente compatível com MCP).

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

Depois de reiniciar, seu agente pode chamar qualquer uma das 22 ferramentas abaixo — teste register_agent primeiro.

Variáveis de ambiente · 1

Necessárias pra autenticar o server. Armazenadas criptografadas ao usar a hospedagem gerenciada da CodeSpar.

AP2_API_KEY
obrigatóriosecret

API key for ap2

Ferramentas disponíveis · 22

Cada ferramenta é independente — seu agente carrega só o que precisa pra reduzir contexto e tempo de resposta.

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 compatíveis

MCP é um protocolo — qualquer framework que o fale pode montar este server.

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

Perguntas frequentes

Rode `npx -y @codespar/mcp-ap2` e adicione o bloco de config acima ao seu cliente MCP — Claude, Cursor, VS Code ou qualquer cliente compatível com MCP. Sem build, sem SDK. Prefere hospedado? O tier gerenciado da CodeSpar roda pra você, com a auth resolvida.
AP2 — MCP server · 22 tools | CodeSpar