TemplatesNestJS Starter

NestJS Starter

A NestJS MCP server using xmcp's adapter

NestJS Starter preview

A NestJS application with xmcp mounted through the NestJS adapter.

Features

  • NestJS application with MCP mounted at /mcp
  • REST endpoints at /health and /users
  • File-based tool discovery from src/tools/
  • Adapter build via experimental.adapter: "nestjs"
  • Shared in-memory users store used by both REST handlers and MCP tools

Getting Started

1. Create the project

2. Install & run

The NestJS server starts at http://localhost:3000, and the MCP endpoint is available at /mcp.

Project Structure

MCP Endpoint

The MCP route is exposed through a regular NestJS controller:

Adding Tools

Create a new .ts file in src/tools/. The tool is automatically discovered:

Build

Learn More

Other templates

One framework to rule them all