npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@itzvenkat0/agentlens-mcp-server

v0.1.4

Published

MCP server for AgentLens — self-instrumentation tools for AI agents

Readme

@itzvenkat0/agentlens-mcp-server

An official Model Context Protocol (MCP) server for AgentLens — enabling AI agents to self-instrument, report their own activities, and log spans directly.

What problem does this solve?

When building autonomous AI systems (like coding agents, researchers, or customer support bots), it is incredibly difficult to know exactly what the agent is doing at any given moment. Traditional observability requires developers to manually wrap every LLM call and function execution in their source code using an SDK.

This package flips that paradigm.

By providing AgentLens as an MCP server, you give the AI agent itself the tools it needs to self-report its own execution. The agent can natively call tools to say "I am starting to research a topic", then later "I finished researching and it took 45 seconds", and finally "Here is the result". All of this telemetry is pushed directly into your AgentLens dashboard.

Features

  • Zero-Code Instrumentation: No need to rewrite your application code with our SDK. If the agent supports MCP, it supports AgentLens.
  • Native Tool Access: Provides startSpan, endSpan, and logEvent directly into the LLM's context window context.
  • Universal Compatibility: Works with Claude Desktop, Cursor, Zed, and any custom MCP-client architecture.

Installation

You can run the server directly via npx (recommended for desktop clients), or install it globally:

# Option 1: Run directly without installing permanently
npx -y @itzvenkat0/agentlens-mcp-server

# Option 2: Install globally on your machine
npm install -g @itzvenkat0/agentlens-mcp-server

Examples & Configuration

To use the AgentLens MCP Server, you simply need to register it with your MCP Client of choice and pass the required environment variables.

1. Claude Desktop

To use this with Claude Desktop, add the following to your claude_desktop_config.json file (located in ~/Library/Application Support/Claude/ on Mac or %APPDATA%\Claude\ on Windows):

{
  "mcpServers": {
    "agentlens": {
      "command": "npx",
      "args": [
        "-y",
        "@itzvenkat0/agentlens-mcp-server"
      ],
      "env": {
        "AGENTLENS_API_URL": "http://localhost:9471/api/ingest",
        "AGENTLENS_PROJECT_KEY": "YOUR_PROJECT_KEY"
      }
    }
  }
}

Note: Once configured, restart Claude Desktop. You will see a small hammer icon indicating the AgentLens tools are available.

2. Cursor IDE

If you use Cursor as your AI code editor, you can add AgentLens to track Cursor's autonomous codebase edits natively.

  1. Open Cursor Settings > Features > MCP Servers.
  2. Click + Add new MCP server.
  3. Set the Type to command.
  4. Set the Name to AgentLens.
  5. Set the Command to:
    npx -y @itzvenkat0/agentlens-mcp-server
    (Ensure you prefix the command with environment variables if your ingestion endpoint isn't local).

3. Custom Node.js MCP Client

If you are building your own AI Agent in TypeScript/Node and using the @modelcontextprotocol/sdk/client, you can spin up the AgentLens server as a Stdio subprocess:

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";

const transport = new StdioClientTransport({
  command: "npx",
  args: ["-y", "@itzvenkat0/agentlens-mcp-server"],
  env: {
    ...process.env,
    AGENTLENS_API_URL: "https://your-production-agentlens.com/api/ingest",
    AGENTLENS_PROJECT_KEY: "prod_key_123"
  }
});

const client = new Client(
  { name: "My Autonomous Agent", version: "1.0.0" },
  { capabilities: { tools: {} } }
);

await client.connect(transport);
// The agent now has structural access to startSpan, endSpan, and logEvent!

Environment Variables

| Variable | Description | Default | |----------|-------------|---------| | AGENTLENS_API_URL | The REST ingestion endpoint for AgentLens. | http://localhost:9471/api/ingest | | AGENTLENS_PROJECT_KEY | Authentication key generated from your AgentLens dashboard. | Required |

License

MIT