nest-openapi-mcp
Allows AI agents to interact with any NestJS API that has Swagger documentation, automatically exposing its endpoints as MCP tools through the real Nest pipeline (Guards, Pipes, Interceptors, Scope.REQUEST providers).
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
nest-openapi-mcp
Turn an existing NestJS API (already documented with @nestjs/swagger) into a spec-compliant
Model Context Protocol server — with zero per-endpoint annotation,
and execution that goes through the real Nest pipeline (Guards, Pipes, Interceptors, Scope.REQUEST
providers), not a reimplementation of it.
Several NestJS↔MCP integrations already exist (notably
rekog-labs/MCP-Nest), but they're decorator-based — you
annotate each method you want exposed by hand. This project's angle is Swagger-driven auto-discovery:
if your API already has @nestjs/swagger metadata (or even just class-validator decorators — see
enrichEmptySchemas in @onkarsabale15/mcp-gen-core), tool schemas are derived from it directly, with a safe-by-
default policy so nothing is LLM-callable until you explicitly opt it in.
Status:
@onkarsabale15/mcp-gen-core(the OpenAPI → MCP schema engine) is built, tested, and validated against three independently-built NestJS codebases (seedocs/real-world-validation-report.md).@onkarsabale15/mcp-gen-server(the actual NestJS module you'd install) and@onkarsabale15/mcp-gen-cliare still placeholders — this isn't installable as a working MCP server yet. Seedocs/mcp-generator-hld-lld.mdfor the full architecture and phased roadmap.
Packages
Package | Purpose |
| Shared types, JSON-RPC types, error classes. No framework dependency. |
| OpenAPI parsing, schema flattening, tool naming, tool registry, truncation. No NestJS dependency. |
| NestJS dynamic module ( |
| Standalone CLI: turns any OpenAPI 3.0/3.1 document into a proxying MCP server. |
Related MCP server: Swagger MCP Adapter
Usage
There are four distinct ways this is designed to be used — only one of them works today. See
docs/usage/ for the full breakdown with a status table and a guide
per mode:
Use
@onkarsabale15/mcp-gen-coredirectly — available now, real code examples.In-process NestJS module — planned (
McpModule.forRoot()).Manual, non-HTTP tools — planned (
@McpTool/@McpArg).Standalone CLI / proxy — planned (
npx @onkarsabale15/mcp-gen-cli serve).
Development
pnpm install
pnpm build
pnpm lint
pnpm typecheck
pnpm testThis repo uses pnpm workspaces + Turborepo, Changesets for versioning/publishing, and strict
TypeScript throughout. See CONTRIBUTING.md for conventions, and
SECURITY.md for the threat model and how to report a vulnerability privately.
Naming note
Packages are published under the author's personal npm scope (@onkarsabale15/mcp-gen-*) rather than a
dedicated organization scope — no functional difference, just where the name is claimed from.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Generate a typed SDK, CLI, and MCP server from any OpenAPI or GraphQL spec, and keep them current.
Host any HTTP API as a standard MCP server; auto-distribute to 12+ mainstream agent platforms.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA NestJS module for building Model Context Protocol (MCP) servers using decorators to expose services as tools, resources, and prompts. It features auto-discovery, a built-in playground UI, and support for multiple transports including SSE and Stdio.5 npmMIT
- AlicenseAqualityDmaintenanceA TypeScript-based MCP server that integrates with Swagger/OpenAPI specifications to expose API endpoints as tools for Large Language Models (LLMs), enabling natural language interaction with any OpenAPI-compliant API.49MIT
- AlicenseNot gradedqualityDmaintenanceConverts any OpenAPI/Swagger spec into an MCP server, exposing REST API endpoints as tools for Claude.MIT
- FlicenseNot gradedqualityDmaintenanceTransforms a NestJS REST API into an MCP server for AI agents to manage tasks securely via standardized tools.-