MCP Integration¶
coqu exposes a remote MCP (Model Context Protocol) server that lets any MCP-compatible client query your codebases.
Endpoint¶
Transport: Streamable HTTP (the current MCP standard for remote servers).
Authentication¶
All requests require a Bearer token in the Authorization header. Use an API token created in the coqu web UI (Menu → API Tokens).
Token format: coqu_<64 hex chars>
Avoid hardcoding tokens in config files. Claude Desktop and Claude Code support environment variable references — store the token in an env var and reference it:
Cursor does not support ${env:...} in headers. For Cursor, set the token directly in the config or use Cursor's UI to add it.
Available tools¶
| Tool | Description | Parameters |
|---|---|---|
query |
Execute a code query against a project | query (required), project (required), agent (required), mode (optional, defaults to "default"), branch (optional), pull (optional) |
list_projects |
List all projects | — |
list_agents |
List all agents | — |
Parameters project, agent, and mode use names (not UUIDs). Available names are embedded directly in tool descriptions, so MCP clients can discover them without a separate listing tool.
Client setup¶
Claude Desktop¶
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"coqu": {
"type": "streamable-http",
"url": "https://<your-coqu-host>/mcp",
"headers": {
"Authorization": "Bearer ${env:COQU_TOKEN}"
}
}
}
}
Restart Claude Desktop after editing.
Cursor¶
Open Cursor Settings → MCP Servers → Add new MCP server:
- Name:
coqu - Type:
streamable-http - URL:
https://<your-coqu-host>/mcp - Headers:
Authorization: Bearer coqu_<your-token>
Or edit .cursor/mcp.json in your project root:
{
"mcpServers": {
"coqu": {
"type": "streamable-http",
"url": "https://<your-coqu-host>/mcp",
"headers": {
"Authorization": "Bearer coqu_<your-token>"
}
}
}
}
Note: Cursor does not support ${env:...} in headers. The token must be set directly.
Claude Code (CLI)¶
Edit ~/.claude/settings.json:
{
"mcpServers": {
"coqu": {
"type": "streamable-http",
"url": "https://<your-coqu-host>/mcp",
"headers": {
"Authorization": "Bearer ${env:COQU_TOKEN}"
}
}
}
}
Local development¶
When running locally, replace the URL with http://localhost:4000/mcp.
Usage examples¶
Once connected, the MCP client can use the tools naturally in conversation:
List projects:
"What projects are available in coqu?"
The client will call list_projects and show the results.
Query a project:
"Ask coqu about the authentication flow in the coqu project"
The client will call query with the appropriate project and agent names.
Query with branch and pull:
"Pull latest on the main branch of coqu and ask about the database schema"
The client will call query with branch: "main" and pull: true.