opencode-history-mcp 0.1.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.
@@ -0,0 +1,11 @@
1
+ """opencode_history_mcp — MCP server exposing local OpenCode session
2
+ history as searchable tools (search, file-lookup, session detail,
3
+ stats) for AI coding agents (Hermes, OpenCode, Claude Desktop, Cursor,
4
+ and any other MCP-compatible client).
5
+
6
+ Runs entirely locally: it reads OpenCode's own SQLite database and
7
+ builds a private FTS5 search index. No network calls, no external
8
+ services, no data leaves your machine.
9
+ """
10
+
11
+ __version__ = "0.1.0"
@@ -0,0 +1,34 @@
1
+ """CLI entry point.
2
+
3
+ Handles two invocation modes:
4
+ opencode-history-mcp → run the MCP server (stdio)
5
+ opencode-history-mcp --build-index → full index rebuild
6
+ opencode-history-mcp --sync-index → incremental index sync
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import sys
12
+
13
+
14
+ def main() -> None:
15
+ args = sys.argv[1:]
16
+
17
+ if "--build-index" in args:
18
+ from . import build_index
19
+ sys.argv = [sys.argv[0], "--full"]
20
+ build_index.main()
21
+ return
22
+
23
+ if "--sync-index" in args:
24
+ from . import build_index
25
+ sys.argv = [sys.argv[0], "--sync"]
26
+ build_index.main()
27
+ return
28
+
29
+ from .server import run
30
+ run()
31
+
32
+
33
+ if __name__ == "__main__":
34
+ main()