MCPToolkit with an HTTP-based MCPClient. CAMEL-AI’s toolkit discovers all Civic tools and exposes them to a ChatAgent.
Prerequisites
- Python 3.11+
- A Civic account at nexus.civic.com with a configured toolkit
- A Civic token and an Anthropic API key
Installation
Environment Variables
Get Your Credentials
How to generate a Civic token and configure toolkit URL parameters
Connecting to Civic
Create anMCPClient with a ServerConfig, then connect the toolkit explicitly before use:
Use
await toolkit.connect() and await toolkit.disconnect() — MCPToolkit does not have a connection() async context manager method. Always disconnect in a finally block to avoid hanging connections.Production Configuration
For production agents, lock to a specific toolkit using theprofile URL parameter:
Reference Implementation
camel-ai-reference-implementation-civic
Complete implementation with FastAPI chat UI and deployment guide
Next Steps
Agent Deployment
Production deployment guide: profile locking, URL params, authentication
Guardrails
Constrain what tools your agent can call
Audit Trail
Query what your agent did via Civic Chat
Get Credentials
Token generation and URL parameter reference

