A command line tool for setting up Magpie MCP server
npm install @magpieim/mcpThe Magpie Model Context Protocol server allows you to integrate with Magpie APIs through function calling. This protocol supports various tools to interact with different Magpie services.
To run the Magpie MCP server using npx, use the following command:
``bashTo set up all available tools
npx -y @magpieim/mcp --tools=all --api-key=YOUR_MAGPIE_SECRET_KEY
Make sure to replace
YOUR_MAGPIE_SECRET_KEY with your actual Magpie secret key. Alternatively, you could set the MAGPIE_SECRET_KEY in your environment variables.$3
Add the following to your
claude_desktop_config.json. See here for more details.`
{
“mcpServers”: {
“magpie”: {
“command”: “npx”,
“args”: [
“-y”,
“@magpieim/mcp”,
“--tools=all”,
“--api-key=MAGPIE_SECRET_KEY”
]
}
}
}
`Available tools
| Tool | Description |
| ------------------------- | ------------------------------------- |
|
customers.create | Create a new customer |
| customers.read | Retrieve customer information |
| charges.create | Create a new charge |
| charges.update | Void, capture a charge |
| refunds.create | Refund a charge |
| checkoutSessions.create | Create a new checkout session |
| checkoutSessions.read | Retrieve checkout session information |
| paymentRequests.create | Create a new invoice |
| paymentRequests.read | Retrieve invoice information |
| paymentLinks.create | Create a new payment link |
| paymentLinks.read | Retrieve payment link information |
| paymentLinks.update | Activate, deactivate a payment link |Debugging the Server
To debug your server, you can use the MCP Inspector.
First build the server
`
npm run build
`Run the following command in your terminal:
`bash
Start MCP Inspector and server with all tools
npx @modelcontextprotocol/inspector node dist/index.js --tools=all --api-key=YOUR_MAGPIE_SECRET_KEY
`$3
1. Replace
YOUR_MAGPIE_SECRET_KEY` with your actual Magpie API secret key.