mcp-sqlite-memory-bank 1.2.3__tar.gz → 1.3.0__tar.gz

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 (23) hide show
  1. {mcp_sqlite_memory_bank-1.2.3/src/mcp_sqlite_memory_bank.egg-info → mcp_sqlite_memory_bank-1.3.0}/PKG-INFO +189 -91
  2. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/README.md +187 -89
  3. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/pyproject.toml +2 -2
  4. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/src/mcp_sqlite_memory_bank/__init__.py +6 -9
  5. mcp_sqlite_memory_bank-1.3.0/src/mcp_sqlite_memory_bank/database.py +923 -0
  6. mcp_sqlite_memory_bank-1.3.0/src/mcp_sqlite_memory_bank/semantic.py +386 -0
  7. mcp_sqlite_memory_bank-1.3.0/src/mcp_sqlite_memory_bank/server.py +838 -0
  8. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/src/mcp_sqlite_memory_bank/types.py +105 -9
  9. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/src/mcp_sqlite_memory_bank/utils.py +22 -54
  10. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0/src/mcp_sqlite_memory_bank.egg-info}/PKG-INFO +189 -91
  11. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/src/mcp_sqlite_memory_bank.egg-info/SOURCES.txt +2 -0
  12. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/tests/test_api.py +163 -165
  13. mcp_sqlite_memory_bank-1.3.0/tests/test_server.py +179 -0
  14. mcp_sqlite_memory_bank-1.2.3/src/mcp_sqlite_memory_bank/server.py +0 -1140
  15. mcp_sqlite_memory_bank-1.2.3/tests/test_server.py +0 -189
  16. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/LICENSE +0 -0
  17. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/MANIFEST.in +0 -0
  18. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/setup.cfg +0 -0
  19. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/src/mcp_sqlite_memory_bank/py.typed +0 -0
  20. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/src/mcp_sqlite_memory_bank.egg-info/dependency_links.txt +0 -0
  21. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/src/mcp_sqlite_memory_bank.egg-info/entry_points.txt +0 -0
  22. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/src/mcp_sqlite_memory_bank.egg-info/requires.txt +0 -0
  23. {mcp_sqlite_memory_bank-1.2.3 → mcp_sqlite_memory_bank-1.3.0}/src/mcp_sqlite_memory_bank.egg-info/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp_sqlite_memory_bank
3
- Version: 1.2.3
4
- Summary: A dynamic, agent/LLM-friendly SQLite memory bank for MCP servers.
3
+ Version: 1.3.0
4
+ Summary: A dynamic, agent/LLM-friendly SQLite memory bank for MCP servers with semantic search capabilities.
5
5
  Author-email: Robert Meisner <robert@catchit.pl>
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/robertmeisner/mcp_sqlite_memory_bank
@@ -45,6 +45,60 @@ This project provides a robust, discoverable API for creating, exploring, and ma
45
45
 
46
46
  ---
47
47
 
48
+ ## Quick Start
49
+
50
+ Get started with SQLite Memory Bank in your IDE in under 2 minutes:
51
+
52
+ ### 1. Install and Run
53
+ ```bash
54
+ # Install uvx if you don't have it
55
+ pip install uvx
56
+
57
+ # Run SQLite Memory Bank
58
+ uvx mcp-sqlite-memory-bank
59
+ ```
60
+
61
+ ### 2. Configure Your IDE
62
+
63
+ **VS Code / Cursor:** Add to `.vscode/mcp.json`:
64
+ ```jsonc
65
+ {
66
+ "servers": {
67
+ "SQLite_Memory": {
68
+ "type": "stdio",
69
+ "command": "uvx",
70
+ "args": ["--refresh", "mcp-sqlite-memory-bank"],
71
+ "env": {
72
+ "DB_PATH": "${workspaceFolder}/.vscode/project_memory.sqlite"
73
+ }
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ **Claude Desktop:** Add to `claude_desktop_config.json`:
80
+ ```jsonc
81
+ {
82
+ "mcpServers": {
83
+ "sqlite_memory": {
84
+ "command": "uvx",
85
+ "args": ["mcp-sqlite-memory-bank"],
86
+ "env": {
87
+ "DB_PATH": "/path/to/your/memory.db"
88
+ }
89
+ }
90
+ }
91
+ }
92
+ ```
93
+
94
+ ### 3. Test It
95
+ Restart your IDE and try asking your AI assistant:
96
+ > "Create a table called 'notes' with columns 'id' (integer, primary key) and 'content' (text). Then add a note saying 'Hello SQLite Memory Bank!'"
97
+
98
+ ✅ You should see the AI using the SQLite Memory Bank tools to create the table and add the note!
99
+
100
+ ---
101
+
48
102
  ## Features
49
103
 
50
104
  - **Dynamic Table Management:** Create, list, describe, rename, and drop tables at runtime
@@ -86,6 +140,22 @@ Each tool validates inputs and returns consistent response formats with success/
86
140
 
87
141
  ---
88
142
 
143
+ ## Transport Modes
144
+
145
+ ### Stdio Mode (Default)
146
+ - **Use case**: MCP clients (VS Code, Claude Desktop, etc.)
147
+ - **Protocol**: JSON-RPC over stdin/stdout
148
+ - **Command**: `uvx mcp-sqlite-memory-bank`
149
+ - **Benefits**: Direct integration with AI assistants and IDEs
150
+
151
+ ### HTTP Mode (Development)
152
+ - **Use case**: Development, testing, web APIs
153
+ - **Protocol**: HTTP REST API
154
+ - **Command**: `python -m mcp_sqlite_memory_bank.server main --port 8000`
155
+ - **Benefits**: Web browser access, curl testing, API integration
156
+
157
+ ---
158
+
89
159
  ## Installation & Transport Options
90
160
 
91
161
  **Requirements:**
@@ -111,134 +181,133 @@ python -m pip install --user pipx
111
181
  pipx run mcp_sqlite_memory_bank
112
182
  ```
113
183
 
114
- ### Option 4: Run via UVX
184
+ ### Option 4: Run via UVX (Recommended for MCP clients)
115
185
  ```bash
116
- # Install UVX if you don't have it
117
- curl -fsSL https://uvx.zip/install.sh | bash
118
-
119
- # Run directly without installation
120
- uvx run mcp_sqlite_memory_bank
186
+ # Run directly with latest version (recommended)
187
+ uvx mcp-sqlite-memory-bank
121
188
 
122
- # Or, specify a version
123
- uvx run mcp_sqlite_memory_bank@latest
189
+ # Force refresh to get latest updates
190
+ uvx --refresh mcp-sqlite-memory-bank
124
191
  ```
125
192
 
126
- ### Option 5: Docker (Containerized) # Coming soon - not yet implemented
127
- ```bash
128
- # Pull the image
129
- docker pull robertmeisner/mcp_sqlite_memory_bank:latest
130
-
131
- # Run with stdio transport (for Claude Desktop)
132
- docker run -i --rm \
133
- --mount type=bind,src=/path/to/data/dir,dst=/data \
134
- robertmeisner/mcp_sqlite_memory_bank:latest stdio
135
-
136
- # Run with HTTP transport (for API access)
137
- docker run -p 8000:8000 --rm \
138
- --mount type=bind,src=/path/to/data/dir,dst=/data \
139
- robertmeisner/mcp_sqlite_memory_bank:latest http
140
- ```
193
+ ---
141
194
 
142
195
  ### Transport Options
143
196
 
144
- SQLite Memory Bank currently supports:
197
+ SQLite Memory Bank currently supports **stdio transport** for MCP clients:
145
198
 
146
- - **stdio** (default): For direct integration with Claude Desktop and other MCP clients
147
-
148
- Planned transport options (not yet implemented):
149
- - **http**: For web access and API usage
150
- - **streamable-http**: For the latest MCP specification
199
+ **Stdio Transport (Default - for MCP clients like VS Code, Claude Desktop):**
200
+ ```bash
201
+ uvx mcp-sqlite-memory-bank
202
+ ```
151
203
 
152
- Run with the default transport:
204
+ **HTTP Transport (Development/Testing only):**
153
205
  ```bash
154
- python -m mcp_sqlite_memory_bank.server
206
+ python -m mcp_sqlite_memory_bank.server main --host 127.0.0.1 --port 8000
155
207
  ```
156
208
 
157
209
  ---
158
210
 
159
211
  ## Setup and Configuration
160
212
 
161
- You can configure the database path and other options via environment variables or a `.env` file in your project root.
213
+ ### Database Location
214
+
215
+ **Default Behavior (v1.2.5+):**
216
+ - **User-specific database**: `~/.mcp_sqlite_memory/memory.db`
217
+ - **Isolated per user**: Each user gets their own database
218
+ - **Persistent across projects**: Data is preserved between sessions
219
+
220
+ **Custom Database Paths:**
221
+ You can configure a custom database location via the `DB_PATH` environment variable:
222
+
223
+ - **Project-specific**: `DB_PATH=./project_memory.db`
224
+ - **Shared team database**: `DB_PATH=/shared/team_memory.db`
225
+ - **Temporary database**: `DB_PATH=/tmp/session_memory.db`
162
226
 
163
227
  **Environment Variables:**
164
- - `DB_PATH`: Path to the SQLite database file (default: `./test.db`)
165
- - Any other options supported by the server (see API docs)
228
+ - `DB_PATH`: Path to the SQLite database file (default: `~/.mcp_sqlite_memory/memory.db`)
166
229
 
167
230
  **Example `.env`:**
168
231
  ```env
169
- DB_PATH=./test.db
232
+ # Use project-specific database
233
+ DB_PATH=./project_memory.db
234
+
235
+ # Or use a specific location
236
+ DB_PATH=/path/to/my/memory.db
170
237
  ```
171
238
 
239
+ **Migration Note:**
240
+ If you were using v1.2.4 or earlier, your data was stored in `./test.db` in the current working directory. To migrate your data:
241
+
242
+ 1. Locate your old `test.db` file
243
+ 2. Copy it to the new default location: `~/.mcp_sqlite_memory/memory.db`
244
+ 3. Or set `DB_PATH` to point to your existing database
245
+
172
246
  ---
173
247
 
174
248
  ## Integration with Editors & Agent Platforms
175
249
 
176
250
  ### VS Code Integration
177
251
 
178
- #### Quick Install
179
- [Install with Python Module in VS Code](https://insiders.vscode.dev/redirect/mcp/install?name=sqlite-memory&config=%7B%22command%22%3A%22python%22%2C%22args%22%3A%5B%22-m%22%2C%22mcp_sqlite_memory_bank%22%5D%7D)
180
-
181
- [Install with Docker in VS Code](https://insiders.vscode.dev/redirect/mcp/install?name=sqlite-memory&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22--mount%22%2C%22type%3Dbind%2Csrc%3D%24%7BworkspaceFolder%7D%2Cdst%3D%2Fdata%22%2C%22robertmeisner%2Fmcp_sqlite_memory_bank%3Alatest%22%5D%7D)
182
-
183
252
  #### Manual Configuration
184
253
 
185
- Add or update `.vscode/mcp.json` in your project root:
254
+ **Option 1: Use Default User Database (Recommended)**
186
255
  ```jsonc
187
256
  {
188
257
  "servers": {
189
258
  "SQLite_Memory": {
190
259
  "type": "stdio",
191
- "command": "python",
192
- "args": ["-m", "mcp_sqlite_memory_bank.server"],
193
- "env": {
194
- "DB_PATH": "${workspaceFolder}/data/memory.db"
195
- }
260
+ "command": "uvx",
261
+ "args": ["--refresh", "mcp-sqlite-memory-bank"]
196
262
  }
197
263
  }
198
264
  }
199
265
  ```
200
266
 
201
- ## FastMCP Integration (Planned)
202
-
203
- ```bash
204
- # Coming soon - not yet implemented
205
- fastmcp install mcp_sqlite_memory_bank/server.py --name "SQLite Memory Bank"
267
+ **Option 2: Project-Specific Database**
268
+ ```jsonc
269
+ {
270
+ "servers": {
271
+ "SQLite_Memory": {
272
+ "type": "stdio",
273
+ "command": "uvx",
274
+ "args": ["--refresh", "mcp-sqlite-memory-bank"],
275
+ "env": {
276
+ "DB_PATH": "${workspaceFolder}/.mcp_memory.db"
277
+ }
278
+ }
279
+ }
280
+ }
206
281
  ```
207
282
 
208
- ### Claude Desktop Integration
209
-
210
- Add to your `claude_desktop_config.json`:
211
-
283
+ **Option 3: Custom Database Location**
212
284
  ```jsonc
213
285
  {
214
- "mcpServers": {
215
- "sqlite_memory": {
216
- "command": "python",
217
- "args": ["-m", "mcp_sqlite_memory_bank.server"],
286
+ "servers": {
287
+ "SQLite_Memory": {
288
+ "type": "stdio",
289
+ "command": "uvx",
290
+ "args": ["--refresh", "mcp-sqlite-memory-bank"],
218
291
  "env": {
219
- "DB_PATH": "/path/to/your/memory.db"
292
+ "DB_PATH": "/path/to/your/custom/memory.db"
220
293
  }
221
294
  }
222
295
  }
223
296
  }
224
297
  ```
225
298
 
226
- #### Docker Option for Claude Desktop
299
+ ### Claude Desktop Integration
300
+
301
+ Add to your `claude_desktop_config.json`:
227
302
 
228
303
  ```jsonc
229
304
  {
230
305
  "mcpServers": {
231
306
  "sqlite_memory": {
232
- "command": "docker",
233
- "args": [
234
- "run",
235
- "-i",
236
- "--rm",
237
- "--mount", "type=bind,src=/path/to/data/dir,dst=/data",
238
- "robertmeisner/mcp_sqlite_memory_bank:latest"
239
- ],
307
+ "command": "uvx",
308
+ "args": ["mcp-sqlite-memory-bank"],
240
309
  "env": {
241
- "DB_PATH": "/data/memory.db"
310
+ "DB_PATH": "/path/to/your/memory.db"
242
311
  }
243
312
  }
244
313
  }
@@ -252,36 +321,28 @@ Add to your `claude_desktop_config.json`:
252
321
 
253
322
  ## Running the Server
254
323
 
255
- ### Transport Options
324
+ ### MCP Stdio Mode (Recommended)
256
325
 
257
- SQLite Memory Bank currently supports stdio transport only:
326
+ For use with VS Code, Claude Desktop, and other MCP clients:
258
327
 
259
- **Stdio Transport (Default - for Claude Desktop):**
260
328
  ```bash
261
- python -m mcp_sqlite_memory_bank.server
262
- ```
329
+ # Run with uvx (automatically gets latest version)
330
+ uvx mcp-sqlite-memory-bank
263
331
 
264
- **HTTP Transport (REST API - Planned):**
265
- ```bash
266
- # Coming soon - not yet implemented
267
- python -m mcp_sqlite_memory_bank.server http --port 8000
332
+ # Force refresh to latest version
333
+ uvx --refresh mcp-sqlite-memory-bank
268
334
  ```
269
335
 
270
- **Streamable HTTP Transport (Latest MCP Spec - Planned):**
271
- ```bash
272
- # Coming soon - not yet implemented
273
- python -m mcp_sqlite_memory_bank.server streamable-http --port 8000
274
- ```
336
+ ### Development/Testing Modes
275
337
 
276
- **With the example runner:**
338
+ **HTTP Server Mode (for development and testing):**
277
339
  ```bash
278
- python examples/run_server.py
340
+ python -m mcp_sqlite_memory_bank.server main --port 8000
279
341
  ```
280
342
 
281
- **With FastMCP (Planned):**
343
+ **Direct Python Module:**
282
344
  ```bash
283
- # Coming soon - not yet implemented
284
- fastmcp install mcp_sqlite_memory_bank/server.py --name "SQLite Memory Bank"
345
+ python -m mcp_sqlite_memory_bank.server
285
346
  ```
286
347
 
287
348
  ---
@@ -403,6 +464,43 @@ For a complete agent memory implementation example, see [examples/agent_memory_e
403
464
 
404
465
  ---
405
466
 
467
+ ## Troubleshooting
468
+
469
+ ### Common MCP Connection Issues
470
+
471
+ **Server not starting / Connection timeout:**
472
+ ```bash
473
+ # Force refresh uvx cache and try again
474
+ uvx --refresh mcp-sqlite-memory-bank
475
+
476
+ # Check if the command works directly
477
+ uvx mcp-sqlite-memory-bank --help
478
+ ```
479
+
480
+ **VS Code: "Server exited before responding to initialize request":**
481
+ 1. Check the MCP configuration in `.vscode/mcp.json`
482
+ 2. Ensure `uvx` is installed and in your PATH
483
+ 3. Try restarting VS Code or running "MCP: Restart Server" from Command Palette
484
+
485
+ **Tools not appearing in IDE:**
486
+ 1. Verify the server is running: `uvx mcp-sqlite-memory-bank` should start without errors
487
+ 2. Check that `"type": "stdio"` is set in your MCP configuration
488
+ 3. Restart your IDE or reload MCP configuration
489
+
490
+ **Database permission errors:**
491
+ - Ensure the directory for `DB_PATH` exists and is writable
492
+ - Check file permissions on the SQLite database file
493
+ - Use absolute paths in `DB_PATH` to avoid path resolution issues
494
+
495
+ **Package not found / outdated version:**
496
+ ```bash
497
+ # Clear uvx cache completely
498
+ uvx cache remove mcp-sqlite-memory-bank
499
+ uvx mcp-sqlite-memory-bank
500
+ ```
501
+
502
+ ---
503
+
406
504
 
407
505
  ## Running Tests
408
506