Mongo Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Mongo Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server that enables LLMs to interact directly with MongoDB databases. Query collections, inspect schemas, and manage data seamlessly through natural language.
The Model Context Protocol (MCP) is an open standard developed by Anthropic that creates a universal way for AI systems to connect with external data sources and tools. MCP establishes a standardized communication channel between:
Key benefits of MCP:
Before you begin, ensure you have:
You can verify your Node.js installation by running:
node --version # Should show v18.0.0 or higherTo get started, find your MongoDB connection URL and add this configuration to your Claude Desktop config file:
MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"mongo-mcp",
"mongodb://<username>:<password>@<host>:<port>/<database>?authSource=admin"
]
}
}
}Smithery.ai is a registry platform for MCP servers that simplifies discovery and installation. To install MongoDB MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mongo-mcp --client claudeTo use MongoDB MCP with Cursor.ai:
mongodbnpxmongo-mcp mongodb://<username>:<password>@<host>:<port>/<database>?authSource=adminNote: Cursor currently supports MCP tools only in the Agent in Composer feature.
If you don't have a MongoDB server to connect to and want to create a sample sandbox, follow these steps:
docker-compose up -dnpm run seedAdd this configuration to your Claude Desktop config file:
MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json
#### Local Development Mode:
{
"mcpServers": {
"mongodb": {
"command": "node",
"args": [
"dist/index.js",
"mongodb://root:example@localhost:27017/test?authSource=admin"
]
}
}
}The seed script creates three collections with sample data:
#### Users
#### Products
#### Orders
Try these prompts with Claude to explore the functionality:
"What collections are available in the database?"
"Show me the schema for the users collection"
"Find all users in San Francisco""Find all electronics products that are in stock and cost less than $1000"
"Show me all orders from the user [email protected]"
"List the products with ratings above 4.5""What indexes exist on the users collection?"
"Create an index on the products collection for the 'category' field"
"List all indexes across all collections""Insert a new product with name 'Gaming Laptop' in the products collection"
"Update the status of order with ID X to 'shipped'"
"Find and delete all products that are out of stock"The server provides these tools for database interaction:
listCollections: Lists available collections in the databasefind: Queries documents with filtering and projectioninsertOne: Inserts a single document into a collectionupdateOne: Updates a single document in a collectiondeleteOne: Deletes a single document from a collectioncreateIndex: Creates a new index on a collectiondropIndex: Removes an index from a collectionindexes: Lists indexes for a collectionThis project is built with:
To set up the development environment:
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
# Run tests
npm testWhen using this MCP server with your MongoDB database:
readPreference=secondary)⚠️ IMPORTANT: Always follow the principle of least privilege when configuring database access.
The MongoDB MCP server:
All operations are executed with proper validation to prevent security issues such as injection attacks.
You can deploy this MCP server in several ways:
npm install -g @coderay/mongo-mcp-serverauthSource=admin) # macOS
tail -n 20 -f ~/Library/Logs/Claude/mcp*.logIf you encounter issues:
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.