MCP Streamable HTTP Demo
Demo de HTTP Streamable para MCP TP5
Este proyecto recrea el objetivo de la demo:
Servidor MCP que expone dos herramientas.
Prueba con
@modelcontextprotocol/inspector.Agente compatible con LangChain/LangGraph que utiliza MCP a través de HTTP Streamable.
Configuración de agente de IA en n8n utilizando MCP a través de HTTP Streamable.
Nota importante de seguridad
La clave de OpenAI pegada en el prompt fue expuesta en el chat. Revóquela y cree una nueva clave antes de ejecutar el agente. Coloque la nueva clave en .env; no la suba al repositorio.
Related MCP server: SampleMCP
Configuración
Copy-Item .env.example .env
npm installEdite .env y establezca:
OPENAI_API_KEY=your_new_keyIniciar el servidor MCP
npm run serverEl endpoint de MCP es:
http://127.0.0.1:3000/mcpEl endpoint de estado (health) es:
http://127.0.0.1:3000/healthPrueba con el Inspector MCP
En una terminal, mantenga el servidor en ejecución:
npm run serverEn otra terminal, enumere las herramientas con la CLI del Inspector:
npm run inspector:list-toolsEn Windows, la CLI actual del Inspector puede imprimir la respuesta JSON correcta y luego cerrarse con una aserción de Node/libuv. Si ve el JSON de tools que contiene calculate y text_stats, la llamada MCP en sí tuvo éxito.
Llame a una herramienta con la CLI del Inspector:
npx --yes @modelcontextprotocol/inspector --cli http://127.0.0.1:3000/mcp --transport http --method tools/call --tool-name calculate --tool-arg operation=add --tool-arg "numbers=[2,3,4]"También puede abrir la interfaz de usuario del Inspector:
npm run inspectorLuego seleccione:
Transport: Streamable HTTP
URL: http://127.0.0.1:3000/mcpPrueba de humo local
npm run smokeEsto enumera las herramientas MCP y llama a calculate.
Agente de LangChain
Asegúrese de que el servidor esté en ejecución y que .env contenga una OPENAI_API_KEY válida y rotada.
npm run agentPrompt personalizado:
npm run agent -- "Calcule 42 / 6 puis analyse le texte: Bonjour depuis MCP."Agente de n8n
Siga docs/n8n-agent.md.
La configuración de la herramienta de cliente MCP de n8n es:
Endpoint: http://127.0.0.1:3000/mcp
Server Transport: HTTP Streamable
Authentication: None
Tools to Include: AllThis server cannot be deployed
Maintenance
Related MCP Connectors
Open-source Zapier/n8n alternative as an MCP server: agents build, run and debug your workflows.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Python-based MCP server demonstrating basic math and text tools, supporting both SSE and STDIO transports for integration with AI assistants like Cline in VS Code.-
- FlicenseNot gradedqualityDmaintenanceA demonstration MCP server that provides math (add/multiply) and weather tools, connecting via stdio and streamable HTTP, and integrates with LangChain and LangGraph for agentic workflows.-
- FlicenseNot gradedqualityDmaintenanceProvides math and weather tools accessible via LangGraph agent using MCP protocol with stdio and streamable HTTP transports.1-
- FlicenseNot gradedqualityDmaintenanceA calculator MCP server providing add and subtract tools, along with file resources and a code review prompt, supporting in-memory, HTTP, and STDIO transports. It also includes a LangGraph ReAct agent example that uses the tools.-