- Home
- MCP servers
- QueryNest
QueryNest
- python
1
GitHub Stars
python
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": {
"niuzaishu-querynest": {
"command": "uvx",
"args": [
"--from",
".",
"--no-cache",
"querynest-mcp"
],
"env": {
"QUERYNEST_LOG_LEVEL": "INFO",
"QUERYNEST_CONFIG_PATH": "/path/to/config.yaml"
}
}
}
}QueryNest is a Python-based MCP server that enables intelligent querying across multiple MongoDB instances. You can describe what you want in natural language, and the system translates it into MongoDB-native queries, optimized for performance, with safeguards like read-only access and query limits. It automatically discovers MongoDB instances, analyzes schemas, and provides interactive query generation and confirmation through MCP-compliant tooling.
How to use
You connect to QueryNest through an MCP client and perform a sequence of operations to locate databases, analyze collections, and generate queries from natural language descriptions. Start by discovering available MongoDB instances, then inspect databases and collections to understand their structure. When you have a natural language query, generate a corresponding MongoDB query, review it, and confirm execution to obtain results. The system handles authentication, applies safety constraints, and can suggest indexing or optimization opportunities to improve performance.
How to install
# Prerequisites
# - Python 3.8+
# - MongoDB 4.0+
# - Optional: Redis for caching
# Step 1: Install the uv tool
pip install uv
# Step 2: Install and run from project directory (recommended)
cd /path/to/QueryNest
uvx --from . --no-cache querynest-mcp
# Step 3: (Alternative) set a config path and start
export QUERYNEST_CONFIG_PATH=/path/to/config.yaml
uvx --from /path/to/QueryNest --no-cache querynest-mcp
# Step 4: Verify startup
uvx --from . --no-cache querynest-mcp --help
Additional sections
Configuration, security, and usage notes are provided below. You will configure multiple MongoDB instances, ensure read-only access, and enable data masking and auditing to protect sensitive information. Use the MCP tooling to discover instances and databases, analyze collections, and generate queries from natural language descriptions. Environment variables control configuration paths and logging, and the system exposes health and performance metrics for monitoring.
Available tools
discover_instances
Finds and lists all available MongoDB instances, including health and basic stats.
discover_databases
Lists all databases within a specified MongoDB instance, with options to include collections and exclude system databases.
analyze_collection
Analyzes the structure and field information of a specified collection, with semantic and example data if requested.
manage_semantics
Manages business semantic information for fields and collections, enabling semantic consistency across queries.
generate_query
Generates a MongoDB query from a natural language description, tailored to a specific instance/database/collection.
confirm_query
Executes the generated query, returns results, and can provide explain plans for optimization.