mcp-demo-server-otel

mcp-demo-server-otel

3.4

Demonstration of a Remote MCP server instrumented with OpenTelemetry tracing and sending traces to Datadog.

The MCP OpenTelemetry Server Demo is a demonstration project that showcases the integration of a Remote Model Context Protocol (MCP) server with OpenTelemetry tracing. This setup allows for the collection and transmission of trace data to Datadog, providing a comprehensive view of the server's interactions with backend APIs or databases. The project includes a lightweight OpenTelemetry collector using the 'rotel' library, and it is designed to be easily deployable on platforms like Render. The server is capable of pushing trace spans to Datadog, utilizing early experimental support from 'rotel', and can pull the latest weather forecast from a configurable backend API. This setup is particularly useful for developers and system administrators who need to monitor and understand the availability and performance of their MCP servers.

Features

  • Bundles a lightweight OpenTelemetry collector using rotel
  • Scripts that deploy to Render
  • Pushes trace spans to Datadog
  • Pulls the latest weather forecast from a configurable backend API

Usage with Different Platforms

Render

bash
1. Clone repo
2. Setup a new webservice in Render using the repo fork
3. Set the following Render properties:
   - Build script: ./scripts/render-build.sh
   - Run script: ./scripts/render-start.sh
4. Set the following environment variables:
   - DATADOG_API_KEY: Your Datadog API key
   - DATADOG_REGION: defaults to us1, options: us3, us5, eu, ap1
   - WEATHER_API: API endpoint of an API returning weather forecast given a zipcode
5. Deploy!