agentlens
Open-source observability and audit trail platform for AI agents. MCP-native, tamper-evident event logging, real-time dashboard.
claude mcp add --transport stdio agentkitai-agentlens npx @agentlensai/mcp \ --env AGENTLENS_API_KEY="als_your_key_here" \ --env AGENTLENS_API_URL="http://localhost:3400"
How to use
AgentLens provides an MCP-native server that exposes observability, auditing, and analytics capabilities for AI agents via the MCP protocol. You can run the MCP server and connect Claude Desktop, Cursor, or any MCP client to capture tool calls, sessions, events, and related analytics directly into AgentLens. Once connected, you’ll gain access to 12 MCP tools across core observability, intelligence & analytics, and operations, enabling real-time monitoring, session replay, cost tracking, health scoring, alerting, and benchmarking. The included MCP integration block shows a ready-to-use configuration block you can drop into your MCP client to connect to the local or remote AgentLens server.
When using the MCP server, you can leverage: (1) tool capture for tool invocations and session events, (2) queryable analytics to inspect LLM calls, prompts, costs, and latency, and (3) replay and alerting features to investigate and optimize agent behavior. This MCP server is designed to work alongside other AgentLens components (Python SDK, OpenClaw plugin, and the Python/TypeScript SDKs) to give you end-to-end observability across your agent stack.
To get started, configure your MCP client to point to the AgentLens MCP server, supply the necessary API URL and key if you’re protecting access, and begin sending your MCP tool calls and sessions. You’ll be able to browse sessions, view LLM analytics, monitor costs, and trigger alerts based on your defined rules.
How to install
Prerequisites:
- Node.js and npm (for npx usage) or Docker for containerized runs
- Internet access to fetch the MCP package when using npx
Option A: Quick start with npx (no local installation)
- Ensure Node.js and npm are installed on your machine.
- Run the MCP server via npx: npx @agentlensai/mcp
- If needed, specify a host/port via environment variables or defaults will apply.
Option B: Run via Docker (recommended for production setups)
- Install Docker and Docker Compose.
- Clone the repository or pull a prebuilt image (see your deployment docs).
- Configure environment variables in your docker-compose or environment file, including AGENTLENS_API_URL and AGENTLENS_API_KEY if your setup requires authentication.
- Start the container and expose the MCP port as configured in your setup.
Option C: Node.js server with npm package (alternative approach)
- Install locally: npm install -g @agentlensai/server
- Start the server: npx @agentlensai/server
- Access the server UI at http://localhost:3400 (default) and adjust environment variables as needed.
Additional notes
Tips and common considerations:
- The MCP integration block for agentlens uses the nonce default name agentlens; adjust the key in your MCP client config if you rename the server instance.
- Environment variables AGENTLENS_API_URL and AGENTLENS_API_KEY are required for secure access to the AgentLens API from MCP clients in production.
- In Docker/production, consider enabling TLS and Stripe/auth features as described in the Quick Start for a hardened deployment.
- The MCP server ships with 12 tools; refer to the full MCP tool reference to understand each tool’s capabilities and how to invoke them from your MCP client.
- If you run locally without a UI, you can still push events and sessions to the server and query analytics via the API or embedded dashboard.
- Ensure the MCP client is configured to use the correct base URL for the AgentLens API (e.g., http://localhost:3400) and that network access is allowed between the MCP client and AgentLens server.
Related MCP Servers
mcp-manager
simple web ui to manage mcp (model context protocol) servers in the claude app
agentgate
Approval workflows for AI agents
tools
🛠️ Monorepo for Sylphx MCP tools and servers - AI-powered development utilities
Derived-WMD
The Agentic Generative UI Platform: Transform natural language into production-ready React apps in seconds. Featuring autonomous Tambo agents, Model Context Protocol (MCP) for codebase grounding, and secure E2B sandboxed execution.
zora
AI-driven Model Context Protocol (MCP) server for the Zora Protocol. Integrates Coinbase AgentKit and Zora’s SDK to let Claude Desktop (and other MCP clients) query tokens, track markets, and execute trades on Base/Zora — all through natural language.
remote -registry
Explore a community-maintained list of remote Model Context Protocol (MCP) servers. Find, learn about, and check the reachability of MCP-enabled services.