- Step 1: Install the module and its peer dependencies.
- Step 2: Import `McpModule` into your root module and configure with `forRoot()` or `forRootAsync()`, providing server info.
- Step 3: Define resources, tools, and prompts using decorators `@McpResource`, `@McpTool`, and `@McpPrompt` within your providers.
- Step 4: Use `StderrLogger` if using STDIO transport to prevent stdout interference.
- Step 5: Run your NestJS application. The module automatically registers the decorated methods as MCP handlers, accessible via STDIO or HTTP endpoints depending on configuration.