Skip to content

Commit 7e7bb4a

Browse files
authored
feat: add MongoDB MCP server definition (#55)
* feat: add MongoDB MCP server definition Add MongoDB local stdio server via npx mongodb-mcp-server@latest. Query collections, inspect schemas, manage indexes, and run aggregation pipelines. Supports Atlas, Community, and Enterprise. https://claude.ai/code/session_013AxurW8hPAfnUNvik354Xx * fix: update server definition (input type 'password' -> 'text' for MONGODB_URI) * feat(mongodb): add Atlas API inputs, Docker variant, read-only support - Add optional Atlas API Service Account credentials (client ID + secret) for Atlas management operations (cluster creation, user management, etc.) - Add Docker transport variant (com.mongodb-mcp-docker) using official mongodb/mongodb-mcp-server image - Make connection string optional (server supports runtime connect tool) - Update auth type to optional_api_key to reflect Atlas API credentials - Enable read_only_mode capability (server supports --readOnly flag) Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com> * fix(mongodb): align input IDs with env var names Rename input IDs to match their corresponding environment variables: - MONGODB_URI → MDB_MCP_CONNECTION_STRING - ATLAS_CLIENT_ID → MDB_MCP_API_CLIENT_ID - ATLAS_CLIENT_SECRET → MDB_MCP_API_CLIENT_SECRET Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com> * fix(mongodb): rename npx variant to com.mongodb-mcp-npx Align with naming convention used by other servers (e.g., sentry-mcp-npx, notion-mcp-npx). Renamed file and updated id/name fields. Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com> --------- Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
1 parent 0217546 commit 7e7bb4a

2 files changed

Lines changed: 203 additions & 0 deletions

File tree

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"$schema": "../schemas/server-definition.schema.json",
3+
"id": "com.mongodb-mcp-docker",
4+
"name": "MongoDB (Docker)",
5+
"alias": "mongodb-docker",
6+
"description": "Connect to MongoDB databases and Atlas clusters via Docker. Query collections, inspect schemas, manage indexes, and run aggregation pipelines in an isolated container.",
7+
"icon": "https://avatars.githubusercontent.com/u/11214950?v=4",
8+
"schema_version": "2.1",
9+
"categories": [
10+
"database"
11+
],
12+
"tags": [
13+
"mongodb",
14+
"database",
15+
"nosql",
16+
"atlas",
17+
"docker",
18+
"aggregation",
19+
"collections"
20+
],
21+
"transport": {
22+
"type": "stdio",
23+
"command": "docker",
24+
"args": [
25+
"run",
26+
"--rm",
27+
"-i",
28+
"-e", "MDB_MCP_CONNECTION_STRING",
29+
"-e", "MDB_MCP_API_CLIENT_ID",
30+
"-e", "MDB_MCP_API_CLIENT_SECRET",
31+
"mongodb/mongodb-mcp-server:latest"
32+
],
33+
"env": {
34+
"MDB_MCP_CONNECTION_STRING": "${input:MDB_MCP_CONNECTION_STRING}",
35+
"MDB_MCP_API_CLIENT_ID": "${input:MDB_MCP_API_CLIENT_ID}",
36+
"MDB_MCP_API_CLIENT_SECRET": "${input:MDB_MCP_API_CLIENT_SECRET}"
37+
},
38+
"metadata": {
39+
"inputs": [
40+
{
41+
"id": "MDB_MCP_CONNECTION_STRING",
42+
"label": "MongoDB Connection String",
43+
"description": "MongoDB connection URI. Use host.docker.internal instead of localhost for local instances (e.g., mongodb://host.docker.internal:27017/mydb).",
44+
"type": "text",
45+
"required": false,
46+
"secret": true,
47+
"placeholder": "mongodb+srv://username:password@cluster.mongodb.net/mydb",
48+
"obtain": {
49+
"url": "https://www.mongodb.com/docs/manual/reference/connection-string/",
50+
"instructions": "1. For MongoDB Atlas: Go to your cluster > Connect > Drivers\n2. Copy the connection string\n3. For local MongoDB inside Docker: use mongodb://host.docker.internal:27017/mydb",
51+
"button_label": "Learn More"
52+
}
53+
},
54+
{
55+
"id": "MDB_MCP_API_CLIENT_ID",
56+
"label": "Atlas API Client ID",
57+
"description": "MongoDB Atlas Service Account client ID for Atlas management operations. Optional — only needed for Atlas administration.",
58+
"type": "text",
59+
"required": false,
60+
"secret": true,
61+
"placeholder": "mdb_sa_id_..."
62+
},
63+
{
64+
"id": "MDB_MCP_API_CLIENT_SECRET",
65+
"label": "Atlas API Client Secret",
66+
"description": "MongoDB Atlas Service Account client secret. Required when Atlas API Client ID is provided.",
67+
"type": "text",
68+
"required": false,
69+
"secret": true,
70+
"placeholder": "mdb_sa_sk_..."
71+
}
72+
]
73+
}
74+
},
75+
"auth": {
76+
"type": "optional_api_key",
77+
"instructions": "Connection string provides database access. Atlas API credentials (optional) enable cluster management features."
78+
},
79+
"contributor": {
80+
"name": "MongoDB",
81+
"github": "mongodb-js",
82+
"url": "https://www.mongodb.com"
83+
},
84+
"links": {
85+
"repository": "https://github.com/mongodb-js/mongodb-mcp-server",
86+
"homepage": "https://www.mongodb.com",
87+
"documentation": "https://www.mongodb.com/docs/mcp-server/get-started/"
88+
},
89+
"platforms": [
90+
"all"
91+
],
92+
"capabilities": {
93+
"tools": true,
94+
"resources": false,
95+
"prompts": false,
96+
"read_only_mode": true
97+
},
98+
"changelog_url": "https://github.com/mongodb-js/mongodb-mcp-server/releases"
99+
}

servers/com.mongodb-mcp-npx.json

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"$schema": "../schemas/server-definition.schema.json",
3+
"id": "com.mongodb-mcp-npx",
4+
"name": "MongoDB (npx)",
5+
"alias": "mongodb",
6+
"description": "Connect to MongoDB databases and Atlas clusters. Query collections, inspect schemas, manage indexes, and run aggregation pipelines through the official MongoDB MCP server.",
7+
"icon": "https://avatars.githubusercontent.com/u/11214950?v=4",
8+
"schema_version": "2.1",
9+
"categories": [
10+
"database"
11+
],
12+
"tags": [
13+
"mongodb",
14+
"database",
15+
"nosql",
16+
"atlas",
17+
"aggregation",
18+
"collections",
19+
"documents"
20+
],
21+
"transport": {
22+
"type": "stdio",
23+
"command": "npx",
24+
"args": [
25+
"-y",
26+
"mongodb-mcp-server@latest"
27+
],
28+
"env": {
29+
"MDB_MCP_CONNECTION_STRING": "${input:MDB_MCP_CONNECTION_STRING}",
30+
"MDB_MCP_API_CLIENT_ID": "${input:MDB_MCP_API_CLIENT_ID}",
31+
"MDB_MCP_API_CLIENT_SECRET": "${input:MDB_MCP_API_CLIENT_SECRET}"
32+
},
33+
"metadata": {
34+
"inputs": [
35+
{
36+
"id": "MDB_MCP_CONNECTION_STRING",
37+
"label": "MongoDB Connection String",
38+
"description": "MongoDB connection URI for your database. Supports local instances, Atlas clusters, and replica sets. Leave empty to use the runtime connect tool.",
39+
"type": "text",
40+
"required": false,
41+
"secret": true,
42+
"placeholder": "mongodb+srv://username:password@cluster.mongodb.net/mydb",
43+
"obtain": {
44+
"url": "https://www.mongodb.com/docs/manual/reference/connection-string/",
45+
"instructions": "1. For MongoDB Atlas: Go to your cluster > Connect > Drivers\n2. Copy the connection string\n3. Replace <password> with your database password\n4. For local MongoDB: use mongodb://localhost:27017/mydb",
46+
"button_label": "Learn More"
47+
}
48+
},
49+
{
50+
"id": "MDB_MCP_API_CLIENT_ID",
51+
"label": "Atlas API Client ID",
52+
"description": "MongoDB Atlas Service Account client ID for Atlas management operations (create clusters, manage users, IP access lists). Optional — only needed for Atlas administration.",
53+
"type": "text",
54+
"required": false,
55+
"secret": true,
56+
"placeholder": "mdb_sa_id_...",
57+
"obtain": {
58+
"url": "https://www.mongodb.com/docs/atlas/configure-api-access/",
59+
"instructions": "1. Go to MongoDB Atlas > Organization Settings > Service Accounts\n2. Create a new Service Account with required roles\n3. Copy the Client ID",
60+
"button_label": "Configure API Access"
61+
}
62+
},
63+
{
64+
"id": "MDB_MCP_API_CLIENT_SECRET",
65+
"label": "Atlas API Client Secret",
66+
"description": "MongoDB Atlas Service Account client secret. Required when Atlas API Client ID is provided.",
67+
"type": "text",
68+
"required": false,
69+
"secret": true,
70+
"placeholder": "mdb_sa_sk_...",
71+
"obtain": {
72+
"url": "https://www.mongodb.com/docs/atlas/configure-api-access/",
73+
"instructions": "1. Go to MongoDB Atlas > Organization Settings > Service Accounts\n2. Create or select a Service Account\n3. Copy the Client Secret (shown only once at creation)",
74+
"button_label": "Configure API Access"
75+
}
76+
}
77+
]
78+
}
79+
},
80+
"auth": {
81+
"type": "optional_api_key",
82+
"instructions": "Connection string provides database access. Atlas API credentials (optional) enable cluster management features."
83+
},
84+
"contributor": {
85+
"name": "MongoDB",
86+
"github": "mongodb-js",
87+
"url": "https://www.mongodb.com"
88+
},
89+
"links": {
90+
"repository": "https://github.com/mongodb-js/mongodb-mcp-server",
91+
"homepage": "https://www.mongodb.com",
92+
"documentation": "https://www.mongodb.com/docs/mcp-server/get-started/"
93+
},
94+
"platforms": [
95+
"all"
96+
],
97+
"capabilities": {
98+
"tools": true,
99+
"resources": false,
100+
"prompts": false,
101+
"read_only_mode": true
102+
},
103+
"changelog_url": "https://github.com/mongodb-js/mongodb-mcp-server/releases"
104+
}

0 commit comments

Comments
 (0)