0.1.4 • Published 8 months ago
@magpieim/mcp v0.1.4
Magpie Model Context Protocol
The 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.
Setup
To run the Magpie MCP server using npx, use the following command:
# To set up all available tools
npx -y @magpieim/mcp --tools=all --api-key=YOUR_MAGPIE_SECRET_KEY
# To set up specific tools
npx -y @magpieim/mcp --tools=customers.create,customers.read,charges.create --api-key=YOUR_MAGPIE_SECRET_KEYMake 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.
Usage with Claude Desktop
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 buildRun the following command in your terminal:
# Start MCP Inspector and server with all tools
npx @modelcontextprotocol/inspector node dist/index.js --tools=all --api-key=YOUR_MAGPIE_SECRET_KEYInstructions
- Replace
YOUR_MAGPIE_SECRET_KEYwith your actual Magpie API secret key. - Run the command to start the MCP Inspector.
- Open the MCP Inspector UI in your browser and click Connect to start the MCP server.
- You can see the list of tools you selected and test each tool individually.