MongoDB MCP Server
About
MongoDB MCP Server is a Model Context Protocol (MCP) server that connects to MongoDB and exposes a query tool to retrieve data from collections via a simple interface. It currently supports read-only transactions and is intended for local integrations and command line tools.
Details
- Author
- PrashantSedhain
- GitHub stars
- 3
- Downloads
- 307
- Categories
- Database
Jump to
- Exposes a query tool for MongoDB collections
- Read‑only transactions only
- Connects to local or cloud MongoDB databases
- Built with Node.js and TypeScript
- Includes a client application for interaction
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MongoDB MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Clone the repository, install dependencies with npm install, and create a .env file with your MONGO_CONNECTION_STRING. Build the TypeScript code with npm run build, then run the client with node dist/client/client.js dist/index.js.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mongodb mcp server": {
"mongo-db-mcp": {
"command": "node",
"args": [
"dist/client/client.js",
"dist/index.js"
]
}
}
}
}
McpServers
{
"mongo-db-mcp": {
"command": "node",
"args": [
"dist/client/client.js",
"dist/index.js"
]
}
}
MongoDB MCP Server
A Model Context Protocol (MCP) server for MongoDB that allows querying MongoDB collections through a simple interface for local integrations and command line tools.
Overview
This project implements an MCP server that connects to MongoDB and provides a query tool to retrieve data from collections. It currently only supports read-only transactions. Project includes:
- A MongoDB MCP server that exposes database querying capabilities
- A client application for interacting with the server
- Utilities for MongoDB connection and transaction management
Prerequisites
- Node.js (v16 or higher)
- npm
- MongoDB database (local or cloud-based)
Installation
1. Clone the repository:
git clone https://github.com/yourusername/mongo-db-mcp.git
cd mongo-db-mcp
2. Install dependencies:
npm install
3. Create a .env file in the root directory with your MongoDB connection string:
MONGO_CONNECTION_STRING=your_mongodb_connection_string
Building the Project
Build the TypeScript code:
npm run build
Running the client
node dist/client/client.js dist/index.js
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



