Skip to main content
Glama

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.txt

Crea el archivo que necesita .env from the ejemplo, y ona tu clave de API de Groq en :

cp .env.example .env
GROQ_API_KEY=replace_with_your_groq_key
GROQ_MODEL=openai/gpt-oss-20b

Nunca hagas commit ni comparts .env; .gitignore lo excluye.

Related MCP server: MCP Python Server - Streamable HTTP

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.py

El punto final de StreamableHTTP ya está disponible`:

http://127.0.0.1:8000/mcp

Manté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.ipynb

Selecciona 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 tools

El 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. ......

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

View all related MCP servers

Related MCP Connectors

  • AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.

  • 16 AI-native tools with dual SSE + streamable-http transport. Free tier available.

  • Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.

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

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