如何将 MongoDB 远程 MCP 连接到 Kiro

约 1 分钟即可把 MongoDB 的远程 MCP 服务端接入 Kiro。如需排查 OAuth / 401 问题,可先用 OAuth 2.1 调试器体检端点。

🛡️ Official✓ VerifiedStreamable HTTPOAuth 2.1🛡️ A+~1112 tok36 tools
Streamable HTTPhttps://mcp.mongodb.com/mcp

Add to ~/.kiro/settings/mcp.json (or .kiro/settings/mcp.json in your workspace), then reopen Kiro's Agent panel to pick up the server:

{
  "mcpServers": {
    "mongodb": {
      "url": "https://mcp.mongodb.com/mcp"
    }
  }
}

接入步骤

  1. 打开 MCP 配置 — Kiro → MCP 面板,或编辑工作区 .kiro/settings/mcp.json。
  2. 添加服务端 — 写入 "mongodb": { "url": https://mcp.mongodb.com/mcp }。
  3. 完成认证 — 首次调用时客户端会打开 MongoDB 的 OAuth 授权页面——点击允许后工具即可用。
  4. 验证 — 在 在线 Inspector 中粘贴 https://mcp.mongodb.com/mcp 并运行 initialize + tools/list 验证连通性。

🧰 工具预览(36)

ToolSafetyDescriptionParameters
list-connections
~32 tok
🟢 ReadList configured MongoDB connections.—
connect
~33 tok
🟢 ReadConnect to a MongoDB instance or Atlas cluster.—
list-databases
~31 tok
🟢 ReadList databases of a connection.—
list-collections
~31 tok
🟢 ReadList collections of a database.—
collection-indexes
~31 tok
🟢 ReadList indexes of a collection.—
collection-schema
~32 tok
🟢 ReadInfer the schema of a collection.—
collection-storage-size
~33 tok
🟢 ReadGet storage size of a collection.—
db-stats
~27 tok
🟢 ReadGet database statistics.—
count
~29 tok
🟢 ReadCount documents matching a filter.—
find
~29 tok
🟢 ReadRun a find query on a collection.—
aggregate
~29 tok
🟢 ReadRun an aggregation pipeline.—
explain
~31 tok
🟢 ReadExplain a find or aggregate query plan.—
insert-one
~28 tok
🟠 WriteInsert a single document.—
insert-many
~29 tok
🟠 WriteInsert multiple documents.—
update-one
~28 tok
🟠 WriteUpdate a single document.—
update-many
~29 tok
🟠 WriteUpdate multiple documents.—
rename-collection
~29 tok
🟠 WriteRename a collection.—
delete-one
~28 tok
🔴 DestructiveDelete a single document.—
delete-many
~29 tok
🔴 DestructiveDelete multiple documents.—
drop-collection
~28 tok
🔴 DestructiveDrop a collection.—
drop-database
~27 tok
🔴 DestructiveDrop a database.—
create-index
~30 tok
🟠 WriteCreate an index on a collection.—
export
~29 tok
🟢 ReadExport query results to a file.—
mongodb-logs
~30 tok
🟢 ReadRetrieve MongoDB server logs.—
atlas-list-orgs
~31 tok
🟢 ReadList MongoDB Atlas organizations.—
atlas-list-projects
~29 tok
🟢 ReadList Atlas projects.—
atlas-list-clusters
~29 tok
🟢 ReadList Atlas clusters.—
atlas-inspect-cluster
~31 tok
🟢 ReadInspect an Atlas cluster.—
atlas-create-cluster
~30 tok
🟠 WriteCreate an Atlas cluster.—
atlas-create-free-cluster
~34 tok
🟠 WriteCreate a free-tier Atlas cluster.—
atlas-list-db-users
~31 tok
🟢 ReadList Atlas database users.—
atlas-create-db-user
~32 tok
🟠 WriteCreate an Atlas database user.—
atlas-list-access-list
~33 tok
🟢 ReadList Atlas IP access list entries.—
atlas-create-access-list
~33 tok
🟠 WriteAdd an Atlas access list entry.—
atlas-inspect-access-list
~33 tok
🟢 ReadInspect the Atlas access list.—
atlas-connect-cluster
~34 tok
🟢 ReadGet connection details for a cluster.—

更多连接指南