ro-mongodb-mcp-rs

Provides a read-only MCP server to query MongoDB via MCP with direct or Kubernetes connections.
  • rust

1

GitHub Stars

rust

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "chrstnwhlrt-ro-mongodb-mcp-rs": {
      "command": "./target/release/ro-mongodb-mcp-rs",
      "args": []
    }
  }
}

You run a high-performance MCP server that lets language models perform read-only queries against MongoDB. It supports direct URLs and Kubernetes-based MongoDB deployments, offers saved queries with variable substitution, and protects you with a 30-second timeout to prevent runaway queries.

How to use

You interact with the server through an MCP client that issues read-only MongoDB operations. Choose a configured connection that matches where your MongoDB lives (local, Atlas, or a Kubernetes deployment). Use the client to perform standard read operations like find, aggregate, countDocuments, and distinct, with optional limit, sort, and projection controls. Save commonly used queries with variables for reuse, and run them by supplying the runtime values you need. If you work with large datasets, consider adding filters or limits to keep responses fast and predictable.

How to install

Prerequisites you need before installing and running the server.

  1. Install Rust toolchain (edition 2024) on your system.

  2. Build the MCP server.

Available tools

Discovery: list_connections

List all configured MCP connections so you can see which MongoDB targets you can query.

Discovery: list_collections

List MongoDB collections in the selected database with exact case-sensitive names.

Discovery: get_data_model

Retrieve the schema/documentation that describes your collections for better guidance to the LLM.

Discovery: get_current_time

Return the current time to support time-based queries.

Query: query_mongodb

Execute a read-only MongoDB operation such as find, aggregate, countDocuments, or distinct.

Saved Query: save_query

Persist a query template with placeholder variables for later reuse.

Saved Query: list_saved_queries

List all saved queries for a given connection.

Saved Query: get_saved_query

Retrieve details about a specific saved query.

Saved Query: run_saved_query

Execute a saved query with optional runtime variables and overrides.

Saved Query: delete_saved_query

Delete a saved query from storage.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational