MCP 概念验证
此存储库包含一个使用FastAPI实现的简单模型上下文协议 (MCP) 服务器。目标是通过可发现的、版本化的 API 公开群体数据,该 API 可部署到 AWS Fargate。
本地运行
- 安装依赖项:数据库路径可以通过
DATABASE_PATH
环境变量配置。如果未设置,则默认为工作目录中的mcp.db
- 为 SQLite 数据库添加种子:
- 启动 API 服务器:
- 调用 API 时使用令牌
fake-super-secret-token
进行身份验证。
MCP 发现文件可在model_context.yaml
中找到。
使用代理
我们提供了一个agent
包来与 MCP 服务器交互。服务器运行后,您可以像这样列出畜群数据:
代理读取model_context.yaml
以发现 API 路径,并返回服务器的 JSON 响应。要获得完整的 YAML 支持,请安装可选的PyYAML
依赖项;否则,将使用功能有限的内置解析器。
运行测试
容器
提供了一个Dockerfile
来在容器中运行服务器。使用以下方式构建:
地形
terraform
目录包含一个最小配置,展示了如何将容器部署到 AWS(例如 Fargate)。它为镜像创建了一个 ECR 存储库。
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
基于 FastAPI 的模型上下文协议服务器,通过可发现的 API 公开群体数据,并具有本地和容器化部署选项。
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 server that enables Large Language Models to discover and interact with REST APIs defined by OpenAPI specifications through the Model Context Protocol.Last updated -37896TypeScriptMIT License
- -securityFlicense-qualityA FastAPI-based implementation of the Model Context Protocol that enables standardized interaction between AI models and development environments, making it easier for developers to integrate and manage AI tasks.Last updated -5PythonMIT License