You can use MongoDB with Claude Code through the official MongoDB Claude Plugin.
The MongoDB Claude Plugin provides:
The MongoDB MCP Server
Pre-built agent skills for common MongoDB tasks. See the MongoDB Agent Skills documentation for more information.
Install the MongoDB Claude Plugin
The MongoDB Claude Plugin is available in the official Anthropic Plugin Marketplace.
Install the MongoDB Claude Plugin Locally
To install the MongoDB Claude Plugin:
Start a session with Claude Code.
Add the MongoDB Claude Plugin to Claude Code locally:
claude plugin marketplace add https://github.com/mongodb/agent-skills.git Use the
/plugincommand to open the plugins menu.Search for "MongoDB" and select the official MongoDB plugin.
Follow the prompts to complete the installation.
Run
/reload-pluginsto apply the changes.
After installing the plugin, you must configure the MCP Server before using any agent skills or functionality that connects to MongoDB.
Configure the MCP Server
The MongoDB Claude Plugin bundles the MongoDB MCP Server. To configure the MCP Server, see MongoDB MCP Server Get Started.