MCP
Local MCP + Groq + OpenAI Agents SDK
Este ejemplo de clase contiene:
app.py: un servidor MCP local y persistente con Streamable HTTP y varias herramientas.mcp_groq_agent.ipynb: un agente que descubre y llama a esas herramientas.
Configuración
Usa Python 3.10 o superior. En una terminal, entra en la carpeta del proyecto, crea un entorno virtual e instala todo lo que necesiten tanto el servidor como el notebook (sustituye python3.11 por tu comando de Python correct si es necesario):
cd /Users/somenathmandal/Documents/transfer/grok-playground/MCP
python3.11 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txtCrea el archivo que necesita .env from the ejemplo, y ona tu clave de API de Groq en :
cp .env.example .envGROQ_API_KEY=replace_with_your_groq_key
GROQ_MODEL=openai/gpt-oss-20bNunca hagas commit ni comparts .env; .gitignore lo excluye.
Related MCP server: mcp-file-system-lmstudio
Ejecuta el servidor MCP
Inicia el servidor MCP en una terminal y déjalo en ejecución:
source .venv/bin/activate
.venv/bin/python app.pyEl punto final de StreamableHTTP ya está disponible`:
http://127.0.0.1:8000/mcpMantén abierta esa terminal. Pulsa Ctrl+C cuando quieras detener el servidor.
Ejecuta el notebook de un agente
Un una segunda terminal:
cd /Users/somenathmandal/Documents/transfer/grok-playground/MCP
source .venv/bin/activate
jupyter lab mcp_groq_agent.ipynbSelecciona el kernel de Python .venv si Jupyter te pide, y luego ejecuta los celdas de arrtiba a abajo. El notebook se conects directly to http://127.0.0.1:8000/mcp; nunca inicia ni importa app.py. La clave de API de Grox se carga desde .env y nunca se almacena en el notebook.
Cómo se conectan los elementos
Notebook agent
-> Groq OpenAI-compatible API (model reasoning and tool selection)
-> http://127.0.0.1:8000/mcp (tool discovery and execution)
-> app.py MCP toolsEl servidor de MCP debe estar en ejecución antes of ejecutar las celdas de conexión MCP. Si el notebook informa de un error de connection, compruébalo primeramente with the server terminal indicates that Uvicorn'a ejecución at http://127.0.0.1:8000.
El notebook también se protege contra variables de entorno de archivo de certificado desactualizadas, fictvamente heredadas de los lanzadores. Compruébalos: Si la ruta referenciada no exists, élmentsonly eliminate. Personal certificate. ......
This server cannot be deployed
Maintenance
Related MCP Connectors
Exposes FEDLIN's public security scanners as agent-callable tools over Streamable HTTP.
Discover, inspect and run 63,000+ agent tools from one balance. Pay per call, no subscriptions.
Discover, compare, route, and execute machine-accessible capabilities for AI agents.
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Related MCP Servers
AlicenseBqualityBmaintenanceExposes Granoflow's local REST API and CLI as tools for AI agents, IDEs, and automation, enabling task and project management via natural language.19121 npmMIT- AlicenseNot gradedqualityCmaintenanceExposes local LM Studio language models as MCP tools, enabling chat completions and model listing through a local OpenAI-compatible API without requiring API keys.MIT
- FlicenseNot gradedqualityCmaintenanceExposes local Python tools via a persistent Streamable HTTP endpoint, allowing an OpenAI Agents SDK notebook to discover and invoke them while using Groq for reasoning and tool selection.-
- FlicenseNot gradedqualityCmaintenanceEnables an agent to discover and call local MCP tools over a Streamable HTTP endpoint using Groq for reasoning and tool selection.-