Skip to main content
Glama

MCP Server

by DPoitrast

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中找到。

使用代理

我们提供了一个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

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

基于 FastAPI 的模型上下文协议服务器,通过可发现的 API 公开群体数据,并具有本地和容器化部署选项。

  1. 本地运行
    1. 使用代理
      1. 运行测试
        1. 容器
          1. 地形

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              Provides a scalable, containerized infrastructure for deploying and managing Model Context Protocol servers with monitoring, high availability, and secure configurations.
              Last updated -
            • -
              security
              A
              license
              -
              quality
              A 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 -
              5
              Python
              MIT License
            • -
              security
              A
              license
              -
              quality
              A server that enables Large Language Models to discover and interact with REST APIs defined by OpenAPI specifications through the Model Context Protocol.
              Last updated -
              378
              96
              TypeScript
              MIT License
              • Apple
            • -
              security
              F
              license
              -
              quality
              A 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 -
              5
              Python
              MIT License

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

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