# Spanlens MCP server

Source: https://glimind.com/server/mcp-registry%2Fio.github.spanlens%2Fmcp-server
Registry id: `mcp-registry/io.github.spanlens/mcp-server`
Status: unknown

## Install

```json
{
  "mcpServers": {
    "spanlens-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@spanlens/mcp-server"
      ]
    }
  }
}
```

Claude Code:

```sh
claude mcp add spanlens-mcp-server -- npx -y @spanlens/mcp-server
```

## Tools (7)

- `get_anomalies`: Cost / latency / error-rate anomalies the platform has detected. Optional since (observation window) and sigma (sensitivity).
- `get_savings`: Model-swap recommendations with projected monthly savings and adoption status.
- `get_stats`: Aggregate cost, request count, token usage, latency, error rate. Optional groupBy for per-model or per-provider breakdown.
- `get_trace`: Full agent span tree for a trace ID — every LLM/tool/retrieval span with timing, tokens, cost.
- `get_user_analytics`: Per-end-user usage breakdown — total cost, request count, models touched, recent calls.
- `list_traces`: Agent trace summaries (name, status, duration, span count, total tokens, total cost) for discovering trace IDs. Filter by limit, status, since, query.
- `query_requests`: Individual LLM requests with cost, latency, model, error message. Filter by model, provider, status, userId, since, limit.

Measured by Glimind (https://glimind.com): MCP handshake + tool list only, no tool is ever called. CC BY 4.0.
