Skip to main content
Glama

FastMCP

by ryuichi1208

FastMCP - モデルコンテキストプロトコルサーバー

MCP サーバーおよびクライアントを構築するための高速な Python フレームワークであるFastMCPを使用して実装された軽量の Model Context Protocol (MCP) サーバー。

特徴

  • モデルコンテキストの作成、取得、更新、削除
  • 特定のコンテキストに対するクエリ実行
  • モデル名とタグによるフィルタリング
  • インメモリストレージ(開発用)
  • MCPサーバー開発を容易にするFastMCP統合
  • メトリクスとモニタリングのためのDatadog統合

要件

  • Python 3.7以上
  • ファストMCP
  • uv(環境管理に推奨)
  • Datadog アカウント(オプション、メトリクス用)

インストール

uvの使用(推奨)

インストールする最も簡単な方法は、提供されているスクリプトを使用することです。

Unix/Linux/macOS
# Clone the repository git clone https://github.com/yourusername/datadog-mcp-server.git cd datadog-mcp-server # Make the install script executable chmod +x install.sh # Run the installer ./install.sh
ウィンドウズ
# Clone the repository git clone https://github.com/yourusername/datadog-mcp-server.git cd datadog-mcp-server # Run the installer .\install.ps1

手動インストール

# Clone the repository git clone https://github.com/yourusername/datadog-mcp-server.git cd datadog-mcp-server # Create and activate a virtual environment with uv uv venv # On Unix/Linux/macOS: source .venv/bin/activate # On Windows: .\.venv\Scripts\activate # Install dependencies uv pip install -r requirements.txt

Datadog の設定

サーバーはメトリクスと監視のためにDatadogと統合されています。Datadog APIの認証情報は、以下のいくつかの方法で設定できます。

1. 環境変数

サーバーを起動する前に、次の環境変数を設定します。

# Unix/Linux/macOS export DATADOG_API_KEY=your_api_key export DATADOG_APP_KEY=your_app_key # Optional export DATADOG_SITE=datadoghq.com # Optional, default: datadoghq.com # Windows PowerShell $env:DATADOG_API_KEY = 'your_api_key' $env:DATADOG_APP_KEY = 'your_app_key' # Optional $env:DATADOG_SITE = 'datadoghq.com' # Optional

2. .env ファイル

プロジェクト ディレクトリに.envファイルを作成します。

DATADOG_API_KEY=your_api_key DATADOG_APP_KEY=your_app_key DATADOG_SITE=datadoghq.com

3. FastMCP CLIインストール

Claude デスクトップ ツールとしてインストールする場合は、環境変数を渡すことができます。

fastmcp install mcp_server.py --name "Model Context Server" -v DATADOG_API_KEY=your_api_key

4. ランタイム構成

実行時にconfigure_datadogツールを使用します。

result = await client.call_tool("configure_datadog", { "api_key": "your_api_key", "app_key": "your_app_key", # Optional "site": "datadoghq.com" # Optional })

使用法

サーバーの起動

# Start directly from activated environment python mcp_server.py # Or use uv run (no activation needed) uv run python mcp_server.py # Use FastMCP CLI for development (if in activated environment) fastmcp dev mcp_server.py # Use FastMCP CLI with uv (no activation needed) uv run -m fastmcp dev mcp_server.py

Claudeデスクトップツールとしてインストールする

# From activated environment fastmcp install mcp_server.py --name "Model Context Server" # Using uv directly uv run python -m fastmcp install mcp_server.py --name "Model Context Server" # With Datadog API key fastmcp install mcp_server.py --name "Model Context Server" -v DATADOG_API_KEY=your_api_key

ツールの使用

サーバーは次のツールを提供します。

  • create_context - 新しいコンテキストを作成する
  • get_context - 特定のコンテキストを取得する
  • update_context - 既存のコンテキストを更新する
  • delete_context - コンテキストを削除する
  • list_contexts - すべてのコンテキストを一覧表示します(オプションでフィルタリング可能)
  • query_model - 特定のコンテキストに対してクエリを実行する
  • health_check - サーバーのヘルスチェック
  • configure_datadog - 実行時に Datadog 統合を構成する

リクエストの例

コンテキストの作成

result = await client.call_tool("create_context", { "context_id": "model-123", "model_name": "gpt-3.5", "data": { "parameters": { "temperature": 0.7 } }, "tags": ["production", "nlp"] })

クエリの実行

result = await client.call_tool("query_model", { "context_id": "model-123", "query_data": { "prompt": "Hello, world!" } })

Datadogの設定

result = await client.call_tool("configure_datadog", { "api_key": "your_datadog_api_key", "app_key": "your_datadog_app_key", # Optional "site": "datadoghq.com" # Optional })

Datadog メトリクス

サーバーは Datadog に次のメトリクスを報告します。

  • mcp.contexts.created - コンテキスト作成イベント
  • mcp.contexts.updated - コンテキスト更新イベント
  • mcp.contexts.deleted - コンテキスト削除イベント
  • mcp.contexts.accessed - コンテキスト アクセス イベント
  • mcp.contexts.total - コンテキストの合計数
  • mcp.contexts.listed - コンテキスト操作イベントを一覧表示する
  • mcp.queries.executed - クエリ実行イベント
  • mcp.server.startup - サーバー起動イベント
  • mcp.server.shutdown - サーバーのシャットダウンイベント

発達

クライアントの実装例については、付属のmcp_example.py参照してください。

# Run the example client (with activated environment) python mcp_example.py # Run with uv (no activation needed) uv run python mcp_example.py

ライセンス

マサチューセッツ工科大学

リソース

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

統合された Datadog メトリクスとモニタリングを使用してモデル コンテキストの作成、管理、クエリを可能にする軽量のモデル コンテキスト プロトコル サーバー。

  1. 特徴
    1. 要件
      1. インストール
        1. uvの使用(推奨)
        2. 手動インストール
      2. Datadog の設定
        1. 1. 環境変数
        2. 2. .env ファイル
        3. 3. FastMCP CLIインストール
        4. 4. ランタイム構成
      3. 使用法
        1. サーバーの起動
        2. Claudeデスクトップツールとしてインストールする
        3. ツールの使用
      4. リクエストの例
        1. コンテキストの作成
        2. クエリの実行
        3. Datadogの設定
      5. Datadog メトリクス
        1. 発達
          1. ライセンス
            1. リソース

              Related MCP Servers

              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server built with mcp-framework that allows users to create and manage custom tools for processing data, integrating with the Claude Desktop via CLI.
                Last updated 5 months ago
                48
                4
                TypeScript
                • Apple
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that provides file system operations, analysis, and manipulation capabilities through a standardized tool interface.
                Last updated 7 months ago
                1
                TypeScript
                MIT License
              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server that provides a comprehensive interface for interacting with the ConnectWise Manage API, simplifying API discovery, execution, and management for both developers and AI assistants.
                Last updated 4 months ago
                46
                2
                Python
                • Linux
                • Apple
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server for data wrangling that provides standardized interfaces for data preprocessing, transformation, and analysis tasks including data aggregation and descriptive statistics.
                Last updated 4 months ago
                1
                Python
                MIT License
                • Linux
                • Apple

              View all related MCP servers

              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/ryuichi1208/datadog-mcp-server'

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