MCP概念実証
このリポジトリには、 FastAPIで実装されたシンプルな Model Context Protocol (MCP) サーバーが含まれています。AWS Fargate にデプロイ可能な、検出可能でバージョン管理された API を通じて、集団データを公開することが目標です。
ローカルで実行
- 依存関係をインストールします:データベースパスは
DATABASE_PATH
環境変数で設定できます。設定されていない場合は、デフォルトで作業ディレクトリ内のmcp.db
が使用されます。 - SQLite データベースをシードします。
- API サーバーを起動します。
- API を呼び出すときに、トークン
fake-super-secret-token
を使用して認証します。
MCP 検出ファイルはmodel_context.yaml
にあります。
エージェントの使用
MCPサーバーとやり取りするためのagent
パッケージが提供されています。サーバーが起動したら、以下のようにして群れのデータを一覧表示できます。
エージェントはmodel_context.yaml
を読み取り、APIパスを検出し、サーバーからのJSONレスポンスを返します。YAMLを完全にサポートするには、オプションのPyYAML
依存関係をインストールしてください。インストールしない場合は、制限付きの組み込みパーサーが使用されます。
テストの実行
容器
コンテナ内でサーバーを実行するためのDockerfile
が提供されています。以下を使用してビルドします。
テラフォーム
terraform
ディレクトリには、コンテナをAWS(Fargateなど)にデプロイする方法を示す最小限の設定が含まれています。これにより、イメージ用のECRリポジトリが作成されます。
Related MCP Servers
- -securityFlicense-qualityProvides a scalable, containerized infrastructure for deploying and managing Model Context Protocol servers with monitoring, high availability, and secure configurations.Last updated -
- -securityAlicense-qualityA high-performance FastAPI server supporting Model Context Protocol (MCP) for seamless integration with Large Language Models, featuring REST, GraphQL, and WebSocket APIs, along with real-time monitoring and vector search capabilities.Last updated -5PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server implementation that wraps Harvest's REST API, enabling seamless interaction with Harvest's time tracking, client, project, and reporting features through MCP clients.Last updated -3PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server that exposes over 200+ APIs from API.market as MCP resources, allowing large language models to discover and interact with various APIs through natural language commands.Last updated -1112TypeScriptMIT License