A Model Context Protocol (MCP) server (v0.2.0) that enables LLMs like Claude to interact directly with MongoDB databases. It provides tools for querying collections, inspecting schemas, managing indexes, and performing document operations (insert, update, delete). Designed to be used as a tool provider for MCP clients (e.g., Claude Desktop). Requires Node.js 18+ and a MongoDB connection string. Differentiators: leverages the MCP standard, easy setup via npx, and provides a sandbox for testing. Active development, frequent updates expected.
npm install mongo-mcpNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Claude Desktop configuration to connect to a local MongoDB sandbox. Replace connection string with your own.
Use via npx or run the dist/index.js directly. Do not require() or import this package.
Use environment variables or secrets management for the connection string.
Use a MongoDB user with limited privileges (read-only, specific database) for production.
Pin to a specific version and test updates in a sandbox before using in production.
Do not import in code. Run: npx mongo-mcp <connection_string>
Pass a valid MongoDB connection string: node dist/index.js mongodb://...
Kill the process using port 3000 or configure a different port (if supported).