langchain-mcp-adapters package, which bridges DeepAgents’ tool interface with Civic’s Streamable HTTP MCP transport.
Prerequisites
- Python 3.11+
- A Civic account at nexus.civic.com with a configured toolkit
- A Civic token (generate from Settings → Tokens)
- An Anthropic API key
Installation
Using uv (recommended):Environment Variables
Get Your Credentials
How to generate a Civic token and configure toolkit URL parameters
Connecting to Civic
UseMultiServerMCPClient to connect to the Civic MCP Hub during app startup, then pass the discovered tools to create_deep_agent:
Running the Agent
Production Configuration
Lock to a Toolkit
For production agents, always lock to a specific toolkit using theprofile and lock URL parameters:
Multi-Account Setup
For organization accounts, include theaccountId parameter:
Pre-load Skills
Load specific Skills at session start using theskills parameter:
Environment Variable Reference
| Variable | Description |
|---|---|
CIVIC_URL | Full Civic toolkit URL including profile and any URL parameters |
CIVIC_TOKEN | Civic token from nexus.civic.com → Settings → Tokens |
ANTHROPIC_API_KEY | Anthropic API key for the Claude model |
Reference Implementation
A complete reference implementation including a FastAPI server, streaming chat UI, and production patterns is available at: github.com/titus-civic/deepagents-reference-implementation-civicNext Steps
Agent Deployment
Production deployment guide: profile locking, URL params, authentication
Guardrails
Constrain what tools your DeepAgents agent can use
Audit Trail
Query what your agent did via Civic Chat
Get Credentials
Token generation and URL parameter reference

