Enables configuration management through environment variables, allowing customization of the MCP server's behavior
Provides the API backend for the MCP server, allowing HTTP-based interactions with the system's microservices
Supports Jupyter notebook execution within the MCP environment, allowing notebook-based workflows for AI applications
モデルコンテキストプロトコル(MCP)
概要
MCPは、LLMプロンプト、Jupyterノートブック、PythonスクリプトなどのAIモデルコンテキストを管理、実行、監視するためのモジュール式フレームワークです。FastAPIバックエンドとStreamlitダッシュボードフロントエンドを提供します。
特徴
- さまざまな種類の MCP(LLM プロンプト、ノートブック、スクリプト)を登録および管理します。
- MCP を実行し、結果を Web UI で表示する
- サーバーの健全性と統計を監視する
- 新しいMCPタイプに拡張可能
設定
前提条件
- Python 3.9以上
- (推奨)仮想環境を作成してアクティブ化する
依存関係をインストールする
環境変数
- API 認証用に
MCP_API_KEY
を設定する (オプション、デフォルトが提供される) - LLMの場合、Claudeを使用する場合は
ANTHROPIC_API_KEY
を設定します。
バックエンドを起動する
フロントエンドを起動する
使用法
- http://localhost:8501でダッシュボードにアクセスします。
- UI から MCP を作成、管理、テストする
- サイドバーからヘルスと統計を監視する
新しいMCPの追加
mcp/core/
に新しい MCP クラスを実装します。- バックエンドに登録する
mcp/ui/app.py
に UI サポートを追加する
テストの実行
プロジェクト構造
mcp/api/
- FastAPI バックエンドmcp/ui/
- Streamlit フロントエンドmcp/core/
- コアMCP型とロジックtests/
- テストスイート
ライセンス
マサチューセッツ工科大学
APIドキュメント
サーバーが起動したら、次のものにアクセスできるようになります。
- APIドキュメント: http://localhost:8000/docs
- Prometheus メトリクス: http://localhost:8000/metrics
- ヘルスチェック: http://localhost:8000/health
- 統計: http://localhost:8000/stats
安全
- すべてのエンドポイントにAPIキー認証が必要です
- レート制限はデフォルトで有効になっています
- CORSは特定のオリジンのみを許可するように設定されている
- すべての機密構成は環境変数を通じて管理されます
監視
サーバーには以下が含まれます。
- リクエスト数、レイテンシ、サーバー実行に関する Prometheus メトリック
- 構造化されたJSONログ
- ヘルスチェックエンドポイント
- サーバー統計エンドポイント
貢献
- リポジトリをフォークする
- 機能ブランチを作成する
- 変更をコミットする
- ブランチにプッシュする
- プルリクエストを作成する
ノートブックとLLM統合のための追加の依存関係
このプロジェクトでは、次の追加の Python パッケージが必要になります。
- パンダ
- ナンピー
- マットプロットライブラリ
- 製紙工場
- nbフォーマット
- ジュピター
- 人類学的
次のコマンドですべての依存関係をインストールします。
ノートブック MCP を使用して LLM を呼び出す (Claude)
サンプルノートブック ( mcp/notebooks/example.ipynb
) は次のことを示します。
- データ分析とプロット
- Claude LLMを
anthropic
Pythonパッケージ経由で呼び出す
LLM セルを使用するには、環境または.env
ファイルでANTHROPIC_API_KEY
が設定されていることを確認してください。
LLM のノートブック セルは次のようになります。
This server cannot be installed
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.
LLM インタラクション、Jupyter ノートブック実行、ビジュアル ワークフロー機能を備え、マイクロサービスを通じて AI アプリケーションを構築およびオーケストレーションするためのモジュール システムです。
Related MCP Servers
- -securityFlicense-qualityEnables AI agent and task management using the CrewAI framework, allowing users to create and run agents and tasks in an automated workflow environment.Last updated -03JavaScript
- -securityAlicense-qualityA lightweight, modular API service that provides useful tools like weather, date/time, calculator, search, email, and task management through a RESTful interface, designed for integration with AI agents and automated workflows.Last updated -PythonMIT License
- -securityAlicense-qualityAn MCP server that enables AI agents to interact with Modal, allowing them to deploy apps and run functions in a serverless cloud environment.Last updated -PythonMIT License
- -securityFlicense-qualityA lightweight Python-based server designed to run, manage and create CrewAI workflows using the Model Context Protocol for communicating with LLMs and tools like Claude Desktop or Cursor IDE.Last updated -1Python