Skip to main content
PA

PayPal

v0.1.1OAuth2

Gigante global de pagos + payouts. Dueño de Braintree (paquete separado). Orders v2 + Payments + Payouts + Subscriptions + Disputes + Webhooks. OAuth2 client_credentials. Toggle sandbox/live.

19 herramientas3 env vars🌐 GLOBALestable en npm

Qué puede hacer tu agente

PayPal le da a tu agente 19 tools que llama directo — elegí las que necesite, en Claude, Cursor o cualquier 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.
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("create_order", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-paypal

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

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

Variables de entorno · 3

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

PAYPAL_CLIENT_ID
obligatorio

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

PAYPAL_CLIENT_SECRET
obligatoriosecret

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).

Herramientas disponibles · 19

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

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