Skip to main content
Glama
ahmetacn

HoPe Chatbot MCP Server

by ahmetacn

HoPe Chatbot MCP Server

使用 FastMCP v3。

出于代码组织的考虑,MCP 功能被拆分为多个逻辑模块,即 MCP 子服务器。

主 MCP 服务器可以导入/挂载子域 MCP 服务器(mcp_server/app.py)。

开发

将你的能力拆分成可组合的 MCP 服务器。

定义新的 MCP 工具、资源、提示词... 用于 <some> 领域 用于 <some> 业务能力 在 <some> MCP 子服务器中 在 mcp_server/servers/<some>/mcp.py 中。

公开 MCP 服务器能力

决定你希望你的 MCP 工具、资源、提示词... 以何种方式可用:

  • 在一个组合式 MCP 服务器(一体化)中 🌐

  • 仅作为独立的 MCP 服务器 🔒🪪

  • 两者兼有 ✨

一体化 MCP 服务器

将子域 MCP 服务器包含到组合式 MCP 服务器中。

mcp_server/app.py 中按以下步骤操作:

  • 导入你的 FastMCP 应用

    from mcp_server.servers.some import some_mcp
  • 找到已定义的主 MCP 服务器,在主 MCP 服务器的启动/初始化生命周期阶段,将你的 MCP 服务器的能力添加到主 MCP 服务器中

    async def setup(app: FastMCP):
        # Import or mount subservers
    
        app.mount(some_mcp)  # dynamic mount
        # await app.import_server(some_mcp)  # static copy
    
    
    @contextlib.asynccontextmanager
    async def lifespan(app: FastMCP):
        # Setup
        await setup(app)
        yield
        # Cleanup
    
    main_mcp = FastMCP(
        name="home-of-performance-mcp-server",
        lifespan=lifespan
    )
    
  • 主组合式 MCP 服务器在 BASE_URL/mcp 处包含你的 MCP 服务器的能力。

    对于主组合式 MCP 服务器,以下所有运行场景均应成立:

    • mcp_server/app.py 作为模块运行

      • FastMCP.run 方法

    • mcp_server/app.py 通过 uvicorn 运行

      • FastMCP.http_app

        • 将你的 MCP 服务器的 ASGI 应用挂载到 FastAPI 应用,uvicorn 访问 FastAPI 的 ASGI 应用

        • (uvicorn 直接访问 FastMCP 的 ASGI 应用也可正常工作)

独立的 MCP 服务器

公开独立的子域 MCP 服务器。

mcp_server/app.py 中按以下步骤操作:

  • 导入你的 FastMCP 应用

    from mcp_server.servers.some import some_mcp
  • 从你的 FastMCP 应用创建 ASGI 应用

    (无需重新定义 path="/mcp" 关键字参数)

    some_mcp_app = some_mcp.http_app()
  • 将你的 FastMCP 应用的生命周期添加到 FastAPI 应用使用的组合生命周期中

    @contextlib.asynccontextmanager
    async def combined_lifespan(app: FastAPI):
        """Combine lifespans for FastAPI app"""
        # Run all lifespans
        async with main_mcp_app.lifespan(app):
            async with some_mcp_app.lifespan(app):
                # Setup
                yield
                # Cleanup
    
    fastapi_app = FastAPI(
        title="Home of Performance MCP",
        lifespan=combined_lifespan
    )
  • 将你的 MCP 服务器的 ASGI 应用挂载到 FastAPI 应用的 /some 路径下

    fastapi_app.mount("/some", some_mcp_app)
    
  • BASE_URL/some/mcp 处找到你的独立 MCP 服务器

Related MCP server: Golf

本地运行

  • 根据 .env.template.env 中定义环境变量(不要提交密钥)

  • 通过 requirements.txt 安装必需的 Python 包

  • 通过 run 方法启动 FastMCP 应用

    python -m mcp_server.app

    或者通过 gunicorn、uvicorn 等运行挂载了 MCP 服务器的 FastAPI 应用:

    source .venv/bin/activate && uvicorn src.app:app --host 0.0.0.0 --port 8000 --reload

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables dynamic loading, hot-reloading, and orchestration of MCP servers without restarting Claude Code, allowing programmatic tool calling and workflow automation across multiple servers.
    2
  • A
    license
    Not graded
    quality
    C
    maintenance
    Easiest framework for building MCP servers with automatic discovery of tools, prompts, and resources, plus enterprise-grade authentication and telemetry.
    837
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables building MCP servers with embedded reasoning, allowing complex tasks to be offloaded to an internal LLM for token and cost efficiency.
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Aggregates multiple MCP servers into a single endpoint, enabling LLM clients to access tools, resources, and prompts from various backends through one connection.
    15
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

  • MCP Hub: AI service discovery, per-user OAuth, and multi-service workflow orchestration

View all MCP Connectors

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/ahmetacn/axis-chart-mcp'

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