home / mcp / fastmcp - model context protocol server

FastMCP - Model Context Protocol Server

A lightweight MCP server for creating, querying, and managing model contexts with Datadog metrics support.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ryuichi1208-datadog-mcp-server": {
      "command": "python",
      "args": [
        "mcp_server.py"
      ],
      "env": {
        "DATADOG_SITE": "datadoghq.com (optional)",
        "DATADOG_API_KEY": "YOUR_API_KEY",
        "DATADOG_APP_KEY": "YOUR_APP_KEY (optional)"
      }
    }
  }
}

This MCP server provides a lightweight, Pythonic way to manage model contexts, run queries against contexts, and monitor usage with Datadog. You can create, retrieve, update, delete, and filter contexts by model name or tags, then execute model-related queries efficiently against the selected context.

How to use

You operate the server through an MCP client that communicates with the server using the Model Context Protocol. Use the client to create new contexts, fetch existing ones, update or delete contexts, list contexts with optional filters, and run queries against a specific context. The server exposes a set of tools you can call, such as creating contexts, retrieving them, updating, deleting, listing, and querying models, as well as health checks and runtime configuration.

Typical usage patterns include creating a new context for a specific model and parameters, then running a query against that context to see how the model behaves with those parameters. You can filter lists by model name or tags to focus on a subset of contexts, and you can perform health checks to ensure the server is running properly.

How to install

Prerequisites: you need Python 3.7 or later and a local environment that supports uv for development work. Install and run the server using the following concrete options.

  • Ensure you have Python 3.7+ installed.
  • Install the uv package manager if you will use uv-based workflows.
  • Optionally set up a Datadog account if you want metrics and monitoring.

Install and run directly from a development environment using python and the provided scripts.

# Start from a prepared environment using Python directly
python mcp_server.py

```} ,{

Additional setup and notes

Datadog integration lets you collect metrics like context creation, updates, deletions, queries, and startup/shutdown events. Configure API keys and site as needed to enable monitoring.

Available tools

create_context

Create a new model context with a unique context_id, model_name, and optional data and tags.

get_context

Retrieve a specific model context by its context_id.

update_context

Update an existing context with new data or tags.

delete_context

Delete a context by its context_id.

list_contexts

List all contexts with optional filtering by model name or tags.

query_model

Execute a query against a specific context to evaluate prompts or data.

health_check

Check the server health status.

configure_datadog

Configure Datadog integration at runtime.