QuetraAI + Claude Cowork Setup
Connect QuetraAI spending governance to Claude Desktop or Claude Code via MCP. Two connection options — remote (recommended) or local.
| Method | Setup | Multi-agent | Requires Node.js |
|---|---|---|---|
| Remote (recommended) | Paste one URL | Yes | No |
| Local (stdio) | npx @quetra/mcp | No (one agent per connection) | Yes |
Prerequisites
- Claude Desktop or Claude Code installed
- A QuetraAI account at app.quetra.dev
- Node.js 18+ (only if using local setup)
Step 1: Create Your Organization
- Go to app.quetra.dev/auth/signup
- Create an account (email/password or social login via GitHub, Google, Apple, or Microsoft)
- Create an organization — this is your governance namespace
Step 2: Register an Agent
QuetraAI uses a 1:1 agent-to-mandate model — create one agent per task, then assign it a single mandate.
Important: The agent description is critical for LLM routing. When Claude connects via MCP, it reads agent descriptions from quetra_list_agents to decide which agent to use. Write clear, specific descriptions.
- Navigate to Agents in the sidebar
- Click Register Agent
- Fill in name, description (critical!), framework, and execution mode
- Copy the Agent ID (UUID)
Step 3: Create a Mandate
Without an active mandate, all spending requests are rejected. Configure budget, rules, and expiration.
- Navigate to Mandates → Create Mandate
- Select your agent, set spending limit, per-transaction limit, and budget reset period
- Add rules: category allowlist, rate limit, vendor restrictions
- Click Create Draft, then Activate
Step 4: Generate an API Key
- Navigate to API Keys → Create API Key
- Copy the key immediately (starts with
sk_, only shown once)
Step 5: Connect to Claude
Option A: Remote Server (recommended)
No install required. Add the remote MCP server URL:
Claude Code: Settings → MCP Servers → Add Remote Server
https://mcp.quetra.dev/sk_your_api_key_here/mcp
Claude Desktop: Settings → Connectors → Add → paste the URL above.
The remote server is multi-agent — use quetra_list_agents to discover agents. Claude reads descriptions to pick the right one.
Option B: Local Server (stdio)
Add to your Claude Desktop config:
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
{
"mcpServers": {
"quetra": {
"command": "npx",
"args": ["@quetra/mcp"],
"env": {
"QUETRA_API_KEY": "sk_your_api_key_here",
"QUETRA_AGENT_ID": "your-agent-uuid-here",
"QUETRA_GATEWAY_URL": "https://gateway.quetra.dev"
}
}
}
}Step 6: Verify the Integration
Restart Claude and try these prompts:
- "Check my QuetraAI budget status" — calls
quetra_check_budget - "Can I spend $2.00 on research at firecrawl.dev?" — calls
quetra_can_spend - "Can I spend $500 on entertainment at netflix.com?" — should be rejected
- "Show my recent QuetraAI transactions" — calls
quetra_transactions
How It Works
Claude Cowork
│
├─ User: "Buy the premium dataset from data.world for $15"
│
├─ Cowork calls: quetra_evaluate(amount: 1500, vendor: "data.world", category: "research")
│ │
│ ▼
│ MCP Server → @quetra/sdk → POST gateway.quetra.dev/api/v1/gateway/evaluate
│ │
│ ▼
│ QuetraAI Gateway:
│ 1. Authenticate API key
│ 2. Resolve active mandate for agent
│ 3. Evaluate ALL rules (AND logic)
│ 4. Atomically decrement budget
│ 5. Write to audit log
│ 6. Fire webhooks (async)
│ 7. Return decision
│
└─ Cowork: "Approved! You have $8.50 remaining in your weekly budget."Troubleshooting
Tools don't appear in Cowork
- Verify config JSON is valid (no trailing commas)
- Ensure Node.js 18+ is installed
- Restart Claude completely (Cmd+Q on macOS)
"No active mandate" errors
- Confirm the agent has an active mandate (not draft)
- Mandates must be explicitly activated after creation
Next Steps
- Monitor activity on the dashboard
- Set up webhooks for budget warnings at 80%
- MCP Overview & Tools