🧠 MCP Server con NestJS
@klever24v
nueva versión del servidor MCP usando MCP SDK e incluye Incluye validación (zod), permite definir herramientas de forma declarativa, que pueden ser invocadas por modelos como si fueran funciones (similar a OpenAI function calling).
Overview
What is 🧠 MCP Server con NestJS?
A modular extensible server built with NestJS that implements the Model Context Protocol (MCP). It allows LLMs (like Claude, GPT) or external clients to interact with a collection of specialized tools via HTTP POST requests to /mcp. Each tool is dynamically registered with a name, a Zod-validated input schema, and a handler function.
How to use 🧠 MCP Server con NestJS?
Install dependencies with npm install, configure a .env file (set PORT and ANALYSIS_DIR), then run npm run start:dev. Invoke any tool by sending a POST request to http://localhost:3000/mcp with a JSON body containing toolName and params.
Key features of 🧠 MCP Server con NestJS?
- Modular architecture based on tools.
- Reusable tools: calculator, temperature, filesystem, code-analyzer-local.
- Prepared for integration with LLMs.
- Automatic generation of Markdown files with code descriptions.
- File read/write/delete support.
- Configuration via
.envand dynamic routes.
Use cases of 🧠 MCP Server con NestJS?
- Expose mathematical operations to an LLM via the calculator tool.