mcpspan

Official registry AI and agents

Ask your agent about your MCP servers: failing tools, releases, clients, sessions.

What can you do with mcpspan?

  • Every call, from every client. Tool calls, resource reads and prompt
  • Response times that mean something. Median and 95th percentile per tool,
  • Answer sizes. How large each tool's answers are, typical and largest:
  • What agents are shown. Every session starts by reading the definitions
  • Failures, told apart. A handler that threw, a tool that answered with an
  • Sessions. Each connection's calls, step by step, as the agent made them,
  • Releases. Every call carries the version of your server that answered
  • Alerts to Slack, Discord or any webhook, when errors climb or a server

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package mcpspan-mcp
Claude Code
claude mcp add mcpspan -e 'MCPSPAN_READ_TOKEN=<your mcpspan_read_token>' -e 'MCPSPAN_URL=<MCPSPAN_URL>' -- npx -y mcpspan-mcp@0.12.0
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "mcpspan": {
            "command": "npx",
            "args": [
                "-y",
                "mcpspan-mcp@0.12.0"
            ],
            "env": {
                "MCPSPAN_READ_TOKEN": "<your mcpspan_read_token>",
                "MCPSPAN_URL": "<MCPSPAN_URL>"
            }
        }
    }
}

Environment variables

  • MCPSPAN_READ_TOKEN required secret A read token, made in mcpspan under Settings → Read tokens.
  • MCPSPAN_URL Your installation's API, for self-hosted mcpspan. https://api.mcpspan.com when left out.

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. mcpspan
  2. Features
  3. Quick start
  4. Connect your MCP server
  5. Running it
  6. Contributing
  7. Licence

mcpspan

Open-source, self-hosted analytics for MCP servers.

See which tools, resources and prompts get used, by which client,

how fast they answer, and why they fail.

Add one line to your MCP server, run the dashboard with docker compose up, and nothing ever leaves your machine.

Features

  • Every call, from every client. Tool calls, resource reads and prompt gets, with the client that made them: Claude, Claude Code, Cursor, VS Code, Codex, ChatGPT and the rest.
  • Response times that mean something. Median and 95th percentile per tool, and the full distribution, so a cache hit and a slow path do not hide inside one average.
  • Answer sizes. How large each tool's answers are, typical and largest: a tool that now and then returns megabytes fills the agent's context while looking fine on every latency chart.
  • What agents are shown. Every session starts by reading the definitions of all your tools, called or not. See how many tokens that list costs, and which tools agents were shown in hundreds of sessions and never called.
  • Failures, told apart. A handler that threw, a tool that answered with an error, arguments the server refused and which of them were wrong, and tools that agents asked for but your server does not have: which clients asked, the closest name you do have, and what the agent did next.
  • Sessions. Each connection's calls, step by step, as the agent made them, with the calls an agent repeated with the same arguments marked: a loop that looks fine one call at a time. A tool's page says which call came right before it repeated or failed, by client.
  • Releases. Every call carries the version of your server that answered it; the charts mark where each release began and compare it with the one before. A tool's own chart also marks where its description or input schema changed, since rewording a description can change how agents use a tool more than a change to its code.
  • Alerts to Slack, Discord or any webhook, when errors climb or a server goes quiet, for a whole server or one tool.
  • Ask your agent. Claude Code, Cursor or any MCP client answers questions about your servers from these numbers, through mcpspan-mcp and a token that only reads.
  • Your data, yours to take. CSV and NDJSON exports of anything you can see, and forwarding to OpenTelemetry for Grafana, Datadog, Honeycomb and the like.
  • Private by design. Parameter values never leave your server's process, and nothing is sent anywhere you did not set up yourself. Error messages, which a tool that runs commands can fill with anything, can be turned off.

    Every call, of every kind, filtered by outcome

    Failures, told apart, with what went wrong

    Sessions, step by step

    One call, and everything recorded about it

Quick start

You need Docker.

git clone https://github.com/mcpspan/mcpspan.git
cd mcpspan
docker compose up -d

Open **http://localhost:6270** and create your account. You get an API key for your first server, and the Settings page shows the line to add to it, in its language.

Connect your MCP server

TypeScript, on the official MCP SDK:

npm install mcpspan
import { instrument } from 'mcpspan';

instrument(server, {
  apiKey: process.env.MCPSPAN_API_KEY,
  endpoint: 'http://localhost:6271', // your mcpspan installation
});

Register your tools as you always have: every one is measured, and each returns and fails exactly as it did before.

Eight languages, the same features in each:

LanguageMCP SDKsInstallGuide
TypeScriptofficial SDK, v1 and v2npm install mcpspanpackages/mcpspan
Pythonofficial SDK, FastMCPpip install mcpspanpackages/mcpspan-python
Goofficial Go SDK, mcp-gogo get github.com/mcpspan/mcpspan/packages/mcpspan-go/mcpsdkpackages/mcpspan-go
C# / .NETofficial C# SDKdotnet add package McpSpanpackages/mcpspan-dotnet
Java / Kotlinofficial Java SDKcom.mcpspan:mcpspan-java-sdkpackages/mcpspan-jvm
Rustrmcpcargo add mcpspanpackages/mcpspan-rust
Rubyofficial Ruby SDKgem install mcpspanpackages/mcpspan-ruby
PHPLaravel MCP, official PHP SDKcomposer require mcpspan/mcpspanpackages/mcpspan-php

Every SDK behaves the same way, set out in one contract and checked by one test suite in every language.

Running it

Settings are optional: copy .env.example to .env to change ports, how long data is kept, or the address your MCP servers reach the API at. docs/self-hosting.md covers the rest: the account and password reset, several servers, settings, exports, OpenTelemetry, and backups.

Contributing

See CONTRIBUTING.md.

Licence

MIT. See LICENSE.

Frequently asked questions

What is mcpspan?

Ask your agent about your MCP servers: failing tools, releases, clients, sessions.

How do I install mcpspan?

It runs on your machine. In Claude Code: claude mcp add mcpspan -e 'MCPSPAN_READ_TOKEN=<your mcpspan_read_token>' -e 'MCPSPAN_URL=<MCPSPAN_URL>' -- npx -y mcpspan-mcp@0.12.0. For other clients, paste the JSON configuration from this page into their MCP settings.

Does mcpspan need an API key?

Yes. It expects MCPSPAN_READ_TOKEN, which you set in its configuration.

Is mcpspan open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains mcpspan?

It is published by mcpspan. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.