Skip to main content
Connect an Agno agent to Civic using MCPTools with Streamable HTTP transport. Agno’s MCPTools context manager handles connection lifecycle and exposes all discovered tools to your agent.

Prerequisites

  • Python 3.11+
  • A Civic account at app.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

Use MCPTools as an async context manager to connect to the Civic Hub and pass the tools to your agent:
Use server_params=StreamableHTTPClientParams(...) — not params=. Also set transport="streamable-http" explicitly.

Production Configuration

For production agents, lock to a specific toolkit using the profile URL parameter:

Reference Implementation

agno-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