mcp-mongo-server  by kiliczsh

LLM integration for MongoDB

Created 9 months ago
263 stars

Top 96.9% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a Model Context Protocol (MCP) server for MongoDB, enabling Large Language Models (LLMs) to interact with MongoDB databases. It offers schema inspection and a range of MongoDB operations, including read and write capabilities, with smart ObjectId handling and a configurable read-only mode for safe production database access.

How It Works

The server acts as a bridge between LLMs and MongoDB, exposing database operations through a standardized MCP interface. It intelligently handles conversions between string IDs and MongoDB's ObjectId type, configurable via the objectIdMode parameter. The server can be run in a read-only mode, leveraging MongoDB's secondary read preference for performance and safety, making it suitable for direct integration with production environments.

Quick Start & Requirements

  • Install: npm install -g mcp-mongo-server
  • Run: npx -y mcp-mongo-server <mongodb_uri>
  • Prerequisites: Node.js, npm, MongoDB instance.
  • Configuration: Via environment variables (MCP_MONGODB_URI, MCP_MONGODB_READONLY) or command-line arguments (--read-only).
  • Docs: Full documentation

Highlighted Details

  • Supports LLM integration for collection completions and schema inference.
  • Provides tools for querying, aggregation, counting, updating, inserting, and creating indexes.
  • Offers serverInfo for retrieving MongoDB server details.
  • Includes debugging tools via npm run inspector.

Maintenance & Community

The project is maintained by kiliczsh. Further community interaction details are not specified in the README.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

Debugging MCP servers can be challenging due to stdio communication; the provided inspector tool aims to mitigate this. The README does not detail specific performance benchmarks or known limitations beyond the debugging aspect.

Health Check
Last Commit

3 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 30 days

Explore Similar Projects

Starred by Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), Michael Chiang Michael Chiang(Cofounder of Ollama), and
2 more.

enrichmcp by featureform

0.3%
611
ORM for AI agents
Created 5 months ago
Updated 1 week ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Anton Troynikov Anton Troynikov(Cofounder of Chroma), and
44 more.

llama_index by run-llama

0.3%
44k
Data framework for building LLM-powered agents
Created 2 years ago
Updated 21 hours ago
Feedback? Help us improve.