1.0.0 • Published 4 months ago
@subtotal-inc/mcp v1.0.0
Subtotal Model Context Protocol
The Subtotal Model Context Protocol server allows you to integrate with Subtotal APIs through function calling.
Setup
To run the Subtotal MCP server using npx, use the following command:
# To set up all available tools
npx -y @subtotal-inc/mcp --tools=all --subtotal-secret-key=<SECRET-KEY>
# To set up specific tools
npx -y @subtotal-inc/mcp --tools=get-purchases,get-purchase-details --subtotal-secret-key=<SECRET-KEY>
Make sure to replace <SECRET-KEY>
with your actual Subtotal API secret API key value.
Alternatively, you could set the SUBTOTAL_SECRET_KEY environment variable.
Usage with Claude Desktop
Add the following to your claude_desktop_config.json
. See here for more details.
{
“mcpServers”: {
“subtotal”: {
“command”: “npx”,
“args”: [
“-y”,
“@subtotal-inc/mcp”,
“--tools=all”,
“--subtotal-secret-key=<SECRET-KEY>”
]
}
}
}
Available tools
Tool | Description |
---|---|
get-merchants | Get merchants |
create-connection | Create a new connection |
create-merchant-link-url | Create a new merchant link URL |
get-purchases | Get purchases |
get-purchase-details | Get purchase details |
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:
# Start MCP Inspector and server with all tools
npx @modelcontextprotocol/inspector node dist/index.js --tools=all --subtotal-secret-key=<SECRET-KEY>
Instructions
- Replace
<SECRET-KEY>
with your actual Subtotal API secret key value. - 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.