Provides MongoDB-compatible database functionality through statistical modeling, allowing creation, querying, and management of databases using natural language without requiring actual data storage
MongTap - MongoDB MCP Server for LLMs
Demo video on YouTube:
By
MongTap is a Model Context Protocol (MCP) server that provides MongoDB-compatible database functionality through statistical modeling. It allows LLMs like Claude to create, query, and manage databases using natural language, without requiring actual data storage.
Repository: github.com/smallmindsco/MongTap
Website: smallminds.co
Contact: andrew@smallminds.co
Features
🚀 MongoDB Wire Protocol - Full compatibility with MongoDB drivers and tools
🧠 Statistical Modeling - Uses DataFlood technology to generate realistic data on-the-fly
🔧 MCP Integration - Works seamlessly with Claude Desktop and other MCP-compatible LLMs
📊 Natural Language - Train models from descriptions or sample data
⚡ High Performance - Generate 20,000+ documents per second
🎯 Zero Storage - Data is generated statistically, not stored
Further Documentation
Generation Control Parameters - Control document generation with $seed and $entropy
MCPB Installation - Guide for MCPB bundle installation
Installation
Prerequisites
Node.js 20+
Claude Desktop (for MCP integration)
No MongoDB installation required!
Quick Start
Clone the repository:
Install dependencies (minimal):
Test the installation:
Start MongoDB server (optional):
Claude Desktop Configuration
To use MongTap with Claude Desktop, you need to configure it as an MCP server.
1. Locate Claude Desktop Configuration
Find your Claude Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Linux:
~/.config/Claude/claude_desktop_config.json
2. Add MongTap to Configuration
Edit the configuration file and add MongTap to the mcpServers
section:
Important: Replace /absolute/path/to/MongTap
with the actual path to your MongTap installation.
3. Restart Claude Desktop
After saving the configuration, restart Claude Desktop for the changes to take effect.
Using MongTap in Claude Desktop
Once configured, MongTap provides powerful tools for database operations and data generation.
Quick Reference
Tool | Purpose | Key Feature |
| Create statistical models | From samples or descriptions |
| Start MongoDB server | Full wire protocol support |
| Stop server instance | Clean shutdown |
| View running servers | Monitor all instances |
| Generate documents | $seed and $entropy control |
| Improve models | Incremental learning |
| View available models | Local model inventory |
| Model details | Schema and statistics |
MCP Tools Reference
1. generateDataModel
Description: Create a statistical model from sample documents or a text description for data generation.
Parameters:
name
(required): Name for the modeldescription
(optional): Natural language description of the data structuresamples
(optional): Array of sample documents to train the model
Example:
2. startMongoServer
Description: Start a local MongoDB-compatible server that generates data from statistical models.
Parameters:
port
(optional): Port to listen on (0 for auto-assign, default: 27017)database
(optional): Default database name (default: "mcp")
Example:
3. stopMongoServer
Description: Stop a running MongoDB-compatible server instance by port number.
Parameters:
port
(required): Port of the server to stop
Example:
4. listActiveServers
Description: Get a list of all currently running MongoDB-compatible server instances.
Parameters: None
Example:
5. queryModel
Description: Generate documents from a statistical model with optional query filters and generation control.
Parameters:
model
(required): Name of the model to queryquery
(optional): MongoDB-style query with special parameters:$seed
: Number for reproducible generation$entropy
: Number 0-1 to control randomness level
count
(optional): Number of documents to generate (default: 10)
Example:
6. trainModel
Description: Update an existing statistical model with additional sample documents to improve generation quality.
Parameters:
model
(required): Name of the model to traindocuments
(required): Array of documents to train with
Example:
7. listModels
Description: Get a list of all available statistical models stored locally.
Parameters: None
Example:
8. getModelInfo
Description: Retrieve detailed schema and statistics for a specific statistical model.
Parameters:
model
(required): Name of the model
Example:
MCP Prompts
MongTap includes pre-built prompts for common database scenarios:
1. create_ecommerce_db
Description: Create a complete e-commerce database with products, customers, and orders.
Usage: Ask Claude to "use the create_ecommerce_db prompt" to instantly set up a full e-commerce database structure.
2. create_user_profile
Description: Create a user profile model with authentication and preferences.
Usage: Perfect for quickly setting up user management systems.
3. analyze_model
Description: Analyze an existing model and provide insights about its structure.
Usage: Understand the patterns and distributions in your statistical models.
4. generation_control
Description: Learn about using $seed and $entropy parameters for controlled generation.
Usage: Get detailed information about reproducible and controlled data generation.
MCP Resources
MongTap provides read-only resources for monitoring:
1. models://list
Description: List of all trained DataFlood models
Type: application/json
Returns: Array of model names and metadata
2. servers://status
Description: Status of all MongoDB servers
Type: application/json
Returns: Server ports, databases, and connection counts
3. models://{name}/schema
Description: Get the JSON schema for a specific model
Type: application/json
Returns: Complete JSON Schema definition
4. models://{name}/sample
Description: Get sample data from a model
Type: application/json
Returns: Array of sample documents
5. docs://generation-control
Description: Documentation for $seed and $entropy query parameters
Type: text/markdown
Returns: Detailed usage guide
Example Conversations with Claude
Creating a Data Model from Description
Starting a MongoDB Server
Generating Sample Data
Training from Sample Data
Connecting with MongoDB Clients
MongTap servers are fully compatible with MongoDB clients. Once you've started a server through Claude:
Using MongoDB Shell (mongosh)
Using Node.js MongoDB Driver
Using Python (pymongo)
Advanced Usage
Multiple Server Instances
You can run multiple MongoDB servers simultaneously:
Model Persistence
Models are automatically saved and can be reused across sessions:
Constrained Generation
Generate data with specific constraints and control parameters:
Configuration Options
Environment Variables
LOG_LEVEL
- Logging level (error, warn, info, debug, trace)MONGTAP_PORT
- Default port for MCP server (default: 3000)MONGTAP_STORAGE
- Path for model storage (default: ./welldb-models)MONGTAP_MAX_SERVERS
- Maximum concurrent MongoDB servers (default: 10)
MCP Server Modes
The MCP server can run in different modes:
Architecture
MongTap consists of three main components:
DataFlood-JS - Statistical modeling engine that learns from samples
WellDB-Node - MongoDB wire protocol implementation
MCP Server - Integration layer for LLM tools
Troubleshooting
Claude Desktop doesn't show MongTap tools
Check the configuration file path is correct
Ensure the path to MongTap is absolute, not relative
Restart Claude Desktop completely
Check logs:
tail -f ~/Library/Logs/Claude/mcp-*.log
(macOS)
MongoDB client can't connect
Verify the server is running: Use "listActiveServers" in Claude
Check the port is not in use:
lsof -i :27017
Ensure firewall allows local connections
Try connecting with IP:
mongodb://127.0.0.1:27017
Model generation seems incorrect
Provide more sample data for better training
Use consistent data formats in samples
Check model info to see learned patterns
Retrain with additional constraints if needed
Development
Running Tests
Project Structure
License
MIT License - See LICENSE file for details.
Privacy Policy
MongTap is designed with privacy as a fundamental principle:
Data Collection
NO personal data collection - MongTap does not collect any user data
NO analytics or tracking - No usage statistics are gathered
NO external connections - All operations are performed locally
NO data persistence - Models are statistical representations, not actual data
Data Storage
All models are stored locally on your machine
Storage locations are fully configurable via
mongtap.config.json
No cloud services or external storage is used
Generated data is synthetic and does not represent real information
Data Security
Local-only operation ensures data never leaves your machine
No authentication required (no credentials to compromise)
Open source code allows full security auditing
Input validation prevents injection attacks
Security
MongTap implements comprehensive security measures:
Input Validation: All inputs are validated before processing
Error Handling: Graceful error handling prevents information leakage
No External Dependencies: Core functionality has minimal dependencies
Local Operation: No network exposure unless explicitly configured
Open Source: Full code transparency for security auditing
For detailed security information, see docs/SECURITY_AUDIT.md.
Support
Issues: GitHub Issues
Documentation: docs/
Status: DesignDocuments/STATUS.claude
Contact: SmallMinds LLC Co - smallminds.co - andrew@smallminds.co
Acknowledgments
DataFlood technology for statistical modeling
MongoDB for protocol specification
Anthropic for MCP protocol
Claude Desktop for LLM integration
Note: MongTap generates data statistically and does not store actual data. It's perfect for development, testing, and demonstration purposes where you need realistic data without the overhead of actual storage.
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
Enables LLMs to create, query, and manage MongoDB-compatible databases using natural language without actual data storage. Uses statistical modeling to generate realistic data on-the-fly from sample documents or descriptions.