Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

An MCP server that demonstrates comprehensive observability with Sentry, OpenTelemetry, and Braintrust, providing tools for file, data, and HTTP operations along with real-time status and configuration resources.

README.md

MCP Observability Server

A Model Context Protocol (MCP) server that demonstrates how to incorporate comprehensive observability into MCP servers using Sentry, OpenTelemetry, and Braintrust.

Features

🔧 Tools

  • File Operations: Read files, write files, list directories
  • Data Processing: JSON manipulation, data transformation
  • HTTP Client: URL fetching, webhooks, health checks

📊 Resources

  • Server Status: Real-time server metrics and performance data
  • Configuration: Server and observability configuration details
  • Health Check: Service health monitoring endpoint

📈 Observability Stack

Sentry

  • Error tracking and performance monitoring
  • Automatic breadcrumb collection
  • User context and custom tags
  • Transaction performance tracking

OpenTelemetry

  • Distributed tracing with Jaeger export
  • Custom metrics with Prometheus export
  • Automatic instrumentation of Node.js libraries
  • Custom spans for tool executions

Braintrust

  • AI/ML model evaluation and logging
  • Tool execution tracking
  • Performance analytics
  • Experiment management

Quick Start

1. Installation

npm install

2. Configuration

Copy the example environment file: ``bash cp .env.example .env ``

Edit .env with your configuration: ```bash

Sentry (optional)

SENTRY_DSN=your_sentry_dsn_here SENTRY_ENVIRONMENT=development

Braintrust (optional)

BRAINTRUST_API_KEY=your_braintrust_api_key_here BRAINTRUST_PROJECT_NAME=mcp-observability

OpenTelemetry (configured by default)

OTEL_SERVICE_NAME=mcp-observability-server OTEL_EXPORTER_JAEGER_ENDPOINT=http://localhost:14268/api/traces ```

3. Build and Run

# Development mode
npm run dev

# Production mode
npm run build
npm start

Using with Claude Desktop

Add to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "observability-server": {
      "command": "node",
      "args": ["/path/to/mcp-observability-server/dist/index.js"]
    }
  }
}

Observability Setup

Sentry Setup

  1. Create a Sentry project at sentry.io
  2. Copy your DSN to the SENTRY_DSN environment variable
  3. The server will automatically track errors and performance

OpenTelemetry + Jaeger Setup

  1. Run Jaeger locally:
docker run -d --name jaeger \
  -p 16686:16686 \
  -p 14268:14268 \
  jaegertracing/all-in-one:latest
  1. Access Jaeger UI at http://localhost:16686
  2. Traces will be automatically exported

Braintrust Setup

  1. Sign up at braintrust.dev
  2. Get your API key and project name
  3. Set the environment variables
  4. Tool executions will be logged for analysis

Example Usage

Using Tools

// Read a file
{
  "tool": "read_file",
  "arguments": {
    "path": "/path/to/file.txt",
    "encoding": "utf8"
  }
}

// Process JSON data
{
  "tool": "process_json", 
  "arguments": {
    "data": "{\"users\": [{\"name\": \"Alice\"}, {\"name\": \"Bob\"}]}",
    "operation": "extract_keys",
    "path": "users"
  }
}

// Fetch URL
{
  "tool": "fetch_url",
  "arguments": {
    "url": "https://api.github.com/users/octocat",
    "method": "GET"
  }
}

Accessing Resources

// Get server status
{
  "resource": "status://server"
}

// Health check
{
  "resource": "status://health"
}

// Configuration
{
  "resource": "config://server"
}

Architecture

src/
├── observability/          # Observability integrations
│   ├── sentry.ts          # Sentry error tracking
│   ├── opentelemetry.ts   # OpenTelemetry tracing
│   ├── braintrust.ts      # Braintrust logging
│   └── index.ts           # Unified observability wrapper
├── tools/                 # MCP tools
│   ├── fileOperations.ts  # File I/O tools
│   ├── dataProcessing.ts  # Data manipulation tools
│   ├── httpClient.ts      # HTTP client tools
│   └── index.ts           # Tool registry
├── resources/             # MCP resources  
│   ├── status.ts          # Server status resource
│   ├── config.ts          # Configuration resource
│   └── index.ts           # Resource registry
└── index.ts               # Main server entry point

Key Observability Features

1. Automatic Tool Wrapping

All tools are automatically wrapped with the withObservability decorator that:

  • Creates OpenTelemetry spans
  • Starts Sentry transactions
  • Logs to Braintrust
  • Records performance metrics

2. Error Handling

  • Automatic error capture in Sentry with context
  • Error spans in OpenTelemetry traces
  • Failed execution logging in Braintrust

3. Performance Monitoring

  • Response time tracking
  • Memory usage monitoring
  • Request success/failure rates
  • Custom metrics via OpenTelemetry

4. Distributed Tracing

  • End-to-end request tracing
  • Tool execution spans
  • External API call tracing
  • Performance bottleneck identification

Development

# Type checking
npm run typecheck

# Linting  
npm run lint

# Testing
npm test

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Developer Tools servers.