MCP Server
Connect any MCP-compatible AI agent to your AgencyAI workspace. Manage products, fulfill orders, and review analytics — all through natural language.
What is MCP?#
The Model Context Protocol (MCP) is an open standard that lets AI agents interact with external tools and data sources. AgencyAI ships a built-in MCP server that exposes your products, orders, and analytics as tools any MCP client can call.
Quick Start#
The MCP server is included with AgencyAI. Start it with a single command:
# Start the MCP server (stdio transport)
npx tsx src/mcp/server.ts
# Or via the CLI
agencyai mcp startThe server uses the same API key as the CLI. Set OPERATOR_API_KEY or run agencyai auth login first.
Client Configuration#
Add the AgencyAI MCP server to your client config. Here are examples for popular MCP clients:
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"agencyai": {
"command": "npx",
"args": ["tsx", "src/mcp/server.ts"],
"env": {
"OPERATOR_API_KEY": "op_live_your_key_here"
}
}
}
}Cursor
In Cursor settings → MCP, add:
{
"mcpServers": {
"agencyai": {
"command": "npx",
"args": ["tsx", "path/to/agent-operator-os/src/mcp/server.ts"],
"env": {
"OPERATOR_API_KEY": "op_live_your_key_here"
}
}
}
}Any MCP Client
The server uses stdio transport. Point any MCP-compatible client at:
command: npx tsx src/mcp/server.tsAvailable Tools#
The MCP server exposes these tools to connected agents:
| Tool | Description |
|---|---|
products_list | List all products with status, price, and order count |
products_get | Get full product details including intake questions |
orders_list | List recent orders with status and customer info |
orders_get | Get full order details including intake responses |
orders_fulfill | Mark an order as delivered with content |
analytics_overview | Orders by status, revenue summary, top products |
Example Agent Session#
Once connected, an AI agent can manage your workspace through natural language:
User: What orders came in today?
Agent (calls orders_list):
You have 3 new orders today:
1. Cyber Risk Assessment — $299 — Paid
2. AI Readiness Audit — $149 — Paid
3. HR Policy Review — $199 — Pending
User: Show me the cyber risk one.
Agent (calls orders_get):
Order #ORD-2026-0412
Customer: Jane Smith, Acme Corp
Product: Cyber & AI-Risk Readiness Assessment
Status: Paid
Intake responses: 22 answers across 7 dimensions
User: Fulfill it with the standard assessment.
Agent (calls orders_fulfill):
✅ Order ORD-2026-0412 fulfilled and delivered to jane@acme.com.Authentication#
The MCP server authenticates the same way as the CLI — using op_live_ API keys. Your key determines which expert workspace the agent can access. All operations are scoped to the authenticated expert.
Security note: API keys are validated on every MCP tool call. If a key is revoked, the server immediately rejects all requests. Never share your API key or commit it to version control.