Skip to main content
Glama
Uscout07

mcp-tool-observability

by Uscout07

MCP Tool Server + Live Agent Observability Dashboard

A small, production-shaped MVP for demonstrating MCP tool use with real persistence and live tracing.

What is here

  • MCP server — Node/TypeScript using the official @modelcontextprotocol/server SDK.

  • 4 toolscreateTask, queryTasks, updateTask, checkServerHealth.

  • MongoDB — task and trace collections with indexes.

  • Observability API — Express API that reads trace history and accepts trace events from the MCP process.

  • Socket.io — every completed tool call is pushed to connected dashboards immediately.

  • React dashboard — deliberately plain: trace list, filters, timing/status badges, and JSON detail panels.

  • Tests — Vitest tests for task behavior, tracing, HTTP endpoints, and the React shell.

  • Claude wiring — example configuration for Claude Desktop and Claude Code.

Related MCP server: OTEL MCP Server

Runtime shape

Claude Desktop / Claude Code
          |
          | MCP over stdio
          v
  +-------------------+
  |   MCP server      |
  | 4 real tool calls |
  +---------+---------+
            |
       MongoDB task + trace writes
            |
            +----------------------+
            |                      |
            v                      v
  +-------------------+    +-------------------+
  | Observability API | -> | Socket.io clients |
  +-------------------+    +-------------------+
            ^
            |
      React dashboard

The dashboard does not sit in the MCP protocol path. If the dashboard is down, the MCP process can still save the trace to MongoDB. When the dashboard comes back, it reads the persisted trace history. The HTTP notification exists only to make the UI feel live.

Prerequisites

Node.js 20+ is required for the current MCP TypeScript SDK. MongoDB can be local, Atlas, or the included Docker service.

cp .env.example .env
npm install
docker compose up -d mongo

The current MCP TypeScript SDK v2 is the stable line and uses McpServer with registerTool; stdio is the local host transport. See the official SDK docs for the current API.

Run the apps

Terminal 1 — observability API:

npm run dev -w @mcp-observability/observability

Terminal 2 — React dashboard:

npm run dev -w @mcp-observability/dashboard

The dashboard will be at http://localhost:5173 and the observability API at http://localhost:4000.

Terminal 3 — optional standalone MCP process for Inspector:

npm run inspect:mcp

Claude Desktop

Build the MCP server once:

npm run build -w @mcp-observability/core
npm run build -w @mcp-observability/mcp-server

Copy the example in config/claude_desktop.example.json into your Claude Desktop MCP config and replace the absolute path with the path to this repository. Keep OBSERVABILITY_URL pointing at the running observability API.

The MCP process writes protocol traffic to stdout and diagnostics to stderr. Do not add ordinary console.log calls to the MCP process.

Claude Code

Use config/claude_code.example.json as the shape for a project-level .mcp.json. The command can point to the built dist/index.js or use npx tsx during development.

Live demo

  1. Start MongoDB.

  2. Start the observability API.

  3. Start the React dashboard.

  4. Launch Claude Desktop or Claude Code with this MCP server configured.

  5. Ask: Create a high priority task called fix login bug.

  6. Ask: List the open tasks.

  7. Ask: Mark the fix login bug task as in_progress.

  8. Ask: Is the task server healthy?

  9. Keep the dashboard visible. Each tool call appears as a trace, including arguments, status, duration, and result.

Tool contract

createTask

Creates a task in tasks.

{
  "title": "fix login bug",
  "priority": "high"
}

queryTasks

Lists tasks with optional text, status, and priority filters.

{
  "text": "login",
  "status": "open",
  "limit": 25
}

updateTask

Changes a task's title, priority, or status.

{
  "taskId": "...",
  "status": "in_progress"
}

checkServerHealth

Pings MongoDB and returns service health plus latency.

Testing

npm test
npm run typecheck
npm run build

The tests deliberately keep the database boundary injectable so most behavior can run without a real MongoDB instance. For a real integration environment, point MONGODB_URI at a dedicated test database and add a Mongo-backed test stage in CI.

Tradeoffs / next production steps

This is an MVP, not a hosted multi-tenant tracing product. The important boundary is already there: MCP tool execution is instrumented, traces are durable, and the UI consumes a simple event stream. A production system would add authentication, redaction policy, trace correlation across model turns, retention jobs, sampling, rate limiting, pagination cursors, and multi-instance event delivery.

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    MCP server that gives AI agents access to your application's OpenTelemetry traces for querying, analysis, and debugging.
    5
    26
    2
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables querying and analyzing distributed traces from Jaeger, including service discovery, trace inspection, and performance analysis, through MCP tools.
    2
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Local MCP server for decision trace capture and deterministic explanations, providing tools to start, track, and query decision traces, and resources to retrieve trace data.
    13
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for tracing, logging, and debugging multi-agent systems by capturing sessions, spans, and events in a queryable trace tree.
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

  • Agent Replay Debugger MCP — record every agent step + deterministic replay. Step-debugger for

  • Remote MCP for GenAI span mapping, provider normalization, dashboard schemas, and receipts.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Uscout07/mcp-tool-observability'

If you have feedback or need assistance with the MCP directory API, please join our Discord server