@airabbit/sqlite-mcp-server 0.1.7 → 0.1.10

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.
Files changed (3) hide show
  1. package/README.md +39 -11
  2. package/build/index.js +1 -14
  3. package/package.json +4 -5
package/README.md CHANGED
@@ -49,17 +49,12 @@ An example SQLite database (`example-small.sqlite`) is included with sample data
49
49
  - `users` table: 3 users (Alice, Bob, Charlie)
50
50
  - `posts` table: 3 posts linked to users
51
51
 
52
- ### Installation
53
-
54
- Install from npm:
55
- ```bash
56
- npm install -g @airabbit/sqlite-mcp-server
57
- ```
58
-
59
52
  ### Claude Desktop Configuration
60
53
 
61
- Add this to your Claude Desktop config file (usually `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
54
+ Add this to your Claude Desktop config file (usually `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS).
55
+ No API token is required; just set the database path.
62
56
 
57
+ **Using the published npm package:**
63
58
  ```json
64
59
  {
65
60
  "mcpServers": {
@@ -67,16 +62,49 @@ Add this to your Claude Desktop config file (usually `~/Library/Application Supp
67
62
  "command": "npx",
68
63
  "args": [
69
64
  "-y",
70
- "@airabbit/sqlite-mcp-server"
65
+ "@airabbit/sqlite-mcp-server@latest"
71
66
  ],
72
67
  "env": {
73
- "SQLITE_DB_PATH": "/path/to/your/database.sqlite"
68
+ "SQLITE_DB_PATH": "/absolute/path/to/your/database.sqlite"
74
69
  }
75
70
  }
76
71
  }
77
72
  }
78
73
  ```
79
74
 
80
- **Note:** Replace `/path/to/your/database.sqlite` with the absolute path to your SQLite database file. The `-y` flag auto-installs the package if not already installed.
75
+ **Using a local build:**
81
76
 
77
+ ```json
78
+ {
79
+ "mcpServers": {
80
+ "@airabbit/sqlite-mcp-server": {
81
+ "command": "node",
82
+ "args": [
83
+ "/absolute/path/to/sqlite-mcp-server/build/index.js"
84
+ ],
85
+ "env": {
86
+ "SQLITE_DB_PATH": "/absolute/path/to/your/database.sqlite"
87
+ }
88
+ }
89
+ }
90
+ }
91
+ ```
92
+
93
+ **Example with included database:**
94
+ ```json
95
+ {
96
+ "mcpServers": {
97
+ "@airabbit/sqlite-mcp-server": {
98
+ "command": "node",
99
+ "args": [
100
+ "/path/to/sqlite-mcp-server/build/index.js"
101
+ ],
102
+ "env": {
103
+ "SQLITE_DB_PATH": "/path/to/sqlite-mcp-server/example-small.sqlite"
104
+ }
105
+ }
106
+ }
107
+ }
108
+ ```
82
109
 
110
+ Replace the paths with your actual installation path and database file path.
package/build/index.js CHANGED
@@ -447,20 +447,7 @@ export class SqliteMcpServer {
447
447
  console.error('SQLite MCP server running on stdio');
448
448
  }
449
449
  }
450
- function isMainModule() {
451
- if (!process.argv[1]) {
452
- return false;
453
- }
454
- try {
455
- const entryPath = fs.realpathSync(process.argv[1]);
456
- const modulePath = fs.realpathSync(fileURLToPath(import.meta.url));
457
- return entryPath === modulePath;
458
- }
459
- catch {
460
- return false;
461
- }
462
- }
463
- if (isMainModule()) {
450
+ if (import.meta.url === `file://${process.argv[1]}`) {
464
451
  const server = new SqliteMcpServer();
465
452
  server.run().catch(console.error);
466
453
  }
package/package.json CHANGED
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "name": "@airabbit/sqlite-mcp-server",
3
- "version": "0.1.7",
3
+ "version": "0.1.10",
4
4
  "description": "Generic SQLite Model Context Protocol (MCP) server",
5
5
  "main": "build/index.js",
6
+ "type": "module",
6
7
  "bin": {
7
- "sqlite-mcp-server": "build/index.js"
8
+ "mcp-server-sqlite": "build/index.js"
8
9
  },
9
- "type": "module",
10
10
  "files": [
11
11
  "build/",
12
- "manifest.json",
13
- "README.md"
12
+ "manifest.json"
14
13
  ],
15
14
  "scripts": {
16
15
  "build": "tsc && chmod +x build/index.js",