Get Cursor connected to Canton MCP Server in 5 minutes!
# Terminal 1: Facilitator
cd /home/skynet/canton/canton-x402-facilitator
npm run dev # Port 3000
# Terminal 2: Billing Portal
cd /home/skynet/canton/canton-billing-portal
npm run dev # Port 3002
# Terminal 3: MCP Server
cd /home/skynet/canton/canton-mcp-server
source .venv/bin/activate
python -m uvicorn src.canton_mcp_server.server:app --reload --port 5173- Open Cursor
- Press
Cmd/Ctrl + ,(Settings) - Search for "MCP"
- Click "Add MCP Server"
- Paste this config:
{
"name": "canton-mcp",
"url": "http://localhost:5173",
"headers": {
"X-Canton-Party-ID": "app_provider_quickstart-skynet-1::1220de769fb9fa9505bb61fc6fc1e30507829f8179e140645f40e222bc7bcdac21d7"
}
}- Click Save
Create ~/.cursor/mcp_config.json:
{
"mcpServers": [
{
"name": "canton-mcp",
"url": "http://localhost:5173",
"transport": "sse",
"headers": {
"X-Canton-Party-ID": "app_provider_quickstart-skynet-1::1220de769fb9fa9505bb61fc6fc1e30507829f8179e140645f40e222bc7bcdac21d7"
},
"enabled": true
}
]
}-
Reload Cursor:
Cmd/Ctrl + Shift + P→ "Developer: Reload Window" -
Look for MCP icon in sidebar (bottom left)
-
In Cursor chat, type:
@canton-mcp Get all strategies -
Should see response with available strategies!
-
Make requests until balance hits $2.00:
@canton-mcp Run a backtest for RN1 -
When you hit threshold, you'll see:
Error: Payment required: Your balance is $2.05. Please top up at http://localhost:3002/topup?party=... -
Click link → Top up page
-
Enter amount (e.g., 10 CC) → Continue using MCP
# Check MCP server is running
curl http://localhost:5173/health
# Should return: {"status": "healthy"}- Reload Cursor window
- Check MCP icon shows "connected"
- Try:
@canton-mcpin chat
# Check facilitator
curl "http://localhost:3000/balance?party=app_provider_quickstart-skynet-1::1220de769fb9fa9505bb61fc6fc1e30507829f8179e140645f40e222bc7bcdac21d7"
# Should show balance: {"balance": 0, "amountDue": 0, "amountPaid": 0}# Check all services
curl http://localhost:3000/health # Facilitator
curl http://localhost:3002 # Billing portal
curl http://localhost:5173/health # MCP server
# View balances
curl "http://localhost:3000/balance?party=app_provider_quickstart-skynet-1::1220de769fb9fa9505bb61fc6fc1e30507829f8179e140645f40e222bc7bcdac21d7"
# Restart everything
pkill -f "npm run dev"
pkill -f uvicorn
# Then start services againOnce connected, use these in Cursor:
@canton-mcp Get all strategies- List strategies@canton-mcp Run backtest for [strategy]- Execute backtest@canton-mcp Show my balance- Check Canton Coin balance@canton-mcp Create new strategy- Build a strategy
- Use MCP tools in your Cursor workflow
- Monitor balance at http://localhost:3002
- Set spending limits at http://localhost:3002/limits
- View transaction history at http://localhost:3002/transactions
- Complete Setup Guide:
CURSOR_SETUP.md - Billing Portal:
/home/skynet/canton/canton-billing-portal/README.md - MCP Server:
/home/skynet/canton/canton-mcp-server/README.md
That's it! You're ready to use Canton MCP with Cursor. 🚀