DEV.co
MCP Servers · rekog-labs

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.

Source: GitHub — github.com/rekog-labs/MCP-Nest
670
GitHub stars
109
Forks
TypeScript
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryrekog-labs/MCP-Nest
Ownerrekog-labs
Primary languageTypeScript
LicenseMIT — OSI-approved
Stars670
Forks109
Open issues27
Latest releasev1.9.10 (2026-05-22)
Last updated2026-07-08
Sourcehttps://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.

Quickstart

Get the MCP-Nest source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/rekog-labs/MCP-Nest.gitcd MCP-Nest# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Enterprise LLM Tool Exposure

Expose internal NestJS business logic and APIs as MCP tools to AI agents and ChatGPT plugins without duplicating authentication or data access logic; leverage existing guards and DI containers.

AI Agent Backend Integration

Build production-grade MCP servers that connect Claude, ChatGPT, or other AI models to your backend systems with fine-grained authorization, progress reporting, and interactive tool elicitation.

Rapid Multi-Transport AI Protocols

Quickly stand up HTTP+SSE, Streamable HTTP, or STDIO MCP servers from a single NestJS codebase, avoiding transport-specific boilerplate while maintaining consistent security and DI patterns.

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.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityModerate
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related 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?
Yes. The module is actively maintained, MIT-licensed, and documented. However, verify that your chosen authorization strategy (built-in or external) and transport configuration are production-ready. The built-in authorization server is marked beta; evaluate accordingly.
Do I have to use TypeORM for the authorization server?
No. The built-in server uses TypeORM as one option; you can implement a custom store or use an external authorization provider (Keycloak, Auth0, etc.). Both paths are documented.
What if my NestJS app is already in production?
MCP-Nest is a module that imports into your NestJS application; it does not interfere with existing endpoints or services. Add it as a new feature. Ensure you handle separate STDIO or HTTP transports for MCP without conflicting with your app's primary API.
Can I expose tools that call external APIs or databases?
Yes. Tools are NestJS methods with full DI access, so you can inject services that call external APIs, databases, or other backends. The Context parameter also provides request access for auth and logging.

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.