Skip to main content
Glama
vadimsey

ChatGPT Orchestrator MCP Server

by vadimsey

Servidor MCP del Orquestador de ChatGPT

Un servidor MCP remoto mínimo en Python para el esquema:

ChatGPT -> MCP server -> main orchestrator -> helper agents

En la primera etapa, el servidor contiene una herramienta:

  • run_orchestrator

  • entrada: goal: string

  • salida: JSON simple

Actualmente, contiene un stub. Más adelante, puede reemplazarlo con la llamada a su agente principal real.

Por qué FastMCP

Se eligió FastMCP porque permite describir una herramienta MCP con una función de Python normal y ejecutar inmediatamente un endpoint MCP remoto a través de HTTP. Para conectarse a ChatGPT, se necesita un endpoint HTTPS público del tipo /mcp.

Related MCP server: impart-mcp

Estructura del proyecto

.
├── .gitignore
├── server.py
├── requirements.txt
├── Procfile
├── render.yaml
└── README.md

Ejecución local

Requisitos:

  • Python 3.11+

  • pip

1. Crear un entorno virtual

PowerShell:

python -m venv .venv
.\.venv\Scripts\Activate.ps1

Si en Windows el comando python abre la Microsoft Store o no muestra la versión, utilice:

py -3.11 -m venv .venv
.\.venv\Scripts\Activate.ps1

macOS/Linux:

python3 -m venv .venv
source .venv/bin/activate

2. Instalar dependencias

pip install -r requirements.txt

3. Iniciar el servidor

python server.py

Endpoint MCP local:

http://localhost:8000/mcp

Verificación básica de que el servidor está activo:

http://localhost:8000/health

Si el cliente solicita un endpoint con una barra diagonal al final, utilice:

http://localhost:8000/mcp/

Verificación local

Deje python server.py ejecutándose. En una segunda terminal, ejecute:

Invoke-RestMethod http://localhost:8000/health

Respuesta esperada:

{
  "status": "ok"
}

Importante: si abre http://localhost:8000/mcp en el navegador o lo consulta con un curl normal sin encabezados MCP, es posible que vea un error:

{
  "error": {
    "message": "Not Acceptable: Client must accept text/event-stream"
  }
}

Esto es normal para un endpoint MCP. Verifique /health con un navegador normal y /mcp con un cliente 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

Significado esperado de la respuesta: el servidor mostrará la herramienta run_orchestrator y devolverá un JSON indicando que el stub ha recibido la tarea.

También puede verificarlo a través del Inspector MCP:

npx @modelcontextprotocol/inspector

En la interfaz, seleccione el transporte Streamable HTTP y la URL:

http://localhost:8000/mcp

Despliegue en Render

Opción a través de GitHub

  1. Cree un nuevo repositorio en GitHub.

  2. Suba estos archivos allí.

  3. Abra Render.

  4. Haga clic en New -> Web Service.

  5. Conecte el repositorio de GitHub.

  6. Render normalmente leerá render.yaml automáticamente.

  7. Si lo configura manualmente:

    • Runtime: Python

    • Build Command: pip install -r requirements.txt

    • Start Command: python server.py

  8. Haga clic en Deploy.

Después del despliegue, Render proporcionará una URL similar a esta:

https://chatgpt-orchestrator-mcp.onrender.com

El endpoint MCP de producción será:

https://chatgpt-orchestrator-mcp.onrender.com/mcp

Endpoint de salud de producción para verificar en el navegador:

https://chatgpt-orchestrator-mcp.onrender.com/health

Esta es la URL que debe insertar en ChatGPT.

Cómo conectar a ChatGPT

  1. Abra ChatGPT en el navegador.

  2. Vaya a Settings.

  3. Abra Apps & Connectors o Connectors.

  4. Active el Developer Mode si aún no está activado:

    • Advanced settings

    • Developer mode

  5. Haga clic en Create o Create connector.

  6. Complete los campos:

    • Name: Orchestrator

    • Description: Runs my main orchestrator agent through MCP.

    • Connector URL: https://YOUR-RENDER-SERVICE.onrender.com/mcp

  7. Guarde.

  8. En un nuevo chat, seleccione este conector/herramienta y pídale a ChatGPT que llame al orquestador.

Ejemplo de solicitud de prueba en ChatGPT

Используй Orchestrator и вызови run_orchestrator с goal:
"Составь пошаговый план запуска MVP моего продукта"

La respuesta esperada de la herramienta ahora será aproximadamente:

{
  "status": "ok",
  "message": "Stub orchestrator accepted the goal.",
  "goal": "Составь пошаговый план запуска MVP моего продукта",
  "next_step": "Replace call_real_orchestrator() in server.py with your real agent call."
}

Dónde reemplazar el stub por el agente real

Abra server.py y busque la función:

def call_real_orchestrator(goal: str) -> dict[str, Any]:

Actualmente devuelve un JSON de prueba. Más adelante, reemplace su cuerpo con la llamada real a su agente principal.

Ejemplo de reemplazo futuro:

def call_real_orchestrator(goal: str) -> dict[str, Any]:
    result = my_main_agent.run(goal)
    return {
        "status": "ok",
        "goal": goal,
        "result": result,
    }

Importante: no cree un servidor MCP separado para cada agente auxiliar en la primera etapa. Deje que ChatGPT vea solo una herramienta run_orchestrator, y que su agente principal decida internamente a qué auxiliares llamar.

URLs finales

Localmente:

http://localhost:8000/mcp

Plantilla de URL de producción:

https://YOUR-RENDER-SERVICE.onrender.com/mcp

URL para ChatGPT:

https://YOUR-RENDER-SERVICE.onrender.com/mcp

Documentos oficiales útiles

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.

Maintenance

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

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

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