ro-mongodb-mcp-rs
Verified Safeby chrstnwhlrt
Overview
A Model Context Protocol (MCP) server for executing read-only MongoDB queries, enabling LLMs to safely interact with MongoDB databases.
Installation
./target/release/ro-mongodb-mcp-rsEnvironment Variables
- KUBECONFIG
- RUST_LOG
Security Notes
The server is explicitly designed for read-only operations, preventing accidental or malicious write/delete actions. Query injection risks are mitigated by JSON-escaping collection names and validating user-provided queries as JSON before execution. For Kubernetes connections, it uses `mongosh --eval` but with carefully constructed and escaped commands. Credentials for K8s are discovered securely from mounted files within the MongoDB pods (paths defined by environment variables). Direct connections use a native Rust MongoDB driver. A 30-second query timeout is in place to prevent resource exhaustion. Users are advised to secure the `config.yaml` file if it contains direct MongoDB connection strings with credentials.
Similar Servers
mkp
MKP is a Model Context Protocol (MCP) server for Kubernetes, enabling LLM-powered applications to interact with Kubernetes clusters by providing tools for resource listing, getting, applying, deleting, and executing commands.
mcp-server-couchbase
An MCP server enabling LLMs to interact directly with Couchbase clusters for data operations, schema retrieval, and query performance analysis.
kdb-x-mcp-server
Enables natural language interaction and AI-powered querying of KDB-X and KDB+ databases through the Model Context Protocol (MCP).
monkdb-mcp
Enables LLM frameworks (Claude, LangChain, CrewAI) to securely and efficiently interact with MonkDB using standardized tools for SQL queries, table inspection, and health checks.