mcp-mongo-server 1.3.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,52 +1,76 @@
1
1
  {
2
- "name": "mcp-mongo-server",
3
- "version": "1.3.0",
4
- "description": "A Model Context Protocol server for MongoDB connections",
5
- "private": false,
6
- "type": "module",
7
- "bin": {
8
- "mongodb": "./build/index.js"
9
- },
10
- "files": [
11
- "build"
12
- ],
13
- "scripts": {
14
- "build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"",
15
- "prepare": "npm run build",
16
- "watch": "tsc --watch",
17
- "inspector": "npx @modelcontextprotocol/inspector build/index.js"
18
- },
19
- "dependencies": {
20
- "@modelcontextprotocol/sdk": "0.6.0",
21
- "@types/mongodb": "^4.0.6",
22
- "mongodb": "^6.11.0",
23
- "zod": "^3.23.8"
24
- },
25
- "devDependencies": {
26
- "@types/node": "^20.11.24",
27
- "typescript": "^5.3.3"
28
- },
29
- "publishConfig": {
30
- "access": "public"
31
- },
32
- "keywords": [
33
- "claude",
34
- "claude-desktop",
35
- "mcp",
36
- "mongo",
37
- "mongodb",
38
- "model-context-protocol",
39
- "llm",
40
- "mcp-server",
41
- "mcp-protocol",
42
- "mcp-connector",
43
- "mcp-connector-mongodb"
44
- ],
45
- "author": "Muhammed Kilic <kiliczsh>",
46
- "license": "MIT",
47
- "repository": {
48
- "type": "git",
49
- "url": "https://github.com/kiliczsh/mcp-mongo-server"
50
- },
51
- "homepage": "https://github.com/kiliczsh/mcp-mongo-server"
2
+ "name": "mcp-mongo-server",
3
+ "version": "2.1.0",
4
+ "description": "A Model Context Protocol server for MongoDB connections",
5
+ "private": false,
6
+ "type": "module",
7
+ "bin": {
8
+ "mongodb": "./build/index.js"
9
+ },
10
+ "files": [
11
+ "build"
12
+ ],
13
+ "scripts": {
14
+ "clean": "rm -rf build",
15
+ "build": "tsup",
16
+ "prepare": "bun run build",
17
+ "watch": "tsup --watch",
18
+ "format": "biome format --write .",
19
+ "format:check": "biome format .",
20
+ "lint": "biome lint .",
21
+ "lint:fix": "biome lint --write .",
22
+ "check": "biome check --write .",
23
+ "inspector": "mcp-inspector --config inspector-config.json --server mongodb"
24
+ },
25
+ "dependencies": {
26
+ "@modelcontextprotocol/sdk": "^1.29.0",
27
+ "mongodb": "^7.5.0",
28
+ "zod": "^4.4.3"
29
+ },
30
+ "devDependencies": {
31
+ "@biomejs/biome": "^2.5.5",
32
+ "@modelcontextprotocol/inspector": "^1.0.0",
33
+ "@types/node": "^26.1.1",
34
+ "tsup": "^8.5.1",
35
+ "typescript": "^5.9.3"
36
+ },
37
+ "publishConfig": {
38
+ "access": "public"
39
+ },
40
+ "keywords": [
41
+ "claude",
42
+ "claude-desktop",
43
+ "mcp",
44
+ "mongo",
45
+ "mongodb",
46
+ "model-context-protocol",
47
+ "llm",
48
+ "mcp-server",
49
+ "mcp-protocol",
50
+ "mcp-connector",
51
+ "mcp-connector-mongodb"
52
+ ],
53
+ "author": "Muhammed Kilic <kiliczsh>",
54
+ "license": "MIT",
55
+ "repository": {
56
+ "type": "git",
57
+ "url": "https://github.com/kiliczsh/mcp-mongo-server"
58
+ },
59
+ "homepage": "https://github.com/kiliczsh/mcp-mongo-server",
60
+ "overrides": {
61
+ "qs": "^6.15.2",
62
+ "hono": "^4.12.18",
63
+ "@hono/node-server": "^1.19.10",
64
+ "express-rate-limit": "^8.2.2",
65
+ "fast-uri": "^3.1.2",
66
+ "ws": "^8.21.1",
67
+ "shell-quote": "^1.10.0",
68
+ "minimatch": "^3.1.3",
69
+ "brace-expansion": "^1.1.13",
70
+ "rollup": "^4.59.0",
71
+ "picomatch": "^4.0.4",
72
+ "body-parser": "^2.3.0",
73
+ "ip-address": "^10.2.0",
74
+ "esbuild": "^0.28.1"
75
+ }
52
76
  }
package/build/mongo.js DELETED
@@ -1,33 +0,0 @@
1
- import { MongoClient, ReadPreference } from "mongodb";
2
- /**
3
- * Initialize MongoDB connection
4
- * @param url MongoDB connection string
5
- * @param readOnly Whether to connect in read-only mode
6
- * @returns Object containing client, db, connection status, and read-only mode
7
- */
8
- export async function connectToMongoDB(url, readOnly) {
9
- try {
10
- const options = readOnly
11
- ? { readPreference: ReadPreference.SECONDARY }
12
- : {};
13
- const client = new MongoClient(url, options);
14
- await client.connect();
15
- const db = client.db();
16
- console.warn(`Connected to MongoDB database: ${db.databaseName}`);
17
- return {
18
- client,
19
- db,
20
- isConnected: true,
21
- isReadOnlyMode: readOnly,
22
- };
23
- }
24
- catch (error) {
25
- console.error("Failed to connect to MongoDB:", error);
26
- return {
27
- client: null,
28
- db: null,
29
- isConnected: false,
30
- isReadOnlyMode: readOnly,
31
- };
32
- }
33
- }