Skip to main content

MCP server for AgentLens — zero-code observability for MCP-native AI agents

Project description

agentlens-mcp

MCP server for AgentLens — zero-code observability for any MCP-compatible agent (Claude Desktop, Cursor, Windsurf, etc.).

Any agent that supports MCP can send traces to AgentLens without installing the Python or TypeScript SDK.

Install

pip install agentlens-mcp

Prerequisites

Start the AgentLens server:

pip install agentlens-server
agentlens-server

Configure in your MCP client

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json)

{
  "mcpServers": {
    "agentlens": {
      "command": "agentlens-mcp"
    }
  }
}

Cursor / Windsurf

Add to your MCP server config:

{
  "agentlens": {
    "command": "agentlens-mcp"
  }
}

Tools Exposed

Once connected, your MCP agent can call these tools:

Tool Description
agentlens_start_session Start a new debugging session. Returns a session_id to use in subsequent calls.
agentlens_report_trace Report a trace event (LLM call, tool call, decision, memory op, error).
agentlens_report_memory Report a memory state change (created, updated, accessed, deleted).

How It Works

The MCP server receives tool calls from your agent and forwards them to the AgentLens HTTP server (http://localhost:8766). Events appear in the dashboard in real-time.

Agent → MCP call → agentlens-mcp server → HTTP POST → AgentLens server → Dashboard

Example Usage (inside a Claude conversation)

Once the MCP server is connected, Claude can instrument its own tasks:

1. Call agentlens_start_session → get session_id
2. For each tool call: agentlens_report_trace(session_id, event_type="tool_call", ...)
3. For each LLM decision: agentlens_report_trace(session_id, event_type="decision", ...)

Open http://localhost:5173 to watch the trace build in real time.

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

agentlens_mcp-0.2.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

agentlens_mcp-0.2.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file agentlens_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: agentlens_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.5

File hashes

Hashes for agentlens_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 163b40637687a7f8e136e2febd7d77727738f7b2abc53aec7344a8bd493167e3
MD5 d35d7a43cf6f7205bfa819156a9b7f15
BLAKE2b-256 ebb3d90960696c9d04c303dff39320340f852b53de5bc6db5f630dfc62367a7e

See more details on using hashes here.

File details

Details for the file agentlens_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: agentlens_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.5

File hashes

Hashes for agentlens_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3341f775730b593523b65a8daf89d2f704d35b78a8046859e1ffa4aeeb7524aa
MD5 c8194a49256f431656d0dc7d03a79032
BLAKE2b-256 8137073b71b3f49867b649ae2ecbf80df227114f9519a720cc69cefcedb2b965

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