MongoDB MCP ServerMongoDB MCP Server
MongoDB 官方 MCP server(mongodb-js 仓,Apache-2.0):agent 连库查集合、跑聚合、 写数据、管 Atlas。诚实标注:docs/mcp 路径 404——现役官方线在 GitHub 仓。 安全口径:删除类工具带确认参数,但确认不是沙箱——凭据才是边界。
MongoDB's official MCP server (mongodb-js repo, Apache-2.0): agents connect to databases, query collections, run aggregations, write data, manage Atlas. Honest note: the docs/mcp path 404s — the live official line is the GitHub repo. Delete tools carry confirmation parameters, but confirmation is not a sandbox — credentials are the boundary.
适合与不适合When to use it, when not to
适合:MongoDB 栈的 agent 开发流、Atlas 管理接 agent。 不适合:要硬只读边界;非 MongoDB 栈。
Fits: agent dev flows on the MongoDB stack, Atlas management into agents. Not a fit: hard read-only boundaries; non-MongoDB stacks.
中文生态China availability 国产 / 国内可直接用 / 备案状态 · 快照domestic / direct access / CAC filing · snapshot 2026-10-21
- 出品属地Origin
- 国外出品foreign-made MongoDB, Inc.(美国)。MongoDB, Inc. (US).
- 国内使用Direct access
- 直连不可达direct blocked github.com 直连实测 000(波动,同日代理可达 200);mongodb.com 直连 200(docs 首页)。github.com measured 000 direct (fluctuating; 200 via proxy the same day); mongodb.com measured 200 direct (docs home).
- 备案状态CAC filing
- 未见于备案名单not in filing list:未见于网信办公示名单(2026-10-21 检索);该产品未面向大陆公众提供服务,备案不适用。not in the CAC public registry (searched 2026-10-21); the product does not serve the mainland public, so filing does not apply.
备案信息以网信办《生成式人工智能服务已备案信息》公示名单为准(按批次滚动更新,本站只抄编号不解读);「大陆可直连」是本站从大陆网络直连实测的结果,不是厂商承诺。GitHub 类站点当日实测有波动,口径写在依据里。Filing status is quoted from the CAC public registry (updated batch by batch; this site copies the number and does not interpret it). "Direct access" is this site's own reachability measurement from a mainland network, not a vendor promise. GitHub-hosted sites fluctuated on the measurement day — the note says so.
固定坐标系Fixed coordinate system
11 个维度dimensions, 与同分区其他对象逐项可比each comparable item by item against others in the same section.
- 模型与开放条件Model & openness
它自己不调模型——被 MCP 客户端调用的接口实现。它把 MongoDB 数据库操作 (连接、集合查询、聚合)与 Atlas 管理包装成工具给 agent 用。
It calls no model itself — an interface implementation called by MCP clients. It wraps MongoDB database operations (connecting, collection queries, aggregations) and Atlas management as tools for agents.
- 运行位置Where it runs
本地进程(npx stdio);GitHub 1,152★,最近推送 2026-10-30(API 核验)。 官方 docs/mcp 页直抓 404——现役官方线以仓为准(直抓核验 2026-10-21)。
A local process (npx stdio); GitHub 1,152★, last push 2026-10-30 (API verified). The official docs/mcp page direct-fetched 404 — the current official line is the repo itself (direct-fetch verified 2026-10-21).
- 本地文件Local files
不读写本机项目文件——作用域是数据库实例(本地 mongod 或 Atlas 集群都算它的目标)。
Reads and writes no local project files — the scope is database instances (a local mongod or an Atlas cluster both count as its targets).
- 关机后的任务Tasks after shutdown
stdio 随客户端生死;无后台任务语义。
stdio lives and dies with the client; no background-task semantics.
- 工具与扩展Tools & extensions
连接/列库列集合、find/aggregate/insert/update/delete、Atlas 集群管理等; 写能力齐全。完整清单以仓 README 为准。
Connect/list databases and collections, find/aggregate/insert/update/delete, Atlas cluster management, etc.; write capabilities are complete. The complete inventory follows the repo README.
- 上下文与记忆Context & memory
无跨会话记忆——数据状态在数据库本身。
No cross-session memory — data state lives in the database itself.
- 权限与限制Permissions & limits
两条凭据路线:连接串直连(能连什么库=能做什么,含写/删)或 Atlas API key(管 Atlas 面)。 官方 README 明确提示高危操作确认机制存在(删除类工具带确认参数)—— 但边界仍是凭据:接 agent 前按「它能删集合」设防。
Two credential routes: a connection string direct connection (whatever database it can reach = whatever it can do, including writes/deletes) or an Atlas API key (the Atlas management surface). The official README explicitly notes a confirmation mechanism for high-risk operations (delete-class tools carry a confirmation parameter) — but the boundary is still the credential: before hooking up an agent, defend on the assumption "it can drop collections".
- 适合什么任务Best for
适合:MongoDB 项目的 agent 开发流(查 schema、跑聚合、试写操作)。 不适合:要硬只读沙箱;非 MongoDB 栈。
Fits: agent dev flows for MongoDB projects (inspect schemas, run aggregations, try write operations). Not a fit: hard read-only sandboxes; non-MongoDB stacks.
- 传输方式Transport
stdio(npx 本地起进程)。核验:仓 README(2026-10-21 直抓)。
stdio (npx starts a local process). Verified: repo README (fetched directly 2026-10-21).
- 认证机制Authentication
连接串(mongodb:// 直连实例)或 Atlas API 凭据两路线; 只读连接选项支持面未逐条核验。
Two routes: connection string (mongodb:// direct to an instance) or Atlas API credentials; the support surface of read-only connection options not verified item by item.
- 权限范围Permission scope
读面:列库/集合、find/aggregate;写面:insert/update/delete、Atlas 集群管理。 删除类工具带确认参数(官方 README 口径);无独立审批层。
Read surface: list databases/collections, find/aggregate; write surface: insert/update/delete, Atlas cluster management. Delete-class tools carry a confirmation parameter (official README wording); no separate approval layer.
头号误解Top misconception
- 找 mongodb.com/docs/mcp——该路径 404(2026-10-21 直抓),现役以 mongodb-js 仓为准Looking for mongodb.com/docs/mcp — that path 404s (direct-fetched 2026-10-21); the live line is the mongodb-js repo
- 把「删除类工具带确认」当安全边界——确认参数可被 agent 自己填,凭据才是边界Treating 'delete tools ask for confirmation' as a security boundary — the agent can fill in the confirmation parameter itself; credentials are the boundary
- 连接串直连本地库与 Atlas 混配——两条凭据路线权限面不同Mixing direct local connections with Atlas in configuration — the two credential routes have different permission surfaces
未知项清单Known unknowns
- 只读连接选项支持面(未逐条核验)
- Atlas 工具完整清单(未逐条清点)
- docs/mcp 官方页是否会恢复(未见说明——只记 404 事实)
- The support surface of read-only connection options (not verified item by item)
- The complete Atlas tool inventory (not enumerated item by item)
- Whether the docs/mcp official page will come back (no statement seen — only the 404 fact is recorded)
证据来源Evidence sources
判断可回到以下一手源复核。本站核验日Every judgement can be rechecked against the primary sources below. Verified on 2026-10-30,内容更新日content updated on 2026-10-21。
| 类型Type | 名称Name | 链接Link |
|---|---|---|
| repo | mongodb-js/mongodb-mcp-server · 仓库(Apache-2.0;1,152★,最近推送 2026-10-30,GitHub API 核验)mongodb-js/mongodb-mcp-server · repository (Apache-2.0; 1,152★, last push 2026-10-30, GitHub API verified) | https://github.com/mongodb-js/mongodb-mcp-server |
| changelog | mongodb-js/mongodb-mcp-server · Releases(changelog)mongodb-js/mongodb-mcp-server · Releases (changelog) | https://github.com/mongodb-js/mongodb-mcp-server/releases |
| docs | MongoDB · 官方文档首页(产品背景)MongoDB · official docs home (product background) | https://www.mongodb.com/docs |
实测记录Measured runs
本档未在真实客户端逐项跑通;工具清单与权限来自官方 README。
This site has not completed measured runs. The test protocol is at protocols/mcp/_protocol.md.
相关条目Related entries
- Supabase MCPSupabase MCP同为数据库类 server:Supabase 走自家 BaaS 项目面,MongoDB 走连接串直连实例面。Both database-class servers: Supabase works through its own BaaS project surface, MongoDB through the connection-string direct-to-instance surface.
- CursorCursor另一层 · AI 编程Other layer · AI coding
- Claude Code IDE 扩展Claude Code (IDE extension)另一层 · AI 编程Other layer · AI coding
本页由This page is generated from the ai-handbook 数据层生成(CC BY 4.0)。data layer (CC BY 4.0).
方法论与坐标系定义见仓库内For the methodology and coordinate definitions, see METHODOLOGY.md.