NestJS MCP

•
24
•

Simplifies building Model Context Protocol (MCP) servers within NestJS applications using decorators.

nestjs-mcp provides seamless integration for building Model Context Protocol (MCP) servers within NestJS applications. Utilizing method decorators such as `@McpResource`, `@McpTool`, and `@McpPrompt`, the module simplifies the process of exposing resources, tools, and prompts to MCP clients. It supports various transport layers, including STDIO and HTTP/SSE, making it easy to create MCP-compliant servers with minimal configuration and boilerplate.

Key Features

01Seamless MCP integration within NestJS.
02Decorator-based resource, tool, and prompt definition.
03Automatic discovery of decorated methods.
04Built-in STDIO and HTTP/SSE transport support.
05Zod schema validation for tool parameters and prompt arguments.
061 GitHub stars

Use Cases

01Building CLI tools that communicate via Model Context Protocol.
02Creating HTTP-based MCP servers for AI-powered applications.
03Exposing application configuration and data to MCP clients.