Skip to main content
Glama

MCP 代理平台

一个使用 Python 构建的模块化模型上下文协议 (MCP) 代理平台。

该项目允许由 LLM 驱动的代理同时使用本地工具和外部 MCP 服务器暴露的工具。它提供 MCP 服务器管理、动态工具发现、工具注册、工具执行和多步骤工具调用。


🚀 项目概览

MCP 代理平台充当 LLM 与多个工具之间的桥梁。

代理可以:

  • 注册本地 Python 工具

  • 连接到外部 MCP 服务器

  • 从 MCP 服务器动态发现工具

  • 将 MCP 工具转换为与 OpenAI 兼容的函数模式

  • 允许 LLM 决定使用哪个工具

  • 执行选定的工具

  • 将工具结果发送回 LLM 上下文

  • 在需要时顺序执行多个工具

  • 返回最终的自然语言响应

  • 通过 REST API 管理 MCP 服务器连接

  • 通过 Streamable HTTP 暴露 MCP 服务器


Related MCP server: MCP-NG

🏗️ 架构

                         ┌──────────────────────┐
                         │        User          │
                         └──────────┬───────────┘
                                    │
                                    ▼
                         ┌──────────────────────┐
                         │      Agent / LLM     │
                         │    OpenAI API        │
                         └──────────┬───────────┘
                                    │
                         Tool selection
                                    │
                                    ▼
                         ┌──────────────────────┐
                         │    Tool Registry     │
                         └──────────┬───────────┘
                                    │
                  ┌─────────────────┴─────────────────┐
                  │                                   │
                  ▼                                   ▼
        ┌───────────────────┐              ┌───────────────────┐
        │   Local Tools     │              │    MCP Tools      │
        │                   │              │                   │
        │ get_weather       │              │ External MCP      │
        │ get_datetime      │              │ Servers            │
        └─────────┬─────────┘              └─────────┬─────────┘
                  │                                   │
                  │                                   ▼
                  │                         ┌──────────────────┐
                  │                         │   MCP Manager    │
                  │                         └────────┬─────────┘
                  │                                  │
                  │                                  ▼
                  │                         ┌──────────────────┐
                  │                         │  MCP Server(s)   │
                  │                         │ Streamable HTTP  │
                  │                         └────────┬─────────┘
                  │                                  │
                  └──────────────────┬───────────────┘
                                     │
                                     ▼
                              Tool Result
                                     │
                                     ▼
                                  LLM
                                     │
                                     ▼
                              Final Response

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    A high-performance Go-based MCP server that provides a microservice architecture for orchestrating diverse tools through gRPC and HTTP/REST APIs. Enables seamless integration of language-agnostic tools including ML capabilities, web search, calculations, and human interaction for intelligent agent workflows.
    2
    -