1.0.0 • Published 4 months ago

@subtotal-inc/mcp v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

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

ToolDescription
get-merchantsGet merchants
create-connectionCreate a new connection
create-merchant-link-urlCreate a new merchant link URL
get-purchasesGet purchases
get-purchase-detailsGet 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

  1. Replace <SECRET-KEY> with your actual Subtotal API secret key value.
  2. Run the command to start the MCP Inspector.
  3. Open the MCP Inspector UI in your browser and click Connect to start the MCP server.
  4. You can see the list of tools you selected and test each tool individually.