MCP-Nest
MCP-Nest is a TypeScript/NestJS module that lets you expose AI tools, resources, and prompts via the Model Context Protocol (MCP). It integrates with your NestJS application using dependency injection, supporting multiple transport types (HTTP+SSE, Streamable HTTP, STDIO) and includes built-in authorization and OAuth support.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | rekog-labs/MCP-Nest |
| Owner | rekog-labs |
| Primary language | TypeScript |
| License | MIT — OSI-approved |
| Stars | 670 |
| Forks | 109 |
| Open issues | 27 |
| Latest release | v1.9.10 (2026-05-22) |
| Last updated | 2026-07-08 |
| Source | https://github.com/rekog-labs/MCP-Nest |
What MCP-Nest is
A NestJS-based MCP server implementation providing declarative tool/resource/prompt definitions via decorators, Zod schema validation, request context access, per-tool authorization guards, and pluggable authentication (built-in OAuth server or external providers like Keycloak/Auth0). Supports multi-transport MCP communication and DI-driven architecture.
Get the MCP-Nest source
Clone the repository and explore it locally.
git clone https://github.com/rekog-labs/MCP-Nest.gitcd MCP-Nest# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Requires Node.js environment with TypeScript/NestJS; no browser or edge-compute variants documented.
- Authorization strategy must be chosen upfront (built-in OAuth server with TypeORM, external provider, or custom guards); refactoring later is non-trivial.
- Tool parameter validation via Zod schemas is mandatory; absence of automated schema generation from existing DTOs may increase boilerplate.
- Transports (HTTP+SSE, Streamable HTTP, STDIO) must be configured at module initialization; runtime switching is not clearly documented.
- Progress reporting and interactive tool calls require Context parameter usage; existing NestJS handler code may need minor refactoring.
When to avoid it — and what to weigh
- Non-NestJS Codebases — If your backend is Express, Fastify standalone, or another framework, this module will not provide value; it is tightly coupled to NestJS architecture.
- Simple Stateless MCP Tools Only — If you only need to expose a handful of simple, stateless functions without authorization or complex DI, the overhead of NestJS and this module may be unjustified.
- Fully Serverless/Ephemeral Deployments — MCP servers created with this module are relatively heavyweight (NestJS runtime); cold-start latency and memory footprint may be problematic for short-lived Lambda or Cloudflare Workers contexts.
- Zero External Dependencies Requirement — The module requires @modelcontextprotocol/sdk, Zod, and NestJS; if your project cannot accept these dependencies, this tool is not suitable.
License & commercial use
Licensed under MIT (MIT License). MIT is a permissive OSI-approved license allowing commercial use, modification, and distribution with minimal restrictions (retain attribution and license notice).
MIT license permits commercial use. No proprietary restrictions found in the data. However, verify that dependencies (@modelcontextprotocol/sdk, @nestjs/*, Zod) and any external authorization providers (Keycloak, Auth0) you integrate do not impose incompatible constraints. Requires review for your specific stack.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Strong |
| Assessment confidence | High |
Module provides guard-based authentication and per-tool authorization; these are dependency-injected, allowing fine-grained control. Built-in authorization server (beta) uses TypeORM; security of your store and token handling is your responsibility. External authorization server (Keycloak, Auth0) integration documented but depends on your implementation. Request context access within tools enables audit logging; apply principle of least privilege to tool scope and parameters. No evidence of known vulnerabilities in provided data; audit dependencies and stay current with NestJS security advisories.
Alternatives to consider
python-mcp (or Python MCP libraries)
If your backend is Python-based or you prefer Python for AI tooling, official or community Python MCP libraries may be more natural; MCP-Nest is TypeScript/NestJS-only.
Express + @modelcontextprotocol/sdk (manual setup)
Roll-your-own MCP server using Express and the raw MCP SDK; offers greater flexibility and lower runtime overhead if you don't need NestJS patterns, but requires more boilerplate.
Anthropic's Secure Proxy or direct Claude integration
For simpler use cases, Claude's built-in tools and function-calling may be sufficient without a custom MCP server; evaluate if you need dynamic, backend-driven tool registration.
Build on MCP-Nest with DEV.co software developers
MCP-Nest streamlines MCP server creation with NestJS patterns you already know. Explore our implementation guide to integrate tools, resources, and secure authorization into your AI-powered applications.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
MCP-Nest FAQ
Can I use MCP-Nest in production?
Do I have to use TypeORM for the authorization server?
What if my NestJS app is already in production?
Can I expose tools that call external APIs or databases?
Custom software development services
Need help beyond evaluating MCP-Nest? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and mcp servers integrations — and maintain them long-term.
Ready to Connect Your NestJS Backend to AI?
MCP-Nest streamlines MCP server creation with NestJS patterns you already know. Explore our implementation guide to integrate tools, resources, and secure authorization into your AI-powered applications.