MCP MongoDB Server
@SFBB
About MCP MongoDB Server
A Model Context Protocol (MCP) server that provides an interface between LLMs and MongoDB databases, optimized for small context windows (3k tokens). Specially for novel.
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-mongodb-novel-server": {
"command": "python",
"args": [
"src/scraper.py",
"--config",
"config/settings.json"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MCP MongoDB Server?
MCP MongoDB Server is a high-performance Model Context Protocol (MCP) server that provides an efficient knowledge interface between Large Language Models (LLMs) and MongoDB. It is optimized for small context windows (3k tokens) and enables LLMs to retrieve and interact with domain-specific knowledge stored in MongoDB collections.
How to use MCP MongoDB Server?
Clone the repository with submodules, configure a .env file with MONGODB_URI, DATABASE_NAME, and PORT, then build and run with cargo build --release and cargo run --release. After startup, configure your MCP client (e.g., VSCode copilot) to connect via SSE at http://localhost:3000/sse.
Key features of MCP MongoDB Server
- Dual‑server architecture: SSE‑based MCP and RESTful CRUD API
- Token‑efficient responses for small LLM context windows
- Integrated MongoDB query mechanisms and data models
- Built‑in models for Novels, Chapters, Characters, and Q&A
- Python scraper submodules for populating databases
Use cases of MCP MongoDB Server
- Query character details from a novel database via LLM
- Retrieve novel metadata and chapter summaries with regex search
- Update chapter summaries using an MCP method with authentication
- Populate MongoDB from Syosetu, 69Shu, Ximalaya, or Twitter/X timelines
FAQ from MCP MongoDB Server
What ports does the server use?
The MCP SSE server runs on port 3000, and the CRUD API runs on port 3001 (PORT+1).
What data models are supported?
The server includes models for Novels, Chapters, Characters, and Q&A knowledge base entries.
How do I update database content?
You can use the RESTful CRUD API endpoints (/api/novels, /api/chapters, /api/characters, /api/qa) or MCP methods like update_chapter_summary (requires an auth token).
What are the runtime dependencies?
You need a Rust toolchain, a running MongoDB instance, and Python 3.7+ if you use the included data scrapers.
How does the server communicate with LLMs?
The server exposes an SSE endpoint (/sse) for streaming events and a POST endpoint (/message) for JSON‑RPC 2.0 commands, both over HTTP.
More Databases MCP servers
mcp-server-duckdb
ktanaka101A Model Context Protocol (MCP) server implementation for DuckDB, providing database interaction capabilities
MongoDB Lens
furey🍃🔎 MongoDB Lens: Full Featured MCP Server for MongoDB Databases
MotherDuck's DuckDB MCP Server
motherduckdbLocal MCP server for DuckDB and MotherDuck
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Elasticsearch/OpenSearch MCP Server
cr7258A Model Context Protocol (MCP) server implementation that provides Elasticsearch and OpenSearch interaction.
Comments