PINTI Docs

MCP Server

Model Context Protocol integration for Claude Desktop and AI assistants.

When to Use

Use the MCP server when your AI assistant (Claude Desktop, etc.) needs to check spend policies before making purchases. The MCP server runs as a local process and exposes two tools to the AI.

Setup

1

Install globally

npm install -g pinti-mcp

Or run directly with npx (no install):

npx pinti-mcp
2

Configure Claude Desktop

Edit your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "pinti": {
      "command": "npx",
      "args": ["pinti-mcp"],
      "env": {
        "PINTI_API_KEY": "pinti_xxxxxxxx_...",
        "PINTI_URL": "https://pinti.ai"
      }
    }
  }
}
3

Restart Claude Desktop

Quit and reopen Claude Desktop. The PINTI tools should now appear in the tool list.

Tools

pinti_check_spend

Evaluates a spend intent against your workspace policies. Returns allowed, denied, or needs_approval.

ParameterTypeRequiredDescription
agentIdstringYesAgent identifier
amountnumberYesSpend amount
unitstringYesCurrency (e.g. "USD")
merchantstringYesMerchant name/URL
categorystringYesSpend category
reasonstringYesWhy the spend is needed
idempotencyKeystringNoDeduplication key

pinti_wait_for_approval

Polls a spend request until the approval is resolved (APPROVED/REJECTED) or times out.

ParameterTypeDefaultDescription
spendRequestIdstringID from pinti_check_spend result
pollIntervalMsnumber3000Polling interval (ms)
timeoutMsnumber300000Max wait time (default: 5 min)

Decision Flow

The MCP server enforces a mandatory spend guardrail:

  1. Before ANY spend action, the AI MUST call pinti_check_spend.
  2. If allowed → proceed with the action.
  3. If denied → STOP. Explain the denial to the user.
  4. If needs_approval → inform the user, call pinti_wait_for_approval, wait for resolution.
  5. If there's a tool error or timeout → STOP. Do NOT proceed (fail-closed).

Note

The MCP server uses fail-closed behavior. If the PINTI API is unreachable or returns an error, the AI should NOT proceed with the spend action.

Troubleshooting

Tool not showing up in Claude Desktop

  • Check that the config file path is correct for your OS.
  • Validate JSON syntax — a trailing comma or missing bracket will break it.
  • Ensure pinti-mcp is installed and accessible from your PATH.
  • Restart Claude Desktop completely (quit, not just close the window).

401 Unauthorized

  • Verify your PINTI_API_KEY is correct and not revoked.
  • Check that the key belongs to the right workspace.
  • Ensure there are no extra whitespace or newline characters in the env value.

"This is not a CORS issue"

Tip

The MCP server runs as a local process communicating via stdio. It is NOT a browser-based integration. CORS headers are irrelevant. If you see network errors, check your API key, internet connection, and PINTI_URL.