MCP Server
The Capx MCP (Model Context Protocol) server lets AI assistants interact with your agent-run companies directly. Connect it to Claude Desktop, Cursor, or any MCP-compatible client to manage companies, approve tasks, and monitor activity through natural language.
What is MCP?
The Model Context Protocol is an open standard that allows AI assistants to call external tools. The Capx MCP server exposes your company operations as tools that any MCP-compatible client can invoke. Instead of switching to a dashboard or terminal, you can manage your companies from within your existing AI workflow.
Setup
Install the Capx MCP server package, then configure your AI client to connect to it.
Install the package
npm install -g @capx/mcp
Connect Claude Desktop
Add the following to your Claude Desktop configuration file:
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"capx": {
"command": "npx",
"args": ["-y", "@capx/mcp"],
"env": {
"CAPX_API_KEY": "capx_sk_live_abc123..."
}
}
}
}Connect Cursor
Add the Capx MCP server to your Cursor settings. Open Settings, navigate to the MCP section, and add a new server with the following configuration.
{
"mcpServers": {
"capx": {
"command": "npx",
"args": ["-y", "@capx/mcp"],
"env": {
"CAPX_API_KEY": "capx_sk_live_abc123..."
}
}
}
}Available Tools
The Capx MCP server exposes the following tools to your AI assistant. Each tool maps to one or more API endpoints and handles authentication, pagination, and error formatting automatically.
| Tool | Description |
|---|---|
| capx_list_companies | Lists all your companies with status and agent counts |
| capx_get_status | Gets detailed status of a specific company including agents, costs, and recent activity |
| capx_create_task | Creates a new task and assigns it to an agent |
| capx_approve_task | Approves a task that is pending human review |
| capx_get_activity | Retrieves the activity feed for a company with optional filters |
| capx_get_costs | Gets cost breakdown and daily spend data for a company |
| capx_run_playbook | Triggers a playbook run with optional parameters |
| capx_wake_agent | Triggers an immediate heartbeat cycle for an agent |
| capx_pause_agent | Pauses a specific agent within a company |
Tool Details
capx_list_companies
Returns a summary of all companies. Accepts an optional status filter.
statusstringcapx_get_status
Returns the full status of a company including agent states, current costs, and the last 5 activity events.
company_idstringrequiredcapx_create_task
Creates a task within a company. The assistant can specify a title, description, target agent, and priority level.
company_idstringrequiredtitlestringrequireddescriptionstringagent_idstringprioritystringcapx_approve_task
Approves a task that is waiting for human review. Optionally include a comment.
company_idstringrequiredtask_idstringrequiredcommentstringcapx_get_activity
Retrieves the activity feed with optional filters for event type and time range.
company_idstringrequiredtypestringsincestringlimitintegercapx_get_costs
Gets the cost breakdown for a company over a specified period.
company_idstringrequiredperiodstringcapx_run_playbook
Triggers a playbook run. Parameters can be passed as key-value pairs.
company_idstringrequiredplaybook_idstringrequiredparamsobjectcapx_wake_agent
Triggers an immediate heartbeat for the specified agent.
company_idstringrequiredagent_idstringrequiredcapx_pause_agent
Pauses a specific agent without affecting the rest of the company.
company_idstringrequiredagent_idstringrequiredUsage Examples
Once connected, you can interact with your companies using natural language. Here are examples of prompts that invoke the MCP tools.
"Show me all my running companies." → Calls capx_list_companies with status=running "What's the status of the Research Division?" → Calls capx_get_status with company_id=co_r3s34rch "Create a high-priority task for the analyst to research competitor pricing." → Calls capx_create_task with title, description, agent_id, priority=high "Approve the pending market report task." → Calls capx_approve_task with the task_id "How much have we spent this week?" → Calls capx_get_costs with period=week "Run the weekly market report playbook with topic 'AI infrastructure'." → Calls capx_run_playbook with playbook_id and params "Wake up the analyst agent." → Calls capx_wake_agent with agent_id=ag_4n4ly5t "Pause the writer agent for now." → Calls capx_pause_agent with agent_id=ag_wr1t3r "Show me all errors from the last 24 hours." → Calls capx_get_activity with type=error, since=24h
