Skip to main content
plugin

mongodb — Claude Code plugin: what it does, how to install

This plugin connects Claude Code to MongoDB through a local MCP server. Use it to inspect data, run queries, and work on indexes.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin install mongodb@claude-plugins-official
/plugin marketplace add anthropics/claude-plugins-community
/plugin install mongodb@claude-community
/plugin marketplace add anthropics/claude-plugins-official
Open on GitHub

What mongodb does

The plugin connects Claude Code to MongoDB with a connection string. It starts the MongoDB MCP server locally through npx, giving the agent tools for inspecting databases and collections, running queries and aggregation pipelines, and managing indexes. It covers Community, Enterprise Advanced, a local development container, and an Atlas cluster.

Bundled skills handle MCP and client connection setup, turn plain-language requests into read-only find queries or aggregation pipelines, diagnose slow queries, and suggest indexes. Other skills cover schema patterns, Queryable Encryption sizing, Atlas Search, Vector Search, and Atlas Stream Processing workspaces, connections, and processors.

You need a MongoDB connection string and environment variables for the MCP setup. The Queryable Encryption sizing skill does not apply to collections using Client-Side Field Level Encryption.

What it helps with

  • connect Claude Code to a MongoDB database
  • inspect collections and run an aggregation
  • diagnose a slow MongoDB query
  • choose indexes for a query
  • shape a MongoDB schema during a SQL migration

Example prompts for the agent

  • Set up the MongoDB MCP connection and check the connection string.
  • Write a read-only find query for orders filtered by status and date.
  • Investigate this slow query and recommend indexes for it.

How to install mongodb

Plugin marketplace

/plugin install mongodb@claude-plugins-official
/plugin marketplace add anthropics/claude-plugins-community
/plugin install mongodb@claude-community
/plugin marketplace add anthropics/claude-plugins-official

Step by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own

Questions about mongodb

How do I install mongodb in Claude Code?

First add the official marketplace with /plugin marketplace add anthropics/claude-plugins-official, then install the plugin using /plugin install mongodb@claude-plugins-official.

What does the mongodb plugin do?

It links Claude Code with MongoDB through a local MCP server. The agent can inspect databases and collections, run queries and aggregations, and manage indexes.

What is required to connect MongoDB?

The MCP setup needs a MongoDB connection string and environment variables. The server runs locally through npx.

Source text

mongodb · Apache-2.0
# MongoDB (Self-Managed MCP)

For deployments you manage yourself — **Community**, **Enterprise Advanced**, a local dev container, or an Atlas cluster — this plugin connects your agent using nothing more than a connection string. It runs the [MongoDB MCP server](https://www.mongodb.com/docs/mcp-server/) locally via `npx`, giving your agent tools to explore databases and collections, run queries and aggregations, and manage indexes.

To get started, see the [Community & Enterprise Advanced setup guide](../../README.community.md).

## Skills

These skills come bundled with the plugin and activate automatically when relevant:

- **`mongodb-mcp-setup`** — Walks you through configuring the MCP server's connection string and environment variables.
- **`mongodb-connection`** — Reviews and tunes client connection configuration (pools, timeouts, patterns) across driver languages.
- **`mongodb-natural-language-querying`** — Turns natural-language requests into read-only `find` queries and aggregation pipelines.
- **`mongodb-qe-size-estimation`** — Estimates the storage and memory impact of encrypting fields in collections with Queryable Encryption (QE) enabled. Doesn't apply to collections that use Client-Side Field Level Encryption (CSFLE).
- **`mongodb-query-optimizer`** — Diagnoses slow queries and recommends indexes to fix them.
- **`mongodb-schema-design`** — Applies MongoDB schema design patterns and steers you clear of common anti-patterns, whether modeling from scratch or migrating from SQL.
- **`mongodb-search-and-ai`** — Helps build Atlas Search (full-text), Vector Search (semantic), and hybrid search implementations.
- **`mongodb-atlas-stream-processing`** — Manages Atlas Stream Processing workspaces, connections, and processors for streaming workloads.

© mongodb · Apache-2.0 · mongodb/agent-skills

Similar plugins

All plugins for Data and databases →

From the same set9

mongodb-query-optimizer This skill digs into slow MongoDB queries and suggests indexes. Handy when explain() shows a COLLSCAN and your database drags. CX Codex +1 7,000installs mongodb-schema-design This skill guides MongoDB schema design and reviews, from embedding choices to document limits, validation, migrations, and performance problems caused by data models. CX Codex +1 6,800installs mongodb-search-and-ai Guides search implementation in MongoDB Atlas, from full-text matching to vector search. Configures indexes and queries tailored to your schemas. CX Codex +1 5,800installs mongodb-connection A skill that makes your agent size MongoDB pools and timeouts from your actual workload instead of copying random numbers. CX Codex +1 5,200installs mongodb-natural-language-querying Generates read-only MongoDB queries and aggregation pipelines from plain-language requests. Use it when you need filters, grouping, or SQL-like requests expressed in MongoDB syntax. CX Codex +1 4,700installs mongodb-mcp-setup Guides you through configuring the MongoDB MCP server for agentic clients. Useful when the server is installed but environment variables or credentials are still missing. CX Codex +1 4,000installs mongodb-atlas-stream-processing A skill for Atlas Stream Processing: provisions workspaces, wires up connections and processors, runs diagnostics and picks a tier. CX Codex +1 3,600installs mongodb-atlas Links Claude Code to MongoDB Atlas clusters using a hosted MCP server over OAuth. You sign in once and avoid hardcoding connection strings. ★ 190repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor