Sardis MCP Server
The Sardis MCP (Model Context Protocol) server enables AI agents running in Claude Desktop, Cursor, and other MCP-compatible clients to execute secure payments with built-in policy validation.What is MCP?
MCP (Model Context Protocol) is an open protocol that standardizes how AI assistants communicate with external tools and data sources. The Sardis MCP server exposes payment capabilities as tools that can be safely used by AI agents.Installation
Claude Desktop Configuration
Add Sardis to your Claude Desktop configuration:macOS
Edit~/Library/Application Support/Claude/claude_desktop_config.json:
Windows
Edit%APPDATA%\Claude\claude_desktop_config.json:
Simulation Mode (No API Key Required)
For testing without real transactions:Cursor Configuration
Add Sardis to Cursor’s MCP settings:- Open Cursor Settings (Cmd+, on Mac, Ctrl+, on Windows)
- Navigate to Features → MCP
- Add new MCP server:
Environment Variables
| Variable | Required | Description | Default |
|---|---|---|---|
SARDIS_API_KEY | Yes (live mode) | Your Sardis API key | - |
SARDIS_WALLET_ID | Recommended | Default wallet ID | - |
SARDIS_AGENT_ID | Optional | Agent ID for attribution | - |
SARDIS_MODE | Optional | live or simulated | simulated |
SARDIS_API_URL | Optional | API base URL | https://api.sardis.sh |
SARDIS_CHAIN | Optional | Default blockchain | base_sepolia |
SARDIS_POLICY_BLOCKED_VENDORS | Optional | Comma-separated blocked vendors | - |
SARDIS_POLICY_ALLOWED_VENDORS | Optional | Comma-separated allowed vendors | - |
SARDIS_REQUIRE_EXPLICIT_APPROVAL | Optional | Require vendor approval | false |
Available Tools
The MCP server exposes 50+ tools across multiple categories:Wallet Operations
sardis_get_wallet- Get wallet informationsardis_get_balance- Check wallet balance and limitssardis_create_wallet- Create a new walletsardis_list_wallets- List all wallets
Payment Operations
sardis_pay- Execute a paymentsardis_get_transaction- Get transaction detailssardis_list_transactions- List transaction history
Hold Operations (Pre-Authorization)
sardis_create_hold- Create a payment holdsardis_capture_hold- Capture (settle) a holdsardis_void_hold- Cancel a holdsardis_release_hold- Release hold fundssardis_get_hold- Get hold detailssardis_list_holds- List all holdssardis_extend_hold- Extend hold expiration
Policy & Guardrails
sardis_check_policy- Validate payment against policysardis_validate_limits- Check spending limitssardis_check_compliance- Run compliance checkssardis_get_policies- List active policies
Agent Management
sardis_create_agent- Create a new agentsardis_get_agent- Get agent detailssardis_list_agents- List all agentssardis_update_agent- Update agent information
Group Management
sardis_create_group- Create agent groupsardis_get_group- Get group detailssardis_list_groups- List all groupssardis_add_agent_to_group- Add agent to groupsardis_remove_agent_from_group- Remove agent from groupsardis_get_group_spending- Get group spending summary
Virtual Cards
sardis_issue_card- Issue a virtual cardsardis_create_card- Create a cardsardis_get_card- Get card detailssardis_list_cards- List all cardssardis_freeze_card- Freeze a cardsardis_unfreeze_card- Unfreeze a cardsardis_cancel_card- Cancel a card
Fiat Operations
sardis_fund_wallet- Add funds via ACHsardis_withdraw_to_bank- Withdraw to bank accountsardis_withdraw- Withdraw fundssardis_get_funding_status- Check funding statussardis_get_withdrawal_status- Check withdrawal statussardis_list_funding_transactions- List funding history
Approval Workflows
sardis_request_approval- Request payment approvalsardis_get_approval_status- Check approval statussardis_check_approval- Verify approvalsardis_list_pending_approvals- List pending approvalssardis_cancel_approval- Cancel approval request
Spending Analytics
sardis_get_spending_summary- Get spending overviewsardis_get_spending- Get detailed spendingsardis_get_spending_by_vendor- Spending by vendorsardis_get_spending_by_category- Spending by categorysardis_get_spending_trends- Analyze spending trends
Sandbox & Testing
sardis_sandbox_demo- Interactive sandbox demo
Usage Examples
In Claude Desktop
Once configured, you can ask Claude to make payments:Policy Validation Example
Hold Example (Hotel Booking)
Group Spending Example
Prompt Templates
The MCP server provides built-in prompts:pay-vendor
Make a payment with policy validation:
check-balance
Check wallet balance and spending limits:
sandbox-tour
Guided tour of Sardis capabilities:
Resources
The MCP server exposes resources for context:sardis://wallet/balance- Current wallet balance and limitssardis://wallet/info- Wallet configurationsardis://config- Server configuration statussardis://tools- List of available tools
Security Features
Rate Limiting
Per-tool rate limits prevent abuse:- Payment operations: 5 calls/minute
- Wallet mutations: 3 calls/minute
- Hold operations: 10 calls/minute
- Read operations: 60 calls/minute
Policy Enforcement
All payment operations go through policy validation:- Check spending limits
- Validate vendor/recipient
- Run compliance checks
- Verify wallet balance
Audit Trail
All operations are logged with:- Timestamp
- Tool name
- Arguments
- Result
- Request ID
Troubleshooting
Server Not Appearing in Claude
- Check config file location
- Verify JSON syntax
- Restart Claude Desktop
- Check Claude logs:
~/Library/Logs/Claude/mcp*.log
”API Key Not Configured” Error
- Verify
SARDIS_API_KEYin config - Check API key format (starts with
sk_) - Ensure no extra spaces or quotes
”Wallet Not Found” Error
- Set
SARDIS_WALLET_IDenvironment variable - Create a wallet first using
sardis_create_wallet - Use simulation mode for testing
Rate Limit Exceeded
- Check rate limit window (1 minute)
- Reduce request frequency
- Contact support for higher limits
Development
Run the MCP server locally:Support
- Documentation: https://sardis.sh/docs
- GitHub Issues: https://github.com/sardis-pay/sardis/issues
- Email: [email protected]