Skip to main content
Glama

MCP 概念验证

此存储库包含一个使用FastAPI实现的简单模型上下文协议 (MCP) 服务器。目标是通过可发现的、版本化的 API 公开群体数据,该 API 可部署到 AWS Fargate。

本地运行

  1. 安装依赖项:

    数据库路径可以通过DATABASE_PATH环境变量配置。如果未设置,则默认为工作目录中的mcp.db

    pip install -r requirements.txt
  2. 为 SQLite 数据库添加种子:

    python -m app.seed
  3. 启动 API 服务器:

    uvicorn app.main:app --reload
  4. 调用 API 时使用令牌fake-super-secret-token进行身份验证。

MCP 发现文件可在model_context.yaml中找到。

Related MCP server: MyAIServ MCP Server

使用代理

我们提供了一个agent包来与 MCP 服务器交互。服务器运行后,您可以像这样列出畜群数据:

python -m agent http://localhost:8000 --token fake-super-secret-token

代理读取model_context.yaml以发现 API 路径,并返回服务器的 JSON 响应。要获得完整的 YAML 支持,请安装可选的PyYAML依赖项;否则,将使用功能有限的内置解析器。

运行测试

pytest -q

容器

提供了一个Dockerfile来在容器中运行服务器。使用以下方式构建:

docker build -t mcp .

地形

terraform目录包含一个最小配置,展示了如何将容器部署到 AWS(例如 Fargate)。它为镜像创建了一个 ECR 存储库。

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

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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/DPoitrast/MCP'

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