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.1.0.tar.gz (4.0 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.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentlens_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 4.0 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.1.0.tar.gz
Algorithm Hash digest
SHA256 46ef41d0922ce2e8106e38de0f82eb3d0c7bb2580e06a6a8eafb0fff3aa72a00
MD5 7cc9beee1ec50007292a7857119824f9
BLAKE2b-256 3c9bb63a096679a3bf7dbbe30a38a69b85393561d7d1e1f990d7bf660bda49ed

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentlens_mcp-0.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2bccaa17b695ab44ba95c5e43f78c8f368812c335439e8f47ef8a890db4cb73
MD5 541f401fbdb42740224a9564f5f3119a
BLAKE2b-256 bc42ee31f8bdb88b09030a544612dc82b7da95515f093a97d03750cc3a47546b

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