codebase-memory-mcp 0.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.
@@ -0,0 +1,17 @@
1
+ """
2
+ codebase-memory-mcp — Fast code intelligence engine for AI coding agents.
3
+ Downloads and runs the codebase-memory-mcp binary from GitHub Releases.
4
+ """
5
+
6
+ try:
7
+ from importlib.metadata import version, PackageNotFoundError
8
+ try:
9
+ __version__ = version("codebase-memory-mcp")
10
+ except PackageNotFoundError:
11
+ __version__ = "unknown"
12
+ except ImportError:
13
+ __version__ = "unknown"
14
+
15
+ from ._cli import main
16
+
17
+ __all__ = ["main", "__version__"]
@@ -0,0 +1,4 @@
1
+ from ._cli import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
@@ -0,0 +1,122 @@
1
+ """Downloads the codebase-memory-mcp binary on first run, then exec's it."""
2
+
3
+ import os
4
+ import sys
5
+ import platform
6
+ import stat
7
+ import shutil
8
+ import tempfile
9
+ import urllib.request
10
+ import urllib.error
11
+ from pathlib import Path
12
+
13
+ REPO = "DeusData/codebase-memory-mcp"
14
+
15
+
16
+ def _version() -> str:
17
+ try:
18
+ from importlib.metadata import version
19
+ return version("codebase-memory-mcp")
20
+ except Exception:
21
+ return "0.6.0"
22
+
23
+
24
+ def _os_name() -> str:
25
+ p = sys.platform
26
+ if p == "linux":
27
+ return "linux"
28
+ if p == "darwin":
29
+ return "darwin"
30
+ if p == "win32":
31
+ return "windows"
32
+ sys.exit(f"codebase-memory-mcp: unsupported platform: {p}")
33
+
34
+
35
+ def _arch() -> str:
36
+ m = platform.machine().lower()
37
+ if m in ("arm64", "aarch64"):
38
+ return "arm64"
39
+ if m in ("x86_64", "amd64"):
40
+ return "amd64"
41
+ sys.exit(f"codebase-memory-mcp: unsupported architecture: {m}")
42
+
43
+
44
+ def _cache_dir() -> Path:
45
+ if sys.platform == "win32":
46
+ base = Path(os.environ.get("LOCALAPPDATA", Path.home() / "AppData" / "Local"))
47
+ elif sys.platform == "darwin":
48
+ base = Path.home() / "Library" / "Caches"
49
+ else:
50
+ base = Path(os.environ.get("XDG_CACHE_HOME", Path.home() / ".cache"))
51
+ return base / "codebase-memory-mcp"
52
+
53
+
54
+ def _bin_path(version: str) -> Path:
55
+ name = "codebase-memory-mcp.exe" if sys.platform == "win32" else "codebase-memory-mcp"
56
+ return _cache_dir() / version / name
57
+
58
+
59
+ def _download(version: str) -> Path:
60
+ os_name = _os_name()
61
+ arch = _arch()
62
+ ext = "zip" if os_name == "windows" else "tar.gz"
63
+ url = (
64
+ f"https://github.com/{REPO}/releases/download/v{version}"
65
+ f"/codebase-memory-mcp-{os_name}-{arch}.{ext}"
66
+ )
67
+
68
+ dest = _bin_path(version)
69
+ dest.parent.mkdir(parents=True, exist_ok=True)
70
+
71
+ print(
72
+ f"codebase-memory-mcp: downloading v{version} for {os_name}/{arch}...",
73
+ file=sys.stderr,
74
+ )
75
+
76
+ with tempfile.TemporaryDirectory() as tmp:
77
+ tmp_archive = os.path.join(tmp, f"cbm.{ext}")
78
+ try:
79
+ urllib.request.urlretrieve(url, tmp_archive)
80
+ except urllib.error.HTTPError as e:
81
+ sys.exit(
82
+ f"codebase-memory-mcp: download failed ({e})\n"
83
+ f"URL: {url}\n"
84
+ f"See https://github.com/{REPO}/releases for available versions."
85
+ )
86
+
87
+ if ext == "tar.gz":
88
+ import tarfile
89
+ with tarfile.open(tmp_archive) as tf:
90
+ tf.extractall(tmp)
91
+ else:
92
+ import zipfile
93
+ with zipfile.ZipFile(tmp_archive) as zf:
94
+ zf.extractall(tmp)
95
+
96
+ bin_name = "codebase-memory-mcp.exe" if os_name == "windows" else "codebase-memory-mcp"
97
+ extracted = os.path.join(tmp, bin_name)
98
+ if not os.path.exists(extracted):
99
+ sys.exit(f"codebase-memory-mcp: binary not found after extraction")
100
+
101
+ shutil.copy2(extracted, dest)
102
+ current = dest.stat().st_mode
103
+ dest.chmod(current | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
104
+
105
+ return dest
106
+
107
+
108
+ def main() -> None:
109
+ version = _version()
110
+ bin_path = _bin_path(version)
111
+
112
+ if not bin_path.exists():
113
+ bin_path = _download(version)
114
+
115
+ args = [str(bin_path)] + sys.argv[1:]
116
+
117
+ if sys.platform != "win32":
118
+ os.execv(str(bin_path), args)
119
+ else:
120
+ import subprocess
121
+ result = subprocess.run(args)
122
+ sys.exit(result.returncode)
@@ -0,0 +1,54 @@
1
+ Metadata-Version: 2.4
2
+ Name: codebase-memory-mcp
3
+ Version: 0.6.0
4
+ Summary: Fast code intelligence engine for AI coding agents — single static binary MCP server
5
+ Project-URL: Homepage, https://github.com/DeusData/codebase-memory-mcp
6
+ Project-URL: Repository, https://github.com/DeusData/codebase-memory-mcp
7
+ Project-URL: Issues, https://github.com/DeusData/codebase-memory-mcp/issues
8
+ License: MIT
9
+ Keywords: ai,claude,code-intelligence,codebase,llm,mcp,memory
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: MacOS
15
+ Classifier: Operating System :: Microsoft :: Windows
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Classifier: Topic :: Software Development
20
+ Requires-Python: >=3.8
21
+ Description-Content-Type: text/markdown
22
+
23
+ # codebase-memory-mcp
24
+
25
+ **Fast code intelligence engine for AI coding agents.** Indexes an average repository in milliseconds, the Linux kernel (28M LOC) in 3 minutes. Answers structural queries in under 1ms.
26
+
27
+ This package installs the `codebase-memory-mcp` binary from [GitHub Releases](https://github.com/DeusData/codebase-memory-mcp/releases). The binary is downloaded on first run and cached in your OS cache directory.
28
+
29
+ ## Installation
30
+
31
+ ```bash
32
+ pip install codebase-memory-mcp
33
+ # or
34
+ pipx install codebase-memory-mcp
35
+ ```
36
+
37
+ ## Usage
38
+
39
+ ```bash
40
+ codebase-memory-mcp install # configure your coding agents
41
+ codebase-memory-mcp --help
42
+ ```
43
+
44
+ ## Supported platforms
45
+
46
+ | OS | Architecture |
47
+ |---------|-------------|
48
+ | macOS | arm64, amd64 |
49
+ | Linux | arm64, amd64 |
50
+ | Windows | amd64 |
51
+
52
+ ## Full documentation
53
+
54
+ See [github.com/DeusData/codebase-memory-mcp](https://github.com/DeusData/codebase-memory-mcp)
@@ -0,0 +1,7 @@
1
+ codebase_memory_mcp/__init__.py,sha256=kJn3Yg4J3wTDNgzRPX-3J8K9z90eziSi5UZVsOIn8t8,461
2
+ codebase_memory_mcp/__main__.py,sha256=JBinc0CXsZoKlNFyseGZQbRe35N2mf2dATz_ZFL9KO8,62
3
+ codebase_memory_mcp/_cli.py,sha256=nCuNNOstgrDGQqMT7VCBBuWUttDKPI_Jihrw2WaDtA4,3439
4
+ codebase_memory_mcp-0.6.0.dist-info/METADATA,sha256=1-msneS-VGbTN6Tm4Ao99ysUwkUNw822axN922fqfE0,1895
5
+ codebase_memory_mcp-0.6.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
6
+ codebase_memory_mcp-0.6.0.dist-info/entry_points.txt,sha256=fziD79R320yClZwiFHP0_R2Iv-BQPWAZhfJkR__I1wE,65
7
+ codebase_memory_mcp-0.6.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ codebase-memory-mcp = codebase_memory_mcp:main