nest-mcp
by btwld·★ 7·Score 41
A NestJS-based framework for building MCP servers, clients and gateways with TypeScript decorators and dependency injection.
Overview
nest-mcp provides a comprehensive framework for building Model Context Protocol (MCP) servers, clients, and gateways using the familiar NestJS ecosystem. It offers structured packages for server implementation with decorators, authentication, resilience patterns, and multi-transport support. The framework enables developers to leverage existing NestJS knowledge while implementing MCP functionality through tools, resources, and prompts defined via TypeScript decorators. The gateway functionality allows aggregation of multiple upstream MCP servers behind a unified endpoint.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose nest-mcp if you're already using NestJS or want a TypeScript-based framework with decorators and dependency injection for building MCP servers.
When NOT to choose this
Don't choose this if you need a simple, lightweight solution without the NestJS framework overhead, or if you're building in JavaScript/TypeScript without the NestJS ecosystem.
Tools this server exposes
1 tool extracted from the README (low confidence)greetGreet a user by name
Note: Only one tool example was provided in the README. No explicit list of all available tools was documented.
Comparable tools
Installation
Install the appropriate package for your use case:
# Server — expose tools/resources to AI clients
npm install @nest-mcp/server @modelcontextprotocol/sdk zod@^4
# Client — call tools on a remote MCP server
npm install @nest-mcp/client @modelcontextprotocol/sdk zod@^4
# Gateway — aggregate multiple servers into one
npm install @nest-mcp/gateway @modelcontextprotocol/sdk zod@^4
# Install NestJS peer dependencies if not already installed
npm install @nestjs/common @nestjs/core reflect-metadata rxjsFor Claude Desktop, add this to your claude_desktop_config.json:
{
"mcpServers": {
"nest-mcp": {
"command": "node",
"args": ["path/to/your/server.js"]
}
}
}FAQ
- What transport protocols does nest-mcp support?
- The framework supports Streamable HTTP, SSE (Server-Sent Events), and STDIO transports for MCP servers and clients.
- Can I use nest-mcp with existing NestJS applications?
- Yes, nest-mcp integrates seamlessly with existing NestJS applications through modules, dependency injection, and decorators.
Compare nest-mcp with
Last updated · Auto-generated from public README + GitHub signals.