CommonTrace MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add --transport http commontrace http://localhost:8080/mcp
Required:COMMONTRACE_API_KEY+ 6 optional
README.md

Connects AI coding agents to a shared knowledge base

CommonTrace MCP Server

Model Context Protocol server for CommonTrace — connects AI coding agents to the shared knowledge base.

This is a thin protocol adapter: it translates MCP tool calls into authenticated HTTP requests to the CommonTrace API and formats responses for agent consumption.

Tools

Tool Description Read/Write
search_traces Search by natural language query and/or tags Read
contribute_trace Submit a new coding trace Write
vote_trace Upvote or downvote a trace Write
get_trace Get a trace by ID Read
list_tags List available filter tags Read

Quick Start

With Docker (recommended)

The MCP server is included in the main server's Docker Compose:

git clone https://github.com/commontrace/server.git
cd server
cp .env.example .env
docker compose up

The MCP server runs on http://localhost:8080.

Standalone

git clone https://github.com/commontrace/mcp.git
cd mcp
uv sync

# Set the backend API URL and your API key
export API_BASE_URL=http://localhost:8000
export COMMONTRACE_API_KEY=your-api-key

# Run (HTTP transport)
python -m app.server

Configuration

Variable Default Description
API_BASE_URL http://localhost:8000 CommonTrace API URL
COMMONTRACE_API_KEY API key for backend auth
MCP_TRANSPORT stdio Transport: http or stdio
MCP_HOST 0.0.0.0 HTTP bind address
MCP_PORT 8080 HTTP port
READ_TIMEOUT 0.2 Read SLA timeout (seconds)
WRITE_TIMEOUT 2.0 Write SLA timeout (seconds)

Connecting to Claude Desktop

Add to your Claude Desktop MCP config (~/.claude/mcp.json):

{
  "commontrace": {
    "type": "http",
    "url": "http://localhost:8080/mcp"
  }
}

Resilience

  • Circuit breaker protects against backend failures (closed/open/half-open)
  • SLA timeouts cancel slow requests (200ms read, 2s write)
  • Graceful degradation — all failures return human-readable strings, never unhandled exceptions

Related Repositories

License

Apache-2.0

Tools (5)

search_tracesSearch by natural language query and/or tags
contribute_traceSubmit a new coding trace
vote_traceUpvote or downvote a trace
get_traceGet a trace by ID
list_tagsList available filter tags

Environment Variables

API_BASE_URLCommonTrace API URL
COMMONTRACE_API_KEYrequiredAPI key for backend auth
MCP_TRANSPORTTransport: http or stdio
MCP_HOSTHTTP bind address
MCP_PORTHTTP port
READ_TIMEOUTRead SLA timeout (seconds)
WRITE_TIMEOUTWrite SLA timeout (seconds)

Configuration

claude_desktop_config.json
{"commontrace": {"type": "http", "url": "http://localhost:8080/mcp"}}

Try it

Search for coding traces related to authentication patterns in Python.
List all available tags to see how I can filter my search.
Contribute a new trace documenting the fix for the recent database connection timeout.
Get the details for trace ID 12345.
Upvote the trace that explains how to optimize vector search queries.

Frequently Asked Questions

What are the key features of CommonTrace?

Translates MCP tool calls into authenticated HTTP requests. Supports natural language search for coding traces. Includes circuit breaker protection for backend resilience. Enforces SLA timeouts for read and write operations. Provides collaborative knowledge sharing for AI coding agents.

What can I use CommonTrace for?

Sharing verified coding patterns and solutions across a development team. Retrieving context-aware coding traces during complex debugging sessions. Building a collaborative knowledge base for AI-assisted software development. Standardizing documentation of coding fixes through structured traces.

How do I install CommonTrace?

Install CommonTrace by running: docker compose up

What MCP clients work with CommonTrace?

CommonTrace works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep CommonTrace docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare