mcp-sqlite-memory-bank 1.5.0__py3-none-any.whl → 1.6.0__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.
- mcp_sqlite_memory_bank/__init__.py +2 -2
- mcp_sqlite_memory_bank/__main__.py +68 -0
- mcp_sqlite_memory_bank/database.py +234 -68
- mcp_sqlite_memory_bank/prompts.py +76 -52
- mcp_sqlite_memory_bank/resources.py +250 -150
- mcp_sqlite_memory_bank/semantic.py +50 -17
- mcp_sqlite_memory_bank/server.py +351 -23
- mcp_sqlite_memory_bank/tools/__init__.py +33 -25
- mcp_sqlite_memory_bank/tools/analytics.py +225 -139
- mcp_sqlite_memory_bank/tools/basic.py +417 -7
- mcp_sqlite_memory_bank/tools/discovery.py +1428 -0
- mcp_sqlite_memory_bank/tools/search.py +159 -72
- mcp_sqlite_memory_bank/types.py +6 -1
- mcp_sqlite_memory_bank/utils.py +165 -107
- {mcp_sqlite_memory_bank-1.5.0.dist-info → mcp_sqlite_memory_bank-1.6.0.dist-info}/METADATA +54 -6
- mcp_sqlite_memory_bank-1.6.0.dist-info/RECORD +21 -0
- mcp_sqlite_memory_bank-1.5.0.dist-info/RECORD +0 -19
- {mcp_sqlite_memory_bank-1.5.0.dist-info → mcp_sqlite_memory_bank-1.6.0.dist-info}/WHEEL +0 -0
- {mcp_sqlite_memory_bank-1.5.0.dist-info → mcp_sqlite_memory_bank-1.6.0.dist-info}/entry_points.txt +0 -0
- {mcp_sqlite_memory_bank-1.5.0.dist-info → mcp_sqlite_memory_bank-1.6.0.dist-info}/licenses/LICENSE +0 -0
- {mcp_sqlite_memory_bank-1.5.0.dist-info → mcp_sqlite_memory_bank-1.6.0.dist-info}/top_level.txt +0 -0
@@ -8,7 +8,7 @@ Cursor, and other LLM-powered tools to interact with structured data in a
|
|
8
8
|
safe, explicit, and extensible way.
|
9
9
|
|
10
10
|
Author: Robert Meisner
|
11
|
-
Version:
|
11
|
+
Version: 1.6.0
|
12
12
|
License: MIT
|
13
13
|
"""
|
14
14
|
|
@@ -93,7 +93,7 @@ __all__ = [
|
|
93
93
|
"explore_tables",
|
94
94
|
"add_embeddings",
|
95
95
|
"semantic_search",
|
96
|
-
"find_related",
|
96
|
+
"find_related",
|
97
97
|
"smart_search",
|
98
98
|
"embedding_stats",
|
99
99
|
"auto_semantic_search",
|
@@ -0,0 +1,68 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
Entry point for running the SQLite Memory Bank MCP server.
|
4
|
+
|
5
|
+
This module provides a clean entry point for MCP clients to start the server
|
6
|
+
without import issues or circular dependencies.
|
7
|
+
"""
|
8
|
+
|
9
|
+
import logging
|
10
|
+
import sys
|
11
|
+
import os
|
12
|
+
|
13
|
+
# Add the project root to Python path to avoid import issues
|
14
|
+
project_root = os.path.dirname(
|
15
|
+
os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
16
|
+
)
|
17
|
+
if project_root not in sys.path:
|
18
|
+
sys.path.insert(0, project_root)
|
19
|
+
|
20
|
+
# Configure logging before any other imports
|
21
|
+
logging.basicConfig(
|
22
|
+
level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
23
|
+
)
|
24
|
+
|
25
|
+
|
26
|
+
def main() -> None:
|
27
|
+
"""Main entry point for the MCP server."""
|
28
|
+
try:
|
29
|
+
# Import here to avoid circular import issues
|
30
|
+
from .server import app, DB_PATH
|
31
|
+
|
32
|
+
# Handle help argument
|
33
|
+
if "--help" in sys.argv or "-h" in sys.argv:
|
34
|
+
print("SQLite Memory Bank MCP Server")
|
35
|
+
print("Usage: python -m src.mcp_sqlite_memory_bank")
|
36
|
+
print("")
|
37
|
+
print(
|
38
|
+
"This starts the SQLite Memory Bank as an MCP (Model Context Protocol) server."
|
39
|
+
)
|
40
|
+
print(
|
41
|
+
"The server communicates via STDIO and provides memory management tools"
|
42
|
+
)
|
43
|
+
print("for LLMs and AI agents.")
|
44
|
+
print("")
|
45
|
+
print(f"Database location: {DB_PATH}")
|
46
|
+
print("")
|
47
|
+
print("Environment variables:")
|
48
|
+
print(" DB_PATH: Override the default database path")
|
49
|
+
return
|
50
|
+
|
51
|
+
# Log startup information
|
52
|
+
logging.info(
|
53
|
+
f"Starting SQLite Memory Bank MCP server with database at {DB_PATH}"
|
54
|
+
)
|
55
|
+
|
56
|
+
# Run the FastMCP app in stdio mode for MCP clients
|
57
|
+
app.run(transport="stdio")
|
58
|
+
|
59
|
+
except KeyboardInterrupt:
|
60
|
+
logging.info("Server stopped by user")
|
61
|
+
sys.exit(0)
|
62
|
+
except Exception as e:
|
63
|
+
logging.error(f"Failed to start MCP server: {e}")
|
64
|
+
sys.exit(1)
|
65
|
+
|
66
|
+
|
67
|
+
if __name__ == "__main__":
|
68
|
+
main()
|