mongodb-mcp-bridge

mongodb-mcp-bridge

1

This project is a Model Context Protocol (MCP) server implemented for MongoDB integration. It facilitates seamless interaction with MongoDB databases, providing robust CRUD operations, async/await patterns, and Docker support for easy deployment.

Overview

A powerful Model Context Protocol (MCP) server implementation for MongoDB integration, providing seamless interaction with MongoDB databases through a standardized protocol.

Features

  • Full MongoDB CRUD operations support
  • Secure connection handling with MongoDB Atlas
  • Async/await patterns for optimal performance
  • Comprehensive error handling
  • Docker support for easy deployment
  • Query execution with proper type hints

Quick Start

Using uvx (Python)
  1. Run directly with uvx
  2. Use SSE transport for remote connections
Using npx (Node.js)
  1. Run directly with npx
  2. Use SSE transport for remote connections
Environment Variables

Set these environment variables before running the server:

  • MONGODB_URI (required)
  • MONGODB_DB (optional)
  • MCP_PORT (optional)
Using Docker
  1. Build the Docker image
  2. Run the container

Available Tools

  1. ping

    • Quick connection test to verify MongoDB connectivity
  2. list_databases

    • List all available databases in the MongoDB instance
  3. find_documents

    • Query documents in a collection with filtering options