@imazhar101/paypal-mcp

@imazhar101/paypal-mcp

A lightweight MCP server that connects to the PayPal REST API, handling token lifecycle automatically and providing read-only tools for transactions, invoices, orders, disputes, and subscriptions by default.

Category
Visit Server

README

@imazhar101/paypal-mcp

A lite Model Context Protocol server for PayPal.

Unlike PayPal's official @paypal/mcp (which pulls in the entire LangChain / Vercel-AI agent-toolkit and expects a pre-minted, short-lived access token), this server is intentionally small:

  • No heavy dependencies — just @modelcontextprotocol/sdk + zod. Calls the PayPal REST API directly with fetch.
  • Owns its token lifecycle — you give it a durable client id + secret; it mints, caches, and refreshes the client_credentials access token itself. Proactive refresh (expiry skew) + reactive refresh (re-mint + retry once on a 401). A long-lived host (e.g. an MCP gateway) can spawn one child per merchant with only the static client-id/secret in its env and never babysit token expiry.
  • Read-only by default — this server handles money. Write/refund/payout tools are not registered unless you opt in with PAYPAL_READONLY=0.

Install

npm install -g @imazhar101/paypal-mcp

Configure

Env var Required Default Notes
PAYPAL_CLIENT_ID yes — PayPal REST app client id
PAYPAL_CLIENT_SECRET yes — PayPal REST app secret
PAYPAL_ENVIRONMENT no SANDBOX SANDBOX or PRODUCTION
PAYPAL_READONLY no 1 1/true = read tools only; 0 = also write tools

Create a REST app and obtain credentials at the PayPal Developer Dashboard. The app must have the relevant features enabled (Invoicing, Transaction Search, etc.) or those tools will return 403 NOT_AUTHORIZED.

Run (stdio)

PAYPAL_CLIENT_ID=... PAYPAL_CLIENT_SECRET=... PAYPAL_ENVIRONMENT=SANDBOX paypal-mcp

Claude Code / MCP client config

{
  "mcpServers": {
    "paypal": {
      "command": "npx",
      "args": ["-y", "@imazhar101/paypal-mcp"],
      "env": {
        "PAYPAL_CLIENT_ID": "...",
        "PAYPAL_CLIENT_SECRET": "...",
        "PAYPAL_ENVIRONMENT": "SANDBOX"
      }
    }
  }
}

Tools

Read-only (always registered):

Tool PayPal API
paypal_verify_connection mints a token; reports environment
paypal_list_transactions GET /v1/reporting/transactions
paypal_get_balances GET /v1/reporting/balances
paypal_list_invoices GET /v2/invoicing/invoices
paypal_get_invoice GET /v2/invoicing/invoices/{id}
paypal_get_order GET /v2/checkout/orders/{id}
paypal_get_capture GET /v2/payments/captures/{id}
paypal_list_disputes GET /v1/customer/disputes
paypal_get_dispute GET /v1/customer/disputes/{id}
paypal_list_plans GET /v1/billing/plans
paypal_get_subscription GET /v1/billing/subscriptions/{id}

Write tools (create/send invoice, refund, …) are a deliberate follow-up gated behind PAYPAL_READONLY=0.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured