ChatGPT Orchestrator MCP Server
ChatGPT Orchestrator MCP Server
用于以下架构的 Python 最小化远程 MCP 服务器:
ChatGPT -> MCP server -> main orchestrator -> helper agents在第一阶段,服务器包含一个工具:
run_orchestrator输入:
goal: string输出:简单的 JSON
目前内部是一个存根。稍后可以将其替换为您实际的主代理调用。
为什么选择 FastMCP
选择 FastMCP 是因为它允许使用普通的 Python 函数描述 MCP 工具,并立即通过 HTTP 启动远程 MCP 端点。要连接到 ChatGPT,需要一个类似 /mcp 的公共 HTTPS 端点。
Related MCP server: impart-mcp
项目结构
.
├── .gitignore
├── server.py
├── requirements.txt
├── Procfile
├── render.yaml
└── README.md本地运行
要求:
Python 3.11+
pip
1. 创建虚拟环境
PowerShell:
python -m venv .venv
.\.venv\Scripts\Activate.ps1如果 Windows 上的 python 命令打开 Microsoft Store 或未显示版本,请使用:
py -3.11 -m venv .venv
.\.venv\Scripts\Activate.ps1macOS/Linux:
python3 -m venv .venv
source .venv/bin/activate2. 安装依赖
pip install -r requirements.txt3. 启动服务器
python server.py本地 MCP 端点:
http://localhost:8000/mcp检查服务器是否存活的常规检查:
http://localhost:8000/health如果客户端要求末尾带有斜杠的端点,请使用:
http://localhost:8000/mcp/本地测试
保持 python server.py 运行。在第二个终端中执行:
Invoke-RestMethod http://localhost:8000/health预期响应:
{
"status": "ok"
}重要提示:如果在浏览器中打开 http://localhost:8000/mcp 或在没有 MCP 标头的情况下使用常规 curl 请求它,可能会看到错误:
{
"error": {
"message": "Not Acceptable: Client must accept text/event-stream"
}
}这对于 MCP 端点是正常的。请使用常规浏览器检查 /health,并使用 MCP 客户端检查 /mcp。
@'
import asyncio
from fastmcp import Client
async def main():
async with Client("http://localhost:8000/mcp") as client:
tools = await client.list_tools()
print("TOOLS:")
for tool in tools:
print("-", tool.name)
result = await client.call_tool(
"run_orchestrator",
{"goal": "Create an MVP launch plan"}
)
print("RESULT:")
print(result)
asyncio.run(main())
'@ | python预期的响应含义:服务器将显示 run_orchestrator 工具,并返回一个包含存根已接收任务文本的 JSON。
也可以通过 MCP Inspector 进行检查:
npx @modelcontextprotocol/inspector在 UI 中选择传输方式 Streamable HTTP 和 URL:
http://localhost:8000/mcp部署到 Render
通过 GitHub 部署
创建一个新的 GitHub 仓库。
将这些文件上传到那里。
打开 Render。
点击
New->Web Service。连接 GitHub 仓库。
Render 通常会自动读取
render.yaml。如果手动配置:
Runtime:
PythonBuild Command:
pip install -r requirements.txtStart Command:
python server.py
点击
Deploy。
部署后,Render 将提供类似以下的 URL:
https://chatgpt-orchestrator-mcp.onrender.com生产环境 MCP 端点将是:
https://chatgpt-orchestrator-mcp.onrender.com/mcp用于浏览器检查的生产环境健康检查端点:
https://chatgpt-orchestrator-mcp.onrender.com/health正是这个 URL 需要填入 ChatGPT。
如何连接到 ChatGPT
在浏览器中打开 ChatGPT。
进入
Settings。打开
Apps & Connectors或Connectors。如果尚未开启,请启用 Developer Mode:
Advanced settingsDeveloper mode
点击
Create或Create connector。填写:
Name:
OrchestratorDescription:
Runs my main orchestrator agent through MCP.Connector URL:
https://YOUR-RENDER-SERVICE.onrender.com/mcp
保存。
在新聊天中选择此 connector/tool 并要求 ChatGPT 调用编排器。
ChatGPT 中的测试请求示例
Используй Orchestrator и вызови run_orchestrator с goal:
"Составь пошаговый план запуска MVP моего продукта"工具目前的预期响应大约是:
{
"status": "ok",
"message": "Stub orchestrator accepted the goal.",
"goal": "Составь пошаговый план запуска MVP моего продукта",
"next_step": "Replace call_real_orchestrator() in server.py with your real agent call."
}在何处将存根替换为真实代理
打开 server.py 并找到函数:
def call_real_orchestrator(goal: str) -> dict[str, Any]:目前它返回测试 JSON。稍后将其主体替换为您主代理的实际调用。
未来替换示例:
def call_real_orchestrator(goal: str) -> dict[str, Any]:
result = my_main_agent.run(goal)
return {
"status": "ok",
"goal": goal,
"result": result,
}重要提示:在第一阶段,不要为每个辅助代理创建单独的 MCP 服务器。让 ChatGPT 只看到一个 run_orchestrator 工具,而由您内部的主代理决定调用哪些辅助代理。
最终 URL
本地:
http://localhost:8000/mcp生产环境 URL 模板:
https://YOUR-RENDER-SERVICE.onrender.com/mcpChatGPT 使用的 URL:
https://YOUR-RENDER-SERVICE.onrender.com/mcp有用的官方文档
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
LLM Orchestration Agent (Mcp)
Hosted MCP runtime where the agent is the operator: sign up by tool call, publish your own tools.
MCP-Native LLM Orchestration Agent
Discover and call AI agents via MCP. Supports A2A agents and platform agents with async tasks.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP-based tool orchestrator that exposes a single execute_task tool to Claude while internally managing 100+ tools through hierarchical navigation with a cheaper LLM, preventing context overflow from loading all tool definitions.MIT
- AlicenseAqualityDmaintenanceAn agent orchestration layer that wraps expert agents as MCP tools, enabling integration with Claude Desktop, Cursor, and other MCP-compatible environments.4179MIT
- FlicenseNot gradedqualityCmaintenanceEnables LLM-powered agents to securely communicate with and orchestrate downstream microservices via FastAPI endpoints exposed as MCP tools.-
- AlicenseNot gradedqualityBmaintenanceEnables multi-model leader-worker agent orchestration, workflow execution, and deterministic validation via structured MCP tools.16Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/vadimsey/MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server