MODEL CONTEXT PROTOCOL

Magpie MCP Server

Connect AI agents to the Magpie Payment Platform. Process payments, create checkouts, send invoices, and manage payment links through natural conversation.

Quick Start

Add this to your Claude Desktop config and restart. No installation needed.

claude_desktop_config.json
{
  "mcpServers": {
    "magpie": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp.magpie.im/mcp"]
    }
  }
}

Requires Node.js 18+ for npx / mcp-remote

How It Works

1

Connect

Add the config above and restart Claude Desktop. The mcp-remote bridge connects to the server automatically.

2

Authorize

Your browser opens to an OAuth flow. Enter your Magpie API keys from the Magpie Dashboard. This only happens once.

3

Use

Ask Claude to process payments, create checkout sessions, send invoices, or manage payment links. 33 tools are available.

Available Tools / 33 tools across 6 categories

Payment Sources 2
create_source get_source
Customers 6
create_customer get_customer update_customer get_customer_by_email attach_source_to_customer detach_source_from_customer
Charges 7
create_charge get_charge list_charges capture_charge void_charge refund_charge verify_charge
Checkout Sessions 5
create_checkout_session get_checkout_session list_checkout_sessions expire_checkout_session capture_checkout_session
Payment Requests 5
create_payment_request get_payment_request list_payment_requests void_payment_request resend_payment_request
Payment Links 6
create_payment_link get_payment_link list_payment_links update_payment_link activate_payment_link deactivate_payment_link

Utility Tools / 2 tools

Account 2
get_me get_magpie_api_reference

Supported Payment Methods

Method Payments Checkout Requests Links
Card
GCash
Maya
GrabPay
BPI
Alipay
UnionPay
WeChat Pay
QR PH
InstaPay

Self-Hosted / run it yourself

Install from npm

Run the MCP server locally. Provide your API keys as environment variables instead of using the hosted OAuth flow.

npm install -g magpie-mcp-server

Claude Desktop config (self-hosted)

Point Claude Desktop at the local server with your Magpie credentials:

{
  "mcpServers": {
    "magpie": {
      "command": "npx",
      "args": ["-y", "magpie-mcp-server"],
      "env": {
        "MAGPIE_PUBLIC_KEY": "your_public_key",
        "MAGPIE_SECRET_KEY": "your_secret_key"
      }
    }
  }
}

FAQ

"Failed to spawn process: No such file or directory"

Claude Desktop is a GUI app and doesn't inherit your shell's PATH. If you use a Node version manager (NVM, fnm, Volta, Herd), the bare npx command won't be found.

Fix: use the full path to npx and add its directory to env.PATH:

{
  "mcpServers": {
    "magpie": {
      "command": "/full/path/to/npx",
      "args": ["mcp-remote", "https://mcp.magpie.im/mcp"],
      "env": {
        "PATH": "/full/path/to/node/bin:/usr/local/bin:/usr/bin:/bin"
      }
    }
  }
}

Find your path by running which npx in a terminal.

How do I re-authorize or switch API keys?

The mcp-remote bridge caches OAuth tokens locally. To force a fresh authorization flow, delete the cache and restart Claude Desktop:

rm -rf ~/.mcp-auth/

The next time Claude Desktop connects, your browser will open the authorization page where you can enter new API keys.

Where are my API keys stored?

Your Magpie API keys are stored server-side in an encrypted PostgreSQL database, associated with your OAuth client. They never leave the server.

Your local machine only stores an OAuth access token (in ~/.mcp-auth/) which authenticates requests to the MCP server. The access token expires after 1 hour and is automatically refreshed.

Do I need to install anything?

You need Node.js 18+ installed (for the npx and mcp-remote commands). No other installation is required—the hosted server handles everything else.

If you prefer to self-host, you can install the server from npm with npm install -g magpie-mcp-server and provide your own API keys as environment variables.

What can I ask Claude to do with Magpie?

Anything the Magpie API supports. Examples:

• "Charge 500 PHP to the customer's GCash"
• "Create a checkout session for 1,200 PHP with card and Maya"
• "Send a payment request for 3,000 PHP to juan@example.com"
• "Create a reusable payment link for 250 PHP"
• "Show me all charges from today"
• "Refund charge ch_abc123"