MongoDB MCP Server
OfficialMongoDB MCP 서버
MongoDB 데이터베이스에 대한 읽기 전용 액세스를 제공하는 모델 컨텍스트 프로토콜 서버입니다. 이 서버를 통해 LLM은 컬렉션 스키마를 검사하고 집계 파이프라인을 실행할 수 있습니다.
구성 요소
도구
골재
연결된 데이터베이스에 대해 MongoDB 집계 파이프라인을 실행합니다.
입력:
collection(문자열): 쿼리할 컬렉션pipeline(배열): MongoDB 집계 파이프라인 단계options(객체): 선택적 집계 설정allowDiskUse(부울): 디스크 사용이 필요한 작업 허용maxTimeMS(숫자): 최대 실행 시간(밀리초)comment(문자열): 작업을 식별하는 주석
제한 단계가 지정되지 않은 경우 기본 제한은 1000개 문서입니다.
기본 시간 초과는 30초입니다.
설명하다
집계 파이프라인에 대한 실행 계획 가져오기
입력:
collection(문자열): 분석할 컬렉션pipeline(배열): MongoDB 집계 파이프라인 단계verbosity(문자열): 설명의 세부 수준옵션: "queryPlanner", "executionStats", "allPlansExecution"
기본값: "queryPlanner"
자원
서버는 데이터베이스의 각 컬렉션에 대한 스키마 정보를 제공합니다.
컬렉션 스키마 (
mongodb://<host>/<collection>/schema)각 컬렉션에 대한 추론된 JSON 스키마 정보
필드 이름과 데이터 유형이 포함됩니다.
스키마는 샘플링 컬렉션 문서에서 파생됩니다.
Related MCP server: MongoDB MCP Server
Claude Desktop과 함께 사용
Claude Desktop 앱과 함께 이 서버를 사용하려면 claude_desktop_config.json 의 "mcpServers" 섹션에 다음 구성을 추가하세요.
지엑스피1
mydb 데이터베이스 이름으로 바꾸고 필요에 따라 연결 문자열을 조정합니다.
사용 예
기본 집계
{
"collection": "users",
"pipeline": [
{ "$match": { "age": { "$gt": 21 } } },
{ "$group": {
"_id": "$city",
"avgAge": { "$avg": "$age" },
"count": { "$sum": 1 }
}},
{ "$sort": { "count": -1 } },
{ "$limit": 10 }
],
"options": {
"allowDiskUse": true,
"maxTimeMS": 60000,
"comment": "City-wise user statistics"
}
}질의 설명
{
"collection": "users",
"pipeline": [
{ "$match": { "age": { "$gt": 21 } } },
{ "$sort": { "age": 1 } }
],
"verbosity": "executionStats"
}안전 기능
파이프라인에 제한이 지정되지 않으면 자동으로 1000개 문서로 제한됩니다.
모든 작업에 대한 기본 시간 초과는 30초입니다.
읽기 전용 작업만 가능
수집 샘플에서 안전한 스키마 추론
특허
이 MCP 서버는 MIT 라이선스에 따라 라이선스가 부여됩니다. 즉, MIT 라이선스의 조건에 따라 소프트웨어를 자유롭게 사용, 수정 및 배포할 수 있습니다. 자세한 내용은 프로젝트 저장소의 LICENSE 파일을 참조하세요.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Astra DB tools for agents: schema, find, vector search, guarded writes, and interactive views.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides read-only access to legacy MongoDB instances (<4.0) via the Model Context Protocol, enabling AI models to query databases, collections, and run aggregations safely.2-
- AlicenseNot gradedqualityDmaintenanceEnables an IDE agent to read and write MongoDB through typed, allowlisted tools, with safety defaults and support for CRUD, aggregation, and collection listing.ISC
- AlicenseNot gradedqualityBmaintenanceEnables LLM clients to query MongoDB collections read-only through a small set of guarded operations, exposing only declared fields and enforcing scoped filters, projections, and limits.13 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients such as Claude Code or Claude Desktop to explore and query a single MongoDB database through tools for listing collections, inferring schemas, finding, aggregating, and counting documents. All access is strictly read-only, with allowlists, operator denylists, and hard limits.MIT