JUHE API Marketplace
kiliczsh avatar
MCP Server

mcp-mongo-server

A Model Context Protocol Server for MongoDB

276
GitHub Stars
3/10/2026
Last Updated
MCP Server Configuration
1{
2 "name": "mongodb-env",
3 "command": "npx",
4 "args": [
5 "-y",
6 "mcp-mongo-server"
7 ],
8 "env": {
9 "MCP_MONGODB_URI": "mongodb://muhammed:kilic@localhost: 27017/database",
10 "MCP_MONGODB_READONLY": "true"
11 }
12}
JSON12 lines
  1. Home
  2. MCP Servers
  3. mcp-mongo-server

README Documentation

MCP MongoDB Server


smithery badge Verified on MseeP

A Model Context Protocol server that enables LLMs to interact with MongoDB databases. This server provides capabilities for inspecting collection schemas and executing MongoDB operations through a standardized interface.

Demo

MCP MongoDB Server Demo | Claude Desktop

Key Features

  • Smart ObjectId Handling - Configurable auto/none/force modes for string-to-ObjectId conversion
  • Read-Only Mode - Protection against write operations, uses secondary read preference
  • Schema Inference - Automatic collection schema detection from document samples
  • Query & Aggregation - Full MongoDB query and aggregation pipeline support with optional explain plans
  • Write Operations - Insert, update, and index creation (when not in read-only mode)
  • Collection Completions - Auto-complete collection names for LLM integration

Installation

npx -y mcp-mongo-server mongodb://localhost:27017/database

Usage

# Start server with MongoDB URI
npx -y mcp-mongo-server mongodb://muhammed:kilic@localhost:27017/database

# Connect in read-only mode
npx -y mcp-mongo-server mongodb://muhammed:kilic@localhost:27017/database --read-only

Environment Variables

VariableDescription
MCP_MONGODB_URIMongoDB connection URI
MCP_MONGODB_READONLYEnable read-only mode ("true")

Documentation

  • Integration Guide - Claude Desktop, Windsurf, Cursor, Docker
  • Available Tools - Query, aggregate, update, insert, and more
  • Development - Setup, scripts, and debugging
  • Contributing

License

MIT - see LICENSE for details.

Quick Install

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.aiFeatured on ShowMeBestAI
Copyright © 2026 JUHEDATA HK LIMITED - All rights reserved