MongoDB MCP somente leitura
Provides read-only tools for querying MongoDB databases, collections, and documents, including listing authorized databases and collections, finding documents, counting documents, and retrieving distinct field values.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MongoDB MCP somente leitura busque os documentos da coleção clientes com status ativo"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MongoDB MCP somente leitura
Servidor MCP em TypeScript/Node.js que permite a clientes como o GitHub Copilot consultar bancos, coleções e documentos no MongoDB.
O servidor oferece apenas tools de leitura, sem ferramentas de escrita, comandos arbitrários ou agregação. Por padrão, também bloqueia comandos de escrita antes de chegarem ao MongoDB, mesmo que o usuário tenha permissão para escrever. As consultas respeitam as permissões do MongoDB e as restrições configuradas.
Tools disponíveis
Tool | O que faz |
| Lista os bancos autorizados. |
| Lista as coleções autorizadas de um banco. |
| Busca documentos por filtro, com projeção, ordenação e paginação. |
| Busca um documento que corresponda ao filtro. |
| Conta os documentos que correspondem ao filtro. |
| Retorna os valores distintos de um campo nos documentos que correspondem ao filtro. |
Related MCP server: MongoDB MCP Server
Instalação e configuração
Para instalar, configurar e começar a usar, siga o tutorial para iniciantes.
Para detalhes de autenticação, restrições e outras opções, consulte o tutorial avançado.
Available Tools
6 toolscountDocumentsBRead-only
Retorna a contagem exata dos documentos que satisfazem o filtro.
Inputs: filter (required), database (required), collection (required).
distinctCRead-only
Retorna valores distintos limitados e informa se a resposta foi truncada.
Inputs: field (required), filter (required), database (required), collection (required).
findCRead-only
Consulta documentos paginados; informa quando há mais resultados ou truncamento.
Inputs: filter (required), database (required), collection (required), skip, +3 more.
findOneCRead-only
Consulta um documento autorizado ou retorna null.
Inputs: filter (required), database (required), collection (required), sort, +1 more.
listCollectionsBRead-only
Lista apenas coleções autorizadas no banco informado.
Inputs: database (required).
listDatabasesARead-only
Lista apenas bancos autorizados pela política e pela identidade MongoDB.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct read operation: metadata listing (listDatabases, listCollections), single-vs-many document retrieval (findOne vs find), counting (countDocuments), and unique-value extraction (distinct). The find/findOne boundary is the classic overlap case, but the descriptions make the cardinality difference explicit.
All names use camelCase consistently, matching MongoDB shell conventions. The pattern is verb+noun for listDatabases, listCollections, and countDocuments, while find, findOne, and distinct follow native driver naming — a minor deviation but predictable and idiomatic for this domain.
Six tools is well-scoped for a read-only MongoDB server: one per essential read primitive with no redundant entries. Every tool earns its place and the surface stays small enough to avoid selection confusion.
The read-only surface covers discovery, querying, counting, and distinct values with truncation/pagination signaling, which is solid lifecycle coverage for a deliberately read-only server. The notable gap is aggregation pipeline support (aggregate), a common read operation agents may need for grouping and projection.
Maintenance
Related MCP Connectors
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Read-only access to your CodeMouse accounts, repositories, and AI pull-request reviews.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that provides read-only access to MongoDB databases, enabling AI assistants to directly query and analyze MongoDB data while maintaining data safety.149MIT
- FlicenseNot gradedqualityDmaintenanceA secure, read-only MCP server that enables AI agents to connect to MongoDB, perform queries and aggregations, and manage connections.-
- AlicenseNot gradedqualityBmaintenanceEnables LLM clients to query MongoDB collections read-only through a small set of guarded operations, exposing only declared fields and enforcing scoped filters, projections, and limits.5 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables users to inspect databases through read-only tools that explain queries, sample rows, and list indexes, while refusing apply or delete operations.MIT