SpendGuard includes an MCP (Model Context Protocol) server that lets AI agents like Claude check financial actions, create policies, and inspect violations through natural conversation. Instead of writing code to call the API, your AI agent discovers SpendGuard’s tools automatically and uses them when relevant.Documentation Index
Fetch the complete documentation index at: https://spendguard.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
What You Get
The MCP server exposes 5 tools:| Tool | What It Does | API Endpoint |
|---|---|---|
check_financial_action | Check if an action is allowed | POST /v1/checks |
create_policy | Create or update a policy | POST /v1/policies |
get_policy | Retrieve a policy and its rules | GET /v1/policies/{id} |
simulate_actions | Test actions with no side effects | POST /v1/simulate |
list_violations | View blocked/escalated audit log | GET /v1/violations |
Setup for Claude Desktop
1. Find the config file
On macOS:2. Add the SpendGuard server
3. Restart Claude Desktop
After saving the config, fully quit and reopen Claude Desktop. The SpendGuard tools will appear in the tools menu.Setup for Claude Code
Add to your project’s MCP settings (.claude/settings.json):
Example Conversations
Once connected, you can talk to Claude naturally and it will use SpendGuard tools when relevant:Checking an action
You: “Can our support agent refund $350 to customer_7821? The order is 12 days old.” Claude: uses check_financial_action “The refund requires human approval — 200 auto-approve threshold. The order is within the 30-day window, so it’s eligible once a manager approves.”
Testing a policy
You: “Simulate what would happen if we tried to refund $750 to customer_456 using the support refund policy.” Claude: uses simulate_actions “That refund would be blocked — 500 maximum amount limit. The customer would need to contact a manager for a refund that large.”
Reviewing violations
You: “Show me what our support agent has been blocked on recently.” Claude: uses list_violations “In the last 24 hours, support-agent-v1 had 3 blocks: two for exceeding the $500 refund limit and one duplicate action detection.”
Environment Variables
| Variable | Required | Description |
|---|---|---|
SPENDGUARD_API_URL | Yes | Your SpendGuard API URL (e.g., https://spendguardapi.com) |
SPENDGUARD_API_KEY | Yes* | Your API key. *Not needed for simulate_actions in demo mode. |