Skip to main content
PA

PayPal

v0.1.1OAuth2

Gigante global de pagamentos + payouts. Dono do Braintree (pacote separado). Orders v2 + Payments + Payouts + Subscriptions + Disputes + Webhooks. OAuth2 client_credentials. Toggle sandbox/live.

19 ferramentas3 env vars🌐 GLOBALestável no npm

O que seu agente faz

O PayPal dá ao seu agente 19 tools que ele chama direto — escolha as que precisar, no Claude, Cursor ou qualquer cliente MCP.

  • create_orderCreate a PayPal Order via POST /v2/checkout/orders. Pass intent ('CAPTURE' or 'AUTHORIZE') and purchase_units (each with an amount object). Returns the order with id, status, and HATEOAS links (including the approve URL for the buyer).
  • get_orderFetch a PayPal Order by id via GET /v2/checkout/orders/{id}. Returns the full order including status, purchase_units, and payments collection.
  • capture_orderCapture payment for an approved order via POST /v2/checkout/orders/{id}/capture. Use after the buyer approves an order with intent=CAPTURE. Returns the captured payment details.
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("create_order", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-paypal

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": {
    "paypal": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-paypal"
      ],
      "env": {
        "PAYPAL_CLIENT_ID": "<your_paypal_client_id>",
        "PAYPAL_CLIENT_SECRET": "<your_paypal_client_secret>"
      }
    }
  }
}

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

Variáveis de ambiente · 3

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

PAYPAL_CLIENT_ID
obrigatório

PayPal REST app client id (from developer.paypal.com Apps & Credentials).

PAYPAL_CLIENT_SECRET
obrigatóriosecret

PayPal REST app client secret (OAuth2 client_credentials password).

PAYPAL_ENV
opcional

PayPal environment. 'sandbox' (default, https://api-m.sandbox.paypal.com) or 'live' (https://api-m.paypal.com).

Ferramentas disponíveis · 19

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

WRITEcreate_order
Create a PayPal Order via POST /v2/checkout/orders. Pass intent ('CAPTURE' or 'AUTHORIZE') and purchase_units (each with an amount object). Returns the order with id, status, and HATEOAS links (including the approve URL for the buyer).
READget_order
Fetch a PayPal Order by id via GET /v2/checkout/orders/{id}. Returns the full order including status, purchase_units, and payments collection.
WRITEcapture_order
Capture payment for an approved order via POST /v2/checkout/orders/{id}/capture. Use after the buyer approves an order with intent=CAPTURE. Returns the captured payment details.
WRITEauthorize_order
Authorize payment for an approved order via POST /v2/checkout/orders/{id}/authorize. Use after the buyer approves an order with intent=AUTHORIZE. Returns the created authorization (capture later with capture_authorization).
WRITEcapture_authorization
Capture a previously authorized payment via POST /v2/payments/authorizations/{id}/capture. Pass an amount object for partial captures, or omit to capture the full authorized amount. Set final_capture=true on the last partial capture.
DELETErefund_capture
Refund a captured payment via POST /v2/payments/captures/{id}/refund. Pass an amount object for partial refunds, or omit for a full refund. Idempotent via PayPal-Request-Id.
DELETEvoid_authorization
Void (release) an unsettled authorization via POST /v2/payments/authorizations/{id}/void. Use when funds were authorized but will not be captured. Returns 204 No Content on success.
WRITEget_payment_details
Fetch a payment object by id via GET /v2/payments/{type}/{id}. type is one of 'authorizations', 'captures', or 'refunds'. Returns the full payment object with status and links.

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-paypal` 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.
PayPal — MCP server · 19 tools | CodeSpar