Skip to main content
Glama
kiliczsh
by kiliczsh

MCP MongoDB Server


NPM Version NPM Downloads NPM License

A Model Context Protocol server that enables LLMs to interact with MongoDB databases. This server provides capabilities for inspecting collection schemas and executing MongoDB operations through a standardized interface.

Demo

MCP MongoDB Server Demo | Claude Desktop

Related MCP server: MongoDB MCP Server for LLMs

Key Features

  • Smart ObjectId Handling - Configurable auto/none/force modes for string-to-ObjectId conversion

  • Read-Only Mode - Protection against write operations, uses secondary read preference

  • Schema Inference - Automatic collection schema detection from document samples

  • Query & Aggregation - Full MongoDB query and aggregation pipeline support with optional explain plans

  • Write Operations - Insert, update, and index creation (when not in read-only mode)

  • Collection Completions - Auto-complete collection names for LLM integration

Installation

npx -y mcp-mongo-server mongodb://localhost:27017/database

Usage

# Start server with MongoDB URI
npx -y mcp-mongo-server mongodb://muhammed:kilic@localhost:27017/database

# Connect in read-only mode
npx -y mcp-mongo-server mongodb://muhammed:kilic@localhost:27017/database --read-only

Environment Variables

Variable

Description

MCP_MONGODB_URI

MongoDB connection URI

MCP_MONGODB_READONLY

Enable read-only mode ("true")

Documentation

License

MIT - see LICENSE for details.

Install Server
A
license - permissive license
B
quality
A
maintenance

Maintenance

Maintainers
53dResponse time
6wRelease cycle
5Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    F
    maintenance
    A Model Context Protocol (MCP) server that enables LLMs to interact directly with MongoDB databases. Query collections, inspect schemas, and manage data seamlessly through natural language.
    Last updated
    45
    174
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    A Model Context Protocol server that enables LLMs to interact directly with MongoDB databases, allowing users to query collections, inspect schemas, and manage data through natural language.
    Last updated
    45
    2
    MIT
  • A
    license
    D
    quality
    D
    maintenance
    A Model Context Protocol server that enables LLMs to interact with databases (currently MongoDB) through natural language, supporting operations like querying, inserting, deleting documents, and running aggregation pipelines.
    Last updated
    5
    11
    MIT

View all related MCP servers

Related MCP Connectors

  • A Model Context Protocol server for Wix AI tools

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • MCP (Model Context Protocol) server for Appwrite

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kiliczsh/mcp-mongo-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server