database
MongoDB Atlas MCP Integration for Cursor
Connect MongoDB Atlas to Cursor through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect MongoDB Atlas to Cursor
Expose selected local integrations to Cursor through KosmoKrator without configuring each service as its own MCP server.
Create or update .cursor/mcp.json with a KosmoKrator stdio server entry. The gateway is local, scoped to this integration, and starts with
--write=deny so Cursor can inspect read-capable tools without receiving write access by default.
MongoDB Atlas MCP Config for Cursor
Use the same KosmoKrator install and integration credentials that power terminal and headless runs.
{
"mcpServers": {
"kosmokrator-mongodb": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=mongodb",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=mongodb --write=deny Why Use KosmoKrator Here
Expose only MongoDB Atlas instead of a broad multi-service tool list.
Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.
Start read-only, then opt into ask or allow for trusted workspaces.
MongoDB Atlas Tools Visible to Cursor
Cursor sees stable MCP tool names generated from the MongoDB Atlas integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__mongodb__mongodb_find | mongodb.mongodb_find | Read | Query documents from a MongoDB Atlas collection. Supports filtering, projection, sorting, pagination (limit/skip). Returns an array of matching documents. |
integration__mongodb__mongodb_find_one | mongodb.mongodb_find_one | Read | Find a single document in a MongoDB Atlas collection. Returns the first matching document or null if no match is found. |
integration__mongodb__mongodb_insert_one | mongodb.mongodb_insert_one | Write | Insert a single document into a MongoDB Atlas collection. Returns the inserted document ID. |
integration__mongodb__mongodb_insert_many | mongodb.mongodb_insert_many | Write | Insert multiple documents into a MongoDB Atlas collection in a single operation. Returns the inserted document IDs. |
integration__mongodb__mongodb_update_one | mongodb.mongodb_update_one | Write | Update a single document in a MongoDB Atlas collection. Uses a filter to match the document and an update operations object (e.g., {"$set": {"field": "value"}}). |
integration__mongodb__mongodb_delete_one | mongodb.mongodb_delete_one | Write | Delete a single document from a MongoDB Atlas collection. Uses a filter to match the document to delete. |
integration__mongodb__mongodb_aggregate | mongodb.mongodb_aggregate | Read | Run an aggregation pipeline on a MongoDB Atlas collection. Supports all pipeline stages ($match, $group, $sort, $project, $limit, $lookup, etc.). |
integration__mongodb__mongodb_list_collections | mongodb.mongodb_list_collections | Read | List all collections in a MongoDB Atlas database. Useful for discovering what data is available before running queries. |
integration__mongodb__mongodb_get_current_user | mongodb.mongodb_get_current_user | Read | Verify connectivity to MongoDB Atlas and get current user/session information. Useful for testing that credentials are working. |