MCP Server NestJS Module Library <!-- omit in toc -->BLOCK
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://www.npmjs.com/package/@nestjs-mcp/server) [](https://github.com/semantic-release/semantic-release) [](https://www.npmjs.com/package/@nestjs-mcp/server) [](https://github.com/adrian-d-hidalgo/nestjs-mcp-server/actions/workflows/ci.yml) [](https://codecov.io/gh/adrian-d-hidalgo/nestjs-mcp-server) [](https://snyk.io/test/github/adrian-d-hidalgo/nestjs-mcp-server) [](./LICENSE) [](./CONTRIBUTING.md) [](CODEOFCONDUCT.md)
Overview
NestJS MCP Server is a modular library for building Model Context Protocol (MCP) servers using NestJS. It provides decorators, modules, and integration patterns to expose MCP resources, tools, and prompts in a scalable, maintainable way. This project is a wrapper for the official `@modelcontextprotocol/sdk` and is always kept compatible with its types and specification.
Table of Contents
- Installation
- Quickstart
- What is MCP?
- [Core Concepts](#core-
762d0cfe4c8dOBSERVED · 2026-10-12Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add server --env JWT_SECRET=${JWT_SECRET} --env OAUTH_ISSUER=${OAUTH_ISSUER} -- npx -y @nestjs-mcp/[email protected]{
"mcpServers": {
"server": {
"command": "npx",
"args": [
"-y",
"@nestjs-mcp/[email protected]"
],
"env": {
"JWT_SECRET": "${JWT_SECRET}",
"OAUTH_ISSUER": "${OAUTH_ISSUER}"
}
}
}
}Exposed tools (46)
44 read · 2 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
add_note | write | Adds a note (requires notes:write) |
admin_only_prompt | read | Only advertised to connections that look like an admin |
admin_only_tool | read | Only advertised to connections that look like an admin |
always_off_prompt | read | Disabled for every connection |
always_off_tool | read | Disabled for every connection |
assemble_briefing | read | Assembles a prompt in two reported stages |
auth_protected_tool | read | A tool protected by a guard that reads this call’s Authorization header |
beta_tool | read | Gated on a deliberately slow lookup |
complex-tool | read | Tool with complex schema |
count_up | read | Counts to |
deploy | write | Deploys after confirming with the caller |
enum-tool | read | Tool with enum schema |
gated_tool | read | Only for admins |
help_guide | read | Provides a general help guide about available system features |
list_notes | read | Lists notes (requires notes:read) |
measure | read | Returns a structured measurement |
nested-tool | read | Tool with nested schema |
off_prompt | read | d |
plain_prompt | read | d |
product_recommendation | read | Recommends products based on user preferences and requirements |
prompt_complete | read | Complete prompt |
prompt_with_desc | read | A test prompt |
public_prompt | read | Always available |
public_tool | read | Always available, on every connection |
purchase | read | Confirms a purchase across a round trip |
rejecting_gate_tool | read | Its gate rejects, so it is never available |
rich_tool | read | Has every option |
search | read | Public search |
status | read | Public through its resolver |
string-tool | read | Tool with string schema |
test-prompt-with-description | read | A test prompt |
test-prompt-with-description-and-args | read | A test prompt |
test-tool-with-annotations-and-description | read | A test tool |
test-tool-with-description | read | A test tool |
test-tool-with-params-and-description | read | A test tool |
test-tool-with-params-annotations-description | read | A test tool |
throwing_gate_tool | read | Its gate throws, so it is never available |
tool_complete | read | Complete tool |
tool_with_annotations_and_description | read | Tool with annotations and description |
tool_with_desc | read | A test tool |
tool_with_description | read | Tool with name and description |
tool_with_params_schema_and_annotations_and_description | read | Tool with paramsSchema, annotations, and description |
tool_with_params_schema_and_description | read | Tool with paramsSchema and description |
tool_with_progress | read | Works through |
unresolvable_gate_tool | read | Its gate cannot be resolved, so it is never available |
whoami | read | Returns the authenticated caller as the server sees it |
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (3 observation(s))
- Network
- declared (1 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (21)
git config --global user.signingkey "/home/${DEV_USER}/.ssh/$KEY_NAME"echo "Git signing key updated from $HOST_KEY to /home/${DEV_USER}/.ssh/$KEY_NAME".claudeignore
.commitlintrc.js
.mcp.json.example
.releaserc.js
.snyk
console.log(` Authorization: Bearer ${token}`);} from '../../src';
import { McpModule } from '../../src';} from '../../src';
} from '../../src';
} from '../../src';
`http://127.0.0.1:*`), because MCP clients pick their callback port.
redirect_uri: 'http://127.0.0.1:1/other',
authorizeUrl({ redirect_uri: 'http://127.0.0.1:53682/other' }),resolveOAuthConfig('http://127.0.0.1:3200', {}).mockAuthorizationServer,const LOOPBACK_REDIRECT = 'http://127.0.0.1:61234/oauth/callback';
@modelcontextprotocol/node, @modelcontextprotocol/server, zod, @commitlint/cli, @commitlint/config-conventional, @commitlint/types, @eslint/js, @modelcontextprotocol/client
Senior debugging investigator for @nestjs-mcp/server. Use IMMEDIATELY when the user asks to debug an error, investigate a failure, reproduce a bug, or understand WHY something is not working — a consu
echo "[email protected] $(cat ~/.ssh/id_ed25519.pub)" >> ~/.config/git/allowed_signers
Gates applied: no_behavioural_pass.
762d0cfe4c8dfull audit observations/trust-audit/mcp-server/adrian-d-hidalgo__nestjs-mcp-server.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-12 | 762d0cfe4c8d | BLOCK | D | 69 | first audit |
Questions
What tools does @nestjs-mcp/server expose?
46 in total: 44 read-only, 2 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is @nestjs-mcp/server safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (69/100) and found 2 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does @nestjs-mcp/server need?
It reads JWT_SECRET and OAUTH_ISSUER from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does @nestjs-mcp/server run?
It speaks streamable-http, so it runs as a service you connect to over the network. It is published on npm as @nestjs-mcp/server at 2.0.0.
How current is this page?
The grade is for one exact copy of the source (762d0cfe4c8d), read on 2026-10-12. The repository is watched and re-audited when it changes.