Skip to main content

MCP server for interacting with LLM traces - search, analyze, and debug your AI agent executions

Project description

021-mcp

MCP server for interacting with LLM traces. Search, analyze, and debug your AI agent executions through any MCP-compatible client.

Installation

pip install 021-mcp

Or with uvx:

uvx 021-mcp

Configuration

Environment Variables

Variable Required Description
TRACES_API_KEY Yes Your API key for authentication
TRACES_BASE_URL No Base URL of the traces API (default: https://api.021labs.ai)

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "traces": {
      "command": "uvx",
      "args": ["021-mcp"],
      "env": {
        "TRACES_API_KEY": "your-api-key-here"
      }
    }
  }
}

Manus

Add to your Manus MCP configuration:

{
  "servers": {
    "traces": {
      "command": "uvx",
      "args": ["021-mcp"],
      "env": {
        "TRACES_API_KEY": "your-api-key-here"
      }
    }
  }
}

Cursor / Other MCP Clients

Most MCP clients support a similar configuration format. The key elements are:

  • command: uvx (or python -m mcp_traces.server if installed via pip)
  • args: ["021-mcp"]
  • env: Must include TRACES_API_KEY

Available Tools

list_traces

List traces with optional filters.

Parameters:

  • status - Filter by status: SUCCESS, ERROR, or RUNNING
  • search - Full-text search query
  • start_time - Filter traces after this ISO timestamp
  • end_time - Filter traces before this ISO timestamp
  • session_id - Filter by session ID
  • user_id - Filter by user ID
  • project_id - Filter by project ID
  • limit - Maximum results (1-100, default 20)

Example usage:

"Show me the last 10 traces that failed" "Find traces from yesterday that mention 'database'"

get_trace

Get detailed information about a specific trace.

Parameters:

  • trace_id - The trace ID to fetch
  • include_io - Include full input/output data (default: false)

Example usage:

"Get details for trace abc123" "Show me trace xyz789 with all the LLM inputs and outputs"

get_span

Get full details for a specific span including input/output.

Parameters:

  • span_id - The span ID to fetch

Example usage:

"What was the input to span def456?" "Show me the LLM response in span ghi789"

get_analytics

Get analytics summary for traces.

Parameters:

  • start_time - Start of time range
  • end_time - End of time range
  • granularity - hour, day, or week (default: day)
  • project_id - Filter by project ID

Example usage:

"Show me trace analytics for the last week" "What's the error rate for project X?"

search_errors

Find recent traces that ended in errors.

Parameters:

  • limit - Maximum results (default: 10)
  • start_time - Filter errors after this timestamp
  • project_id - Filter by project ID

Example usage:

"Find recent errors" "What failed in the last hour?"

Development

# Clone and install
git clone https://github.com/021labs/rl.git
cd rl/packages/mcp

# Install dependencies
uv sync

# Run locally
uv run 021-mcp

# Run tests
uv run pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

021_mcp-0.1.2.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

021_mcp-0.1.2-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file 021_mcp-0.1.2.tar.gz.

File metadata

  • Download URL: 021_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for 021_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3dbb1494b0b164b2cae32375ff46f77476137bda9459e1a6a8012275150e360f
MD5 5bf7576a68ad19bc4a9afb8483d4ae75
BLAKE2b-256 5f9cbdbca6b37df1c541f2d3e6a05c3ea640e56e6521c1411e468fb751a20bd2

See more details on using hashes here.

File details

Details for the file 021_mcp-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: 021_mcp-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for 021_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8014647fb7a012939cb4e8a0c39457f9a69793a47c1a7e5060d1fea2fe08b720
MD5 42339df0ee75cf178f8c5c7f0d2aabcd
BLAKE2b-256 dc76b9cd7623631dd3f4cb083c5313a6f4fcaa5e43e3dda996205759dc01f03c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page