Skip to main content

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

Metadata

Release files for agentlens-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentlens-mcp 0.2.0
File Size Uploaded Provenance Actions
agentlens_mcp-0.2.0.tar.gz 4.1 kB Without provenance Details for agentlens_mcp-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentlens-mcp 0.2.0
File Interpreter ABI Platform Actions
agentlens_mcp-0.2.0-py3-none-any.whl Python 3 none any Details for agentlens_mcp-0.2.0-py3-none-any.whl

Total release size: 9.0 kB

Release files / agentlens_mcp-0.2.0.tar.gz

Download URL agentlens_mcp-0.2.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
163b40637687a7f8e136e2febd7d77727738f7b2abc53aec7344a8bd493167e3
BLAKE2b-256 checksum
How to use checksums
ebb3d90960696c9d04c303dff39320340f852b53de5bc6db5f630dfc62367a7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.5

Release files / agentlens_mcp-0.2.0-py3-none-any.whl

Download URL agentlens_mcp-0.2.0-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3341f775730b593523b65a8daf89d2f704d35b78a8046859e1ffa4aeeb7524aa
BLAKE2b-256 checksum
How to use checksums
8137073b71b3f49867b649ae2ecbf80df227114f9519a720cc69cefcedb2b965
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.5

Security for agentlens-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page