# Mcp Mongo Server

> A Model Context Protocol Server for MongoDB

- **Type:** MCP server
- **Install:** `agentstack add mcp-kiliczsh-mcp-mongo-server`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [kiliczsh](https://agentstack.voostack.com/s/kiliczsh)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [kiliczsh](https://github.com/kiliczsh)
- **Source:** https://github.com/kiliczsh/mcp-mongo-server
- **Website:** https://www.npmjs.com/package/mcp-mongo-server

## Install

```sh
agentstack add mcp-kiliczsh-mcp-mongo-server
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# MCP MongoDB Server
---

[](https://smithery.ai/server/mcp-mongo-server)
[](https://mseep.ai/app/e274a3dd-7fe6-4440-8c43-043bae668251)

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

[](https://www.youtube.com/watch?v=FI-oE_voCpA)

## 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

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

## Usage

```bash
# 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

- [Integration Guide](docs/integration.md) - Claude Desktop, Windsurf, Cursor, Docker
- [Available Tools](docs/tools.md) - Query, aggregate, update, insert, and more
- [Development](docs/development.md) - Setup, scripts, and debugging
- [Contributing](CONTRIBUTING.md)

## License

MIT - see [LICENSE](LICENSE) for details.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [kiliczsh](https://github.com/kiliczsh)
- **Source:** [kiliczsh/mcp-mongo-server](https://github.com/kiliczsh/mcp-mongo-server)
- **License:** MIT
- **Homepage:** https://www.npmjs.com/package/mcp-mongo-server

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-kiliczsh-mcp-mongo-server
- Seller: https://agentstack.voostack.com/s/kiliczsh
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
