NestJS apps are heavily structured with decorators and DTOs. By piping that metadata into an OpenAPI spec, wmcp.sh instantly serves your robust, typed routes as AI agent tools without writing a single line of custom MCP logic.
Writing a custom MCP server usually means abandoning your carefully crafted NestJS guards, interceptors, and DTO validations. You end up maintaining two separate APIs.
By using @nestjs/swagger, the types you already wrote compile perfectly to OpenAPI. wmcp.sh reads that spec, converting it directly into Claude or LangChain tool-use schemas while relying on your actual Nest server to process the traffic safely.
// TypeScript - NestJS Controller
import { Controller, Post, Body, UseGuards } from '@nestjs/common';
import { ApiTags, ApiOperation, ApiBearerAuth } from '@nestjs/swagger';
@ApiTags('agent')
@Controller('tasks')
export class TaskController {
@Post()
@UseGuards(JwtAuthGuard)
@ApiBearerAuth()
@ApiOperation({ summary: 'Create new task' })
create(@Body() createTaskDto: CreateTaskDto) {
return this.taskService.create(createTaskDto);
}
}
// Agents will now prompt: "Create new task" mapping precisely to CreateTaskDto
curl -X GET "https://wmcp.sh/api/v1/tools?url=https://your-nest-app.com/api-json&tag=agent"
| Capability | Without wmcp.sh | With wmcp.sh |
|---|---|---|
| DTO Validation | ⚠️ Duplicate schemas in MCP | ✅ Validated at the edge natively |
| Auth & Guards | ❌ Must be ported | ✅ Executes seamlessly on your backend |
| Multi-module scoping | ⚠️ Hard to isolate | ✅ Tag controllers using @ApiTags |
| Versioning | ⚠️ Manage version headers | ✅ Fully supported per-route |
Using the official @nestjs/swagger module, which reads @ApiOperation and @ApiResponse decorators, as well as your DTO classes.
No. Because wmcp.sh proxies the HTTP requests using the auth tokens provided by the agent, your existing @UseGuards() decorators execute exactly as they do for human clients.
Yes. OpenAPI generation in NestJS works regardless of whether you use the Express or Fastify underlying adapter.
When setting up SwaggerModule in NestJS, you can pass an include array of modules. Alternatively, tag specific controllers with @ApiTags('agent') and pass that tag to wmcp.sh.
Custom adapter + hosted MCP at mcp.yourbrand.com + verified badge. From $499 one-time setup.