← Back to directory
M

MCP Nest

Community
Framework / SDK
NestJS module to effortlessly create MCP servers

This is a framework for building MCP servers or agents, not a server you connect a client to.

Category
Dev Tools #243 of 438
Stars
★ 718 Very popular
Transport
Streamable HTTP · stdio (local process)
Runtime
Node.js
Credentials
No credential needed
License
MIT
Last commit
51FMRS · D

This server is ideal for developers wanting to turn their NestJS codebase into an MCP server. It offers strong integration within the NestJS ecosystem with native microservice support for tools, resources, and prompts. However, it requires NestJS experience and may not be suitable for non-NestJS projects.

Strongest · Documentation 13/20 Weakest · Reliability 8/20

Reliability
8/20
Security and permissions
8/20
Maintenance
12/20
Documentation
13/20
Setup experience
10/20
Why each score
Reliability 8/20
Source includes core McpStrategy implementation and tests; CI config present but not executed. README describes init and tool-listing flow but runtime behavior unverified. Deductions for lack of execution evidence and thin exception-path coverage.
Security and permissions 8/20
No malicious code or credential exposure found. Tools support auth and OAuth, but default doesn't enforce least privilege; authorization is user-implemented. Deductions for incomplete built-in permission/confirmation mechanisms and unclear dangerous-op confirmation.
Maintenance 12/20
Active commits/releases, responsive issues, MIT license. Dependency updates not shown, security-response channel unclear. Deductions for governance/versioning gaps.
Documentation 13/20
Comprehensive docs covering install, tools, resources, prompts, auth, and examples; some features beta; troubleshooting not universal. Deductions for undisclosed limitations and gaps.
Setup experience 10/20
Clear install steps, multiple transport/framework examples, but many deps and manual config. No client config examples. Deductions for multi-step complexity and moderate fragility.

Static review · not runListed 2026-08-07

Read the FMRS scoring method →

Fit and risk

Best for

  • NestJS developers wanting to integrate AI tools seamlessly into existing backends
  • Teams needing secure, scalable, and testable MCP servers
  • Projects requiring fine-grained authorization and observability within a microservice architecture

Not for

  • Non-NestJS users, as it is strictly NestJS-based
  • Developers wanting to use different transports like SSE (only Streamable HTTP and STDIO are supported)
  • Those seeking a no-code solution to create MCP servers without writing TypeScript or NestJS code

Required permissions

  • Requires a Node.js and npm environment
  • When running STDIO transport, the process stdout must be reserved for the protocol
  • For HTTP transport, an accessible endpoint is needed; external authorization servers (like OAuth) may require network access

Risks and side effects

  • As a relatively new module, its API may evolve (e.g., migration from v1 to v2)
  • When using external authorization servers, careful handling of OAuth flows is required
  • Depending on ctx.reportProgress may be ineffective on legacy stateless clients with stateful sessions

Setup

Before you start

Runtime:Node.js

In your NestJS project, run npm install @rekog/mcp-nest @modelcontextprotocol/server @modelcontextprotocol/core @modelcontextprotocol/node zod@^4. Optionally, for the built-in authorization server, install @rekog/mcp-nest-auth; for TypeORM store, install @nestjs/typeorm and typeorm. Then follow the README quick start guide using McpStrategy and @McpController decorator.

Check that it works

Install the dependencies and start the NestJS app; connect the client to the /mcp endpoint and confirm greeting-tool appears in the tool list and returns a greeting.

Troubleshooting

  1. For HTTP transport, ensure you call mcp.setHttpAdapter(app.getHttpAdapter()) and app.startAllMicroservices() before app.listen()
  2. For STDIO servers, disable logging or redirect logs to stderr because stdout is used for the protocol
  3. Verify that transports are included in the transports array and that transport types are supported

Things to try

Once connected, you can ask your AI assistant things like:

  • Use the greeting tool to greet World

Use cases

Expose AI tools, resources, and prompts from an existing NestJS application.
Build enterprise-ready MCP servers while leveraging NestJS DI, guards, pipes, and interceptors.
Serve both modern and stateless MCP protocol revisions over Streamable HTTP and STDIO transports.

Overview

MCP Nest is a NestJS module to effortlessly expose tools, resources, and prompts for AI from your NestJS applications using the Model Context Protocol (MCP). It runs as a CustomTransportStrategy for NestJS microservices, making tools/resources/prompts real @MessagePattern handlers, so guards, pipes, interceptors, and exception filters apply natively. It supports Streamable HTTP and STDIO transports and serves both the 2025-era protocol and the stateless 2026-07-28 revision concurrently. Leverage NestJS dependency injection to define tools, resources, and prompts via decorators, with features like dynamic capabilities, resource templates, prompts, guard-based authentication, built-in or external authorization servers (OAuth), and server mutation.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 62.9k · Tools 2 Compare with this →

Source revision ca0060af9772 Data synced 2026-10-12 Read the FMRS scoring method