← Back to directory
N

Nest REST Mongo Boilerplate MCP Server

Community
A NestJS MCP backend starter for MongoDB.
Category
Database #77 of 86
Stars
★ 301 Popular
Transport
Streamable HTTP
Runtime
Node.js 20+ · Docker
Credentials
No credential needed
License
MIT
Last commit
⚠
Tools
5
43FMRS · D

The README describes a built-in MCP server, Streamable HTTP transport, five MongoDB-aware tools, and a model whitelist. No server manifest or client configuration example was provided; client compatibility claims are limited to the clients named in the README's connection example.

Strongest · Documentation 10/20 Weakest · Reliability 7/20

Reliability
7/20
Security and permissions
9/20
Maintenance
8/20
Documentation
10/20
Setup experience
9/20
Why each score
Reliability 7/20
The README claims a Streamable HTTP MCP server and several MongoDB query tools, and states query limits (find capped at 100 results and an appended `$limit 100` for aggregation). No manifest or source is provided to verify initialization, tool parameters, error handling, or actual behavior. Under the static-review rule, the absence of verifiable CI and key-path test evidence keeps reliability low.
Security and permissions 9/20
The README describes an `MCP_ALLOWED_MODELS` model allowlist and an environment-configured JWT secret, which are visible boundary controls. It does not explain authentication and authorization for MCP endpoints, trust boundaries for remote MCP URLs, sensitive-field handling, or confirmation for dangerous operations. Actual enforcement cannot be checked without source, so points are deducted. The provided evidence does not establish a red-line issue.
Maintenance 8/20
The repository is not archived, has an MIT license, and the README links a GitHub Actions badge and contribution channel. The supplied material does not verify recent releases, commit activity, issue response, dependency updates, or a security-response channel. Stars and open-issue counts are not used to award maintenance points.
Documentation 10/20
The README covers the stack, environment variables, deployment, tools and endpoints, query limits, and a client connection URL, giving users basic onboarding information. It lacks per-tool parameter examples, authentication guidance, troubleshooting, data-exposure details, and reviewable source or manifest evidence, leaving important assumptions unresolved.
Setup experience 9/20
The README lists Node.js 20+, MongoDB, installation steps, and a Docker Compose path, and gives a Streamable HTTP connection URL. It lacks a client configuration example, authentication setup guidance, and platform detail; without a manifest or source, the full install-to-connection flow cannot be verified, so static-review uncertainty lowers the score.

Static review · not runReviewed 2026-11-29

Read the FMRS scoring method →

Fit and risk

What it can accessUses the networkConnects to a database

Best for

  • Developers who want to prototype a backend with NestJS, Fastify, Mongoose, and MongoDB.
  • Teams that need MCP clients to connect over Streamable HTTP and query allowed models.

Not for

  • Use cases that require a documented guarantee of read-only data access; the README does not state that these tools are read-only.
  • Users seeking a hosted MCP service that works without deploying the application or MongoDB.

Required permissions

  • The application needs MongoDB connection configuration; MCP tools can query models listed in MCP_ALLOWED_MODELS, which defaults to Profile.
  • Deployment requires environment configuration, including a JWT signing secret and database connection string.

Risks and side effects

  • Query tools can access data in allowlisted models; filters and aggregation pipelines may return sensitive document fields.
  • The README does not specify authentication or authorization requirements for the MCP endpoint, so verify network exposure and access controls before deployment.
  • The model whitelist limits model scope, but does not establish database-level permissions or data redaction behavior.

Setup

Before you start

Runtime:Node.js 20+ · Docker

WEBTOKEN_SECRET_KEY optionalsecret A random secret used to sign JWTs; configure it in `.env`.
DB_URL required The MongoDB connection string; obtain it from a local or hosted MongoDB instance and configure it in `.env`.
Other optional settings (8)
APP_ENV optional Set to `development` or `production` to control logging; configure it in `.env`.
APP_URL optional The application base URL; configure it in `.env`.
PORT optional The HTTP port, defaulting to 9000; configure it in `.env`.
WEBTOKEN_EXPIRATION_TIME optional Seconds until a JWT expires, defaulting to 2400; configure it in `.env`.
MCP_SERVER_NAME optional The name reported by the local MCP server; configure it in `.env`.
MCP_SERVER_VERSION optional The version reported by the local MCP server; configure it in `.env`.
MCP_CLIENT_REMOTES optional Comma-separated Streamable HTTP URLs of external MCP servers to connect to; configure them in `.env`.
MCP_ALLOWED_MODELS optional Whitelist of Mongoose model names MCP tools may query, defaulting to `Profile`; configure it in `.env`.

The README describes using Node.js 20+ and MongoDB 6+, installing dependencies, configuring .env, and starting the app in development mode. Docker Compose can also start the API and MongoDB. The MCP Streamable HTTP endpoint is /api/mcp/transport. No client configuration example is provided.

Check that it works

Connect an MCP client to `http://localhost:9000/api/mcp/transport` and confirm that `list-collections` and `get-profile` appear in its tool list. Calling `list-collections` should return the allowed models.

Troubleshooting

  1. Check the MongoDB connection string and confirm the MongoDB instance is reachable.
  2. Confirm the API is running on the configured port and that the client uses /api/mcp/transport.
  3. If a model is unavailable or a query is restricted, check that MCP_ALLOWED_MODELS includes its Mongoose model name.
  4. Check MCP_SERVER_NAME, MCP_SERVER_VERSION, and the Streamable HTTP URL configured in the client.

Things to try

Once connected, you can ask your AI assistant things like:

  • List the MongoDB models this server is allowed to inspect.
  • Count the documents in the Profile model.
  • Find the profile for username alice.

Tools 5

list-collections read-only
Lists the Mongoose models the server is allowed to inspect.
count-documents read-only
Counts documents matching a filter in an allowed model.
find-documents read-only
Queries an allowed model with optional filter and projection; results are capped at 100.
aggregate-pipeline read-only
Runs an aggregation pipeline on an allowed model and appends a limit of 100 results.
get-profile read-only
Looks up a profile by username.

Use cases

Query MongoDB models and documents that are on the server's allowlist through MCP.
Explore the built-in MCP server while prototyping a NestJS and Mongoose backend.

Supported clients

Claude Desktop
Claude Code
mcp-cli

Listed from the project's documentation, not tested by this site.

Overview

This is a backend starter built with NestJS, Fastify, and Mongoose. It includes authentication, authorization, logging, CRUD, MongoDB persistence, and built-in MCP server and client components. The MCP server exposes MongoDB-aware tools and resources over Streamable HTTP; queryable models are controlled by the MCP_ALLOWED_MODELS whitelist.

Similar servers

Source revision f4484ed03467 Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/nest-rest-mongo-boilerplate.svg)](https://followmcp.com/en/servers/nest-rest-mongo-boilerplate)