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-mcpOr run directly with npx (no install):
npx pinti-mcp2
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | Agent identifier |
amount | number | Yes | Spend amount |
unit | string | Yes | Currency (e.g. "USD") |
merchant | string | Yes | Merchant name/URL |
category | string | Yes | Spend category |
reason | string | Yes | Why the spend is needed |
idempotencyKey | string | No | Deduplication key |
pinti_wait_for_approval
Polls a spend request until the approval is resolved (APPROVED/REJECTED) or times out.
| Parameter | Type | Default | Description |
|---|---|---|---|
spendRequestId | string | — | ID from pinti_check_spend result |
pollIntervalMs | number | 3000 | Polling interval (ms) |
timeoutMs | number | 300000 | Max wait time (default: 5 min) |
Decision Flow
The MCP server enforces a mandatory spend guardrail:
- Before ANY spend action, the AI MUST call
pinti_check_spend. - If allowed → proceed with the action.
- If denied → STOP. Explain the denial to the user.
- If needs_approval → inform the user, call
pinti_wait_for_approval, wait for resolution. - 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-mcpis installed and accessible from your PATH. - Restart Claude Desktop completely (quit, not just close the window).
401 Unauthorized
- Verify your
PINTI_API_KEYis 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.