MongoDB That Works

MongoDB That Works is an MCP server that connects LLM clients directly to MongoDB databases with built-in schema discovery and field validation. Built using TypeScript and Zod validation, the server runs over standard input/output (stdio) and enables AI assistants to inspect collection structures, validate field names, and execute CRUD operations. Developers, data engineers, and technical teams use it to interact with NoSQL data stores without manually writing and testing raw database drivers. The server exposes tools for listing collections, fetching document schemas, running aggregation pipelines, and querying documents with filters and pagination. It also provides write capabilities, including single-document insertion, updates, and deletions. By providing MCP tool annotations for read-only and destructive actions, the server helps clients identify safe versus mutating calls. Because it supports standard MongoDB connection strings, it interfaces with both local MongoDB instances and cloud-hosted MongoDB Atlas deployments.

Category: Databases & Data Stores

Tags: database, mongodb, nosql, schema-discovery

Visit MongoDB That Works

How to install and configure MongoDB That Works

  1. Ensure Node.js (version 16 or higher) is installed on your machine. 2. In your MCP client configuration (such as Claude Desktop, Cursor, or VS Code), add the server entry pointing to the npm package @sourabhshegane/mongodb-mcp-that-works@latest using npx. 3. Configure the environment variables by setting MONGODB_URI to your MongoDB connection string (e.g., mongodb+srv://<user>:<password>@cluster.mongodb.net/<database>). Optionally set MONGODB_DATABASE to specify a default database. 4. Save your configuration and restart your client. For instance, in Claude Desktop, edit claude_desktop_config.json with the command npx and args ["-y", "@sourabhshegane/mongodb-mcp-that-works@latest"] under the mongodb server key.

What you can do with MongoDB That Works

  • Analyzing collection structures and field data types using getSchema to understand database contents before writing queries. - Running multi-stage aggregation pipelines on MongoDB collections to compute metrics and summarize transactional records directly from LLM prompts. - Searching and filtering documents across collections using find and findOne with explicit sorting, limits, and pagination parameters. - Updating or inserting individual documents into application databases through natural language requests handled via insertOne and updateOne. - Counting matching records and retrieving distinct values across specific fields using count and distinct for instant dataset profiling.

Key facts

  • https://github.com/sourabhfb/mongodb-mcp-that-works
  • Databases & Data Stores
  • database, mongodb, nosql, schema-discovery

Part of MCP Servers

Related MCP servers

  • MCP Memory Keeper — MCP Memory Keeper is an MCP server that provides persistent context management and memory storage for Claude AI coding assistants.…
  • MCP Notes — MCP Notes is an MCP server that provides note-taking and note-management capabilities to AI models using Amazon Web Services DynamoDB…
  • MCP Neo4j Server — MCP Neo4j Server is an MCP server that provides an integration between the Neo4j graph database and Model Context Protocol…
  • MCP Memory Toolkit — MCP Memory Toolkit is an MCP server that provides persistent memory capabilities for Claude and other compatible assistants using ChromaDB.…
  • MCP Memory Server — MCP Memory Server is an MCP server that integrates Claude Desktop with Azure Cosmos DB and OpenAI embeddings to provide…
  • MCP MS SQL Server — MCP MS SQL Server is an MCP server that provides a standardized Model Context Protocol interface for AI models to…

How do I install MongoDB That Works?

You can run the server directly using npx by specifying @sourabhshegane/mongodb-mcp-that-works@latest in your MCP client configuration. Alternatively, install it globally from npm by executing npm install -g @sourabhshegane/mongodb-mcp-that-works in your terminal.

Which MCP clients work with MongoDB That Works?

MongoDB That Works operates over standard stdio, making it compatible with any MCP-compliant client. Supported clients include Claude Desktop, Claude Code, OpenAI Codex, Cursor, VS Code with GitHub Copilot, and Zed.

What tools are available in MongoDB That Works?

The server provides ten core tools: listCollections, find, findOne, aggregate, count, distinct, insertOne, updateOne, deleteOne, and getSchema. These tools support collection exploration, document filtering, pipeline aggregation, schema validation, and single-document mutations.

Does MongoDB That Works support write operations?

Yes, it supports insertOne, updateOne, and deleteOne. These tools carry destructive hints in the MCP annotations to notify clients of state changes. For sensitive or high-risk environments, using a read-only database user in the connection string is recommended.

What configuration options are required?

The only required configuration setting is the MONGODB_URI environment variable containing your standard MongoDB connection string. You can also optionally provide MONGODB_DATABASE to define the fallback database name if it is not embedded in the URI.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories