BlogLearn how MongoDB is accelerating developer productivity in the AI era. Read the blog >

TOOLS

MongoDB MCP Server

Bring database context into your agentic experiences with the official MongoDB MCP (Model Context Protocol) Server. Connect MongoDB deployments to your favorite AI tools and agents.

Read the DocsMongoDB MCP Server on GitHub
Illustration of a database producing charts.

Database context for better code

Your database holds the core data for your applications. Retrieving database configuration, collection schemas, and sample data enables coding agents to generate accurate, working code and optimized queries.

Illustration of AI Industry
Illustration of hands typing on a laptop and a superimposed desktop window with some code on it.

Use with your favorite AI tools

The MongoDB MCP Server integrates with AI-powered IDEs and coding agents, providing the context developers and agents need to build with MongoDB.

Simplify development workflows

No more copy-pasting schemas or switching tools. Explore and manage MongoDB deployments without leaving your development environment.

Illustration that represents task automation.
Illustration of a database with a screwdriver and a power plug, representing database setup.

Power your own agents

The MongoDB MCP Server lets you build agents that explore and query data autonomously. It acts as a plugin for any MCP-enabled agent.

What can you do with the MongoDB MCP Server?

Bring valuable context from MongoDB databases into development environments for data exploration, database operations, and context-aware code generation.

Interact with MongoDB in natural language

Connecting the MongoDB MCP Server to your AI development tools lets you use natural language to explore and manage databases while generating accurate application code.

Explore and query data
Manage databases
Generate code

Connect to any MongoDB deployments

The MCP Server connects to any MongoDB deployment, including Atlas, Community Edition, and Enterprise Advanced. A connection string grants database access, while Atlas service account credentials unlock Atlas-specific tools for cluster management.

Learn more about deployment options
Command line
Docker
Configuration file

Connect to IDEs and CLI coding agents

AI clients use different configuration files and syntax to set up MCP Servers. Use these templates to get started.

Learn more
VSCode (GitHub Copilot)
Cursor
Windsurf
Claude Code
OpenAI Codex CLI

MongoDB MCP Server use cases

View all use cases

Learning hub

Quick and easy resources to start building with the MongoDB MCP Server.

FAQ

Get started with the MongoDB MCP Server

Supercharge your coding agents with database context.
Read the DocsView on GitHub
WHY USE MCP SERVER?
  • Database context for better code
  • Works with your favorite AI tools
  • Simplified development workflows