mcp-sqlite-memory-bank 1.2.2__py3-none-any.whl → 1.2.4__py3-none-any.whl

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.
@@ -809,20 +809,6 @@ Available tools:
809
809
  - run_select_query: Run a safe SELECT query (no arbitrary SQL)
810
810
  """
811
811
 
812
- # Main entrypoint for direct execution
813
- if __name__ == "__main__":
814
- # Configure logging
815
- logging.basicConfig(
816
- level=logging.INFO,
817
- format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
818
- )
819
-
820
- # Log startup information
821
- logging.info(f"Starting SQLite Memory Bank with database at {DB_PATH}")
822
-
823
- # Run the FastMCP app
824
- app.run()
825
-
826
812
  # Implementation functions for backwards compatibility with tests
827
813
 
828
814
 
@@ -951,11 +937,8 @@ def _read_rows_impl(table_name: str,
951
937
 
952
938
 
953
939
  def _update_rows_impl(table_name: str,
954
- data: Dict[str,
955
- Any],
956
- where: Optional[Dict[str,
957
- Any]] = None) -> Dict[str,
958
- Any]:
940
+ data: Dict[str, Any],
941
+ where: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
959
942
  """Legacy implementation function for tests."""
960
943
  # Accepts any table created by agents; validates columns dynamically
961
944
  where = where or {}
@@ -1097,13 +1080,27 @@ __all__ = [
1097
1080
  '_delete_rows_impl']
1098
1081
 
1099
1082
 
1083
+ def mcp_server():
1084
+ """Entry point for MCP stdio server (for uvx and package installations)."""
1085
+ # Configure logging for MCP server
1086
+ logging.basicConfig(
1087
+ level=logging.INFO,
1088
+ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
1089
+ )
1090
+
1091
+ # Log startup information
1092
+ logging.info(f"Starting SQLite Memory Bank MCP server with database at {DB_PATH}")
1093
+
1094
+ # Run the FastMCP app in stdio mode
1095
+ app.run()
1096
+
1097
+
1100
1098
  def main():
1101
- """Main entry point for running the MCP SQLite Memory Bank server."""
1099
+ """Alternative entry point for HTTP server mode (development/testing only)."""
1102
1100
  import uvicorn
1103
1101
  import argparse
1104
- import os
1105
1102
 
1106
- parser = argparse.ArgumentParser(description="Run MCP SQLite Memory Bank Server")
1103
+ parser = argparse.ArgumentParser(description="Run MCP SQLite Memory Bank Server in HTTP mode")
1107
1104
  parser.add_argument("--host", default="127.0.0.1", help="Host to bind to")
1108
1105
  parser.add_argument("--port", type=int, default=8000, help="Port to bind to")
1109
1106
  parser.add_argument("--db-path", help="Path to SQLite database file")
@@ -1115,9 +1112,9 @@ def main():
1115
1112
  if args.db_path:
1116
1113
  global DB_PATH
1117
1114
  DB_PATH = args.db_path
1118
- os.environ["SQLITE_MEMORY_BANK_DB_PATH"] = args.db_path
1115
+ os.environ["DB_PATH"] = args.db_path
1119
1116
 
1120
- print(f"Starting MCP SQLite Memory Bank server on {args.host}:{args.port}")
1117
+ print(f"Starting MCP SQLite Memory Bank server in HTTP mode on {args.host}:{args.port}")
1121
1118
  print(f"Database path: {DB_PATH}")
1122
1119
  print("Available at: http://localhost:8000/docs")
1123
1120
 
@@ -1130,4 +1127,14 @@ def main():
1130
1127
 
1131
1128
 
1132
1129
  if __name__ == "__main__":
1133
- main()
1130
+ # Configure logging
1131
+ logging.basicConfig(
1132
+ level=logging.INFO,
1133
+ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
1134
+ )
1135
+
1136
+ # Log startup information
1137
+ logging.info(f"Starting SQLite Memory Bank with database at {DB_PATH}")
1138
+
1139
+ # Run the FastMCP app in stdio mode for MCP clients
1140
+ app.run()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp_sqlite_memory_bank
3
- Version: 1.2.2
3
+ Version: 1.2.4
4
4
  Summary: A dynamic, agent/LLM-friendly SQLite memory bank for MCP servers.
5
5
  Author-email: Robert Meisner <robert@catchit.pl>
6
6
  License-Expression: MIT
@@ -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,47 +181,29 @@ 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:
145
-
146
- - **stdio** (default): For direct integration with Claude Desktop and other MCP clients
197
+ SQLite Memory Bank currently supports **stdio transport** for MCP clients:
147
198
 
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
  ---
@@ -175,11 +227,6 @@ DB_PATH=./test.db
175
227
 
176
228
  ### VS Code Integration
177
229
 
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
230
  #### Manual Configuration
184
231
 
185
232
  Add or update `.vscode/mcp.json` in your project root:
@@ -188,23 +235,16 @@ Add or update `.vscode/mcp.json` in your project root:
188
235
  "servers": {
189
236
  "SQLite_Memory": {
190
237
  "type": "stdio",
191
- "command": "python",
192
- "args": ["-m", "mcp_sqlite_memory_bank.server"],
238
+ "command": "uvx",
239
+ "args": ["--refresh", "mcp-sqlite-memory-bank"],
193
240
  "env": {
194
- "DB_PATH": "${workspaceFolder}/data/memory.db"
241
+ "DB_PATH": "${workspaceFolder}/.vscode/project_memory.sqlite"
195
242
  }
196
243
  }
197
244
  }
198
245
  }
199
246
  ```
200
247
 
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"
206
- ```
207
-
208
248
  ### Claude Desktop Integration
209
249
 
210
250
  Add to your `claude_desktop_config.json`:
@@ -213,8 +253,8 @@ Add to your `claude_desktop_config.json`:
213
253
  {
214
254
  "mcpServers": {
215
255
  "sqlite_memory": {
216
- "command": "python",
217
- "args": ["-m", "mcp_sqlite_memory_bank.server"],
256
+ "command": "uvx",
257
+ "args": ["mcp-sqlite-memory-bank"],
218
258
  "env": {
219
259
  "DB_PATH": "/path/to/your/memory.db"
220
260
  }
@@ -223,28 +263,6 @@ Add to your `claude_desktop_config.json`:
223
263
  }
224
264
  ```
225
265
 
226
- #### Docker Option for Claude Desktop
227
-
228
- ```jsonc
229
- {
230
- "mcpServers": {
231
- "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
- ],
240
- "env": {
241
- "DB_PATH": "/data/memory.db"
242
- }
243
- }
244
- }
245
- }
246
- ```
247
-
248
266
  - Open your project in VS Code, Cursor, or Claude Desktop. The MCP server will be auto-discovered by Copilot Chat, Cursor, Claude, or any compatible agent.
249
267
  - Use natural language to create tables, store notes, or build knowledge graphs.
250
268
 
@@ -252,36 +270,28 @@ Add to your `claude_desktop_config.json`:
252
270
 
253
271
  ## Running the Server
254
272
 
255
- ### Transport Options
273
+ ### MCP Stdio Mode (Recommended)
256
274
 
257
- SQLite Memory Bank currently supports stdio transport only:
275
+ For use with VS Code, Claude Desktop, and other MCP clients:
258
276
 
259
- **Stdio Transport (Default - for Claude Desktop):**
260
277
  ```bash
261
- python -m mcp_sqlite_memory_bank.server
262
- ```
278
+ # Run with uvx (automatically gets latest version)
279
+ uvx mcp-sqlite-memory-bank
263
280
 
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
281
+ # Force refresh to latest version
282
+ uvx --refresh mcp-sqlite-memory-bank
268
283
  ```
269
284
 
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
- ```
285
+ ### Development/Testing Modes
275
286
 
276
- **With the example runner:**
287
+ **HTTP Server Mode (for development and testing):**
277
288
  ```bash
278
- python examples/run_server.py
289
+ python -m mcp_sqlite_memory_bank.server main --port 8000
279
290
  ```
280
291
 
281
- **With FastMCP (Planned):**
292
+ **Direct Python Module:**
282
293
  ```bash
283
- # Coming soon - not yet implemented
284
- fastmcp install mcp_sqlite_memory_bank/server.py --name "SQLite Memory Bank"
294
+ python -m mcp_sqlite_memory_bank.server
285
295
  ```
286
296
 
287
297
  ---
@@ -403,6 +413,43 @@ For a complete agent memory implementation example, see [examples/agent_memory_e
403
413
 
404
414
  ---
405
415
 
416
+ ## Troubleshooting
417
+
418
+ ### Common MCP Connection Issues
419
+
420
+ **Server not starting / Connection timeout:**
421
+ ```bash
422
+ # Force refresh uvx cache and try again
423
+ uvx --refresh mcp-sqlite-memory-bank
424
+
425
+ # Check if the command works directly
426
+ uvx mcp-sqlite-memory-bank --help
427
+ ```
428
+
429
+ **VS Code: "Server exited before responding to initialize request":**
430
+ 1. Check the MCP configuration in `.vscode/mcp.json`
431
+ 2. Ensure `uvx` is installed and in your PATH
432
+ 3. Try restarting VS Code or running "MCP: Restart Server" from Command Palette
433
+
434
+ **Tools not appearing in IDE:**
435
+ 1. Verify the server is running: `uvx mcp-sqlite-memory-bank` should start without errors
436
+ 2. Check that `"type": "stdio"` is set in your MCP configuration
437
+ 3. Restart your IDE or reload MCP configuration
438
+
439
+ **Database permission errors:**
440
+ - Ensure the directory for `DB_PATH` exists and is writable
441
+ - Check file permissions on the SQLite database file
442
+ - Use absolute paths in `DB_PATH` to avoid path resolution issues
443
+
444
+ **Package not found / outdated version:**
445
+ ```bash
446
+ # Clear uvx cache completely
447
+ uvx cache remove mcp-sqlite-memory-bank
448
+ uvx mcp-sqlite-memory-bank
449
+ ```
450
+
451
+ ---
452
+
406
453
 
407
454
  ## Running Tests
408
455
 
@@ -0,0 +1,11 @@
1
+ mcp_sqlite_memory_bank/__init__.py,sha256=l2045g6NL0NYoX0zMUjL5gDJHb4rI3l3gNUOYeACyBU,2293
2
+ mcp_sqlite_memory_bank/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ mcp_sqlite_memory_bank/server.py,sha256=xZFbFtR40Fq5mK_7B0dQNKtrZhQD8DvHkQlVTDrXTLw,38998
4
+ mcp_sqlite_memory_bank/types.py,sha256=86xN1bv-WaIu_Oz1_RFjRP7wsZdc6CHL_ntCGqn0eDI,4439
5
+ mcp_sqlite_memory_bank/utils.py,sha256=YHUFbZL0AJ0jjQnlQSVYJpBi4Bmeu7M-7tcyS82gxts,6574
6
+ mcp_sqlite_memory_bank-1.2.4.dist-info/licenses/LICENSE,sha256=KPr7eFgCJqQIjeSAcwRafbjcgm-10zkrJ7MFoTOGJQg,1092
7
+ mcp_sqlite_memory_bank-1.2.4.dist-info/METADATA,sha256=yuO3ewomT2ZJrimZ6uoLlnfbrTilycDBLAJwHJcG0D0,24513
8
+ mcp_sqlite_memory_bank-1.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ mcp_sqlite_memory_bank-1.2.4.dist-info/entry_points.txt,sha256=S9yGWiCe8f_rgcGCgbwEAX2FfJ9jXWxcc4K4Jenbcn8,150
10
+ mcp_sqlite_memory_bank-1.2.4.dist-info/top_level.txt,sha256=xQ8MTGECpWMR-9DV4H8mMqaSoZqE-C8EvpOg9E2U1wM,23
11
+ mcp_sqlite_memory_bank-1.2.4.dist-info/RECORD,,
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ mcp-sqlite-memory-bank = mcp_sqlite_memory_bank.server:mcp_server
3
+ mcp_sqlite_memory_bank = mcp_sqlite_memory_bank.server:mcp_server
@@ -1,11 +0,0 @@
1
- mcp_sqlite_memory_bank/__init__.py,sha256=l2045g6NL0NYoX0zMUjL5gDJHb4rI3l3gNUOYeACyBU,2293
2
- mcp_sqlite_memory_bank/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- mcp_sqlite_memory_bank/server.py,sha256=P-JJy-inp-8Pk_iB16-HpQOjebzGdjudbwfLr3GcVaM,38744
4
- mcp_sqlite_memory_bank/types.py,sha256=86xN1bv-WaIu_Oz1_RFjRP7wsZdc6CHL_ntCGqn0eDI,4439
5
- mcp_sqlite_memory_bank/utils.py,sha256=YHUFbZL0AJ0jjQnlQSVYJpBi4Bmeu7M-7tcyS82gxts,6574
6
- mcp_sqlite_memory_bank-1.2.2.dist-info/licenses/LICENSE,sha256=KPr7eFgCJqQIjeSAcwRafbjcgm-10zkrJ7MFoTOGJQg,1092
7
- mcp_sqlite_memory_bank-1.2.2.dist-info/METADATA,sha256=oVQygDpIB89ihHWwkhPpcCOU27E6h6OQGT2kBkeI2Lo,23640
8
- mcp_sqlite_memory_bank-1.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- mcp_sqlite_memory_bank-1.2.2.dist-info/entry_points.txt,sha256=dsS0KHwObGvPtVoqdIMgBxzDwkcsTbtQvULanheZlM0,138
10
- mcp_sqlite_memory_bank-1.2.2.dist-info/top_level.txt,sha256=xQ8MTGECpWMR-9DV4H8mMqaSoZqE-C8EvpOg9E2U1wM,23
11
- mcp_sqlite_memory_bank-1.2.2.dist-info/RECORD,,
@@ -1,3 +0,0 @@
1
- [console_scripts]
2
- mcp-sqlite-memory-bank = mcp_sqlite_memory_bank.server:main
3
- mcp_sqlite_memory_bank = mcp_sqlite_memory_bank.server:main