mcp-wallfacer 0.4.3__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.
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.4
2
+ Name: mcp-wallfacer
3
+ Version: 0.4.3
4
+ Summary: Runtime fuzzing and invariant-testing harness for MCP servers.
5
+ Author: lacausecrypto
6
+ License: MIT OR Apache-2.0
7
+ Project-URL: Homepage, https://github.com/lacausecrypto/mcp-wallfacer
8
+ Project-URL: Repository, https://github.com/lacausecrypto/mcp-wallfacer
9
+ Project-URL: Issues, https://github.com/lacausecrypto/mcp-wallfacer/issues
10
+ Project-URL: Changelog, https://github.com/lacausecrypto/mcp-wallfacer/blob/main/CHANGELOG.md
11
+ Keywords: mcp,model-context-protocol,fuzzing,testing,validation,security
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Security
19
+ Classifier: Topic :: Software Development :: Testing
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+
23
+ # mcp-wallfacer (pip wrapper)
24
+
25
+ > Thin Python wrapper around the [`mcp-wallfacer`](https://github.com/lacausecrypto/mcp-wallfacer)
26
+ > Rust binary. On first invocation, downloads the matching platform
27
+ > binary from the GitHub release into a per-user cache and execs it.
28
+
29
+ ```bash
30
+ pip install mcp-wallfacer
31
+ wallfacer --help
32
+ ```
33
+
34
+ ## What it installs
35
+
36
+ The Python package is tiny — pure-stdlib launcher, no extra deps. The
37
+ actual `wallfacer` binary is downloaded on the first run from the
38
+ matching GitHub release.
39
+
40
+ | Platform | Architecture |
41
+ |---|---|
42
+ | Linux | `x86_64`, `aarch64` |
43
+ | macOS | `x86_64` (Intel), `aarch64` (Apple silicon) |
44
+ | Windows | `x86_64` |
45
+
46
+ For other platforms, build from source:
47
+
48
+ ```bash
49
+ cargo install mcp-wallfacer
50
+ ```
51
+
52
+ ## Environment variables
53
+
54
+ | Var | Default | Purpose |
55
+ |---|---|---|
56
+ | `WALLFACER_VERSION` | `v<package version>` | Pin the GH release to download. |
57
+ | `WALLFACER_CACHE_DIR` | platform default | Override the binary cache location. |
58
+
59
+ Default cache locations:
60
+
61
+ - Linux: `$XDG_CACHE_HOME/mcp-wallfacer` (or `~/.cache/mcp-wallfacer`)
62
+ - macOS: `~/Library/Caches/mcp-wallfacer`
63
+ - Windows: `%LOCALAPPDATA%\mcp-wallfacer`
64
+
65
+ ## How the wrapper works
66
+
67
+ 1. `wallfacer` is registered as a console script via
68
+ `[project.scripts]` in `pyproject.toml`. It maps to
69
+ `wallfacer_cli.main`.
70
+ 2. On invocation, `main()` checks the cache for a binary matching the
71
+ current platform + version. If absent, it downloads + extracts the
72
+ GitHub release tarball.
73
+ 3. `subprocess.run` forwards argv and stdio to the binary, exit code
74
+ propagates back.
75
+
76
+ The wrapper executes no Python at runtime beyond the launcher itself,
77
+ so behaviour is identical to a direct `cargo install` of the same
78
+ version.
@@ -0,0 +1,56 @@
1
+ # mcp-wallfacer (pip wrapper)
2
+
3
+ > Thin Python wrapper around the [`mcp-wallfacer`](https://github.com/lacausecrypto/mcp-wallfacer)
4
+ > Rust binary. On first invocation, downloads the matching platform
5
+ > binary from the GitHub release into a per-user cache and execs it.
6
+
7
+ ```bash
8
+ pip install mcp-wallfacer
9
+ wallfacer --help
10
+ ```
11
+
12
+ ## What it installs
13
+
14
+ The Python package is tiny — pure-stdlib launcher, no extra deps. The
15
+ actual `wallfacer` binary is downloaded on the first run from the
16
+ matching GitHub release.
17
+
18
+ | Platform | Architecture |
19
+ |---|---|
20
+ | Linux | `x86_64`, `aarch64` |
21
+ | macOS | `x86_64` (Intel), `aarch64` (Apple silicon) |
22
+ | Windows | `x86_64` |
23
+
24
+ For other platforms, build from source:
25
+
26
+ ```bash
27
+ cargo install mcp-wallfacer
28
+ ```
29
+
30
+ ## Environment variables
31
+
32
+ | Var | Default | Purpose |
33
+ |---|---|---|
34
+ | `WALLFACER_VERSION` | `v<package version>` | Pin the GH release to download. |
35
+ | `WALLFACER_CACHE_DIR` | platform default | Override the binary cache location. |
36
+
37
+ Default cache locations:
38
+
39
+ - Linux: `$XDG_CACHE_HOME/mcp-wallfacer` (or `~/.cache/mcp-wallfacer`)
40
+ - macOS: `~/Library/Caches/mcp-wallfacer`
41
+ - Windows: `%LOCALAPPDATA%\mcp-wallfacer`
42
+
43
+ ## How the wrapper works
44
+
45
+ 1. `wallfacer` is registered as a console script via
46
+ `[project.scripts]` in `pyproject.toml`. It maps to
47
+ `wallfacer_cli.main`.
48
+ 2. On invocation, `main()` checks the cache for a binary matching the
49
+ current platform + version. If absent, it downloads + extracts the
50
+ GitHub release tarball.
51
+ 3. `subprocess.run` forwards argv and stdio to the binary, exit code
52
+ propagates back.
53
+
54
+ The wrapper executes no Python at runtime beyond the launcher itself,
55
+ so behaviour is identical to a direct `cargo install` of the same
56
+ version.
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.4
2
+ Name: mcp-wallfacer
3
+ Version: 0.4.3
4
+ Summary: Runtime fuzzing and invariant-testing harness for MCP servers.
5
+ Author: lacausecrypto
6
+ License: MIT OR Apache-2.0
7
+ Project-URL: Homepage, https://github.com/lacausecrypto/mcp-wallfacer
8
+ Project-URL: Repository, https://github.com/lacausecrypto/mcp-wallfacer
9
+ Project-URL: Issues, https://github.com/lacausecrypto/mcp-wallfacer/issues
10
+ Project-URL: Changelog, https://github.com/lacausecrypto/mcp-wallfacer/blob/main/CHANGELOG.md
11
+ Keywords: mcp,model-context-protocol,fuzzing,testing,validation,security
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Security
19
+ Classifier: Topic :: Software Development :: Testing
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+
23
+ # mcp-wallfacer (pip wrapper)
24
+
25
+ > Thin Python wrapper around the [`mcp-wallfacer`](https://github.com/lacausecrypto/mcp-wallfacer)
26
+ > Rust binary. On first invocation, downloads the matching platform
27
+ > binary from the GitHub release into a per-user cache and execs it.
28
+
29
+ ```bash
30
+ pip install mcp-wallfacer
31
+ wallfacer --help
32
+ ```
33
+
34
+ ## What it installs
35
+
36
+ The Python package is tiny — pure-stdlib launcher, no extra deps. The
37
+ actual `wallfacer` binary is downloaded on the first run from the
38
+ matching GitHub release.
39
+
40
+ | Platform | Architecture |
41
+ |---|---|
42
+ | Linux | `x86_64`, `aarch64` |
43
+ | macOS | `x86_64` (Intel), `aarch64` (Apple silicon) |
44
+ | Windows | `x86_64` |
45
+
46
+ For other platforms, build from source:
47
+
48
+ ```bash
49
+ cargo install mcp-wallfacer
50
+ ```
51
+
52
+ ## Environment variables
53
+
54
+ | Var | Default | Purpose |
55
+ |---|---|---|
56
+ | `WALLFACER_VERSION` | `v<package version>` | Pin the GH release to download. |
57
+ | `WALLFACER_CACHE_DIR` | platform default | Override the binary cache location. |
58
+
59
+ Default cache locations:
60
+
61
+ - Linux: `$XDG_CACHE_HOME/mcp-wallfacer` (or `~/.cache/mcp-wallfacer`)
62
+ - macOS: `~/Library/Caches/mcp-wallfacer`
63
+ - Windows: `%LOCALAPPDATA%\mcp-wallfacer`
64
+
65
+ ## How the wrapper works
66
+
67
+ 1. `wallfacer` is registered as a console script via
68
+ `[project.scripts]` in `pyproject.toml`. It maps to
69
+ `wallfacer_cli.main`.
70
+ 2. On invocation, `main()` checks the cache for a binary matching the
71
+ current platform + version. If absent, it downloads + extracts the
72
+ GitHub release tarball.
73
+ 3. `subprocess.run` forwards argv and stdio to the binary, exit code
74
+ propagates back.
75
+
76
+ The wrapper executes no Python at runtime beyond the launcher itself,
77
+ so behaviour is identical to a direct `cargo install` of the same
78
+ version.
@@ -0,0 +1,8 @@
1
+ README.md
2
+ pyproject.toml
3
+ mcp_wallfacer.egg-info/PKG-INFO
4
+ mcp_wallfacer.egg-info/SOURCES.txt
5
+ mcp_wallfacer.egg-info/dependency_links.txt
6
+ mcp_wallfacer.egg-info/entry_points.txt
7
+ mcp_wallfacer.egg-info/top_level.txt
8
+ wallfacer_cli/__init__.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ wallfacer = wallfacer_cli:main
@@ -0,0 +1 @@
1
+ wallfacer_cli
@@ -0,0 +1,36 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "mcp-wallfacer"
7
+ version = "0.4.3"
8
+ description = "Runtime fuzzing and invariant-testing harness for MCP servers."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "MIT OR Apache-2.0" }
12
+ authors = [{ name = "lacausecrypto" }]
13
+ keywords = ["mcp", "model-context-protocol", "fuzzing", "testing", "validation", "security"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Intended Audience :: Developers",
17
+ "License :: OSI Approved :: MIT License",
18
+ "License :: OSI Approved :: Apache Software License",
19
+ "Operating System :: OS Independent",
20
+ "Programming Language :: Python :: 3",
21
+ "Topic :: Security",
22
+ "Topic :: Software Development :: Testing",
23
+ ]
24
+
25
+ [project.urls]
26
+ Homepage = "https://github.com/lacausecrypto/mcp-wallfacer"
27
+ Repository = "https://github.com/lacausecrypto/mcp-wallfacer"
28
+ Issues = "https://github.com/lacausecrypto/mcp-wallfacer/issues"
29
+ Changelog = "https://github.com/lacausecrypto/mcp-wallfacer/blob/main/CHANGELOG.md"
30
+
31
+ [project.scripts]
32
+ wallfacer = "wallfacer_cli:main"
33
+
34
+ [tool.setuptools]
35
+ packages = ["wallfacer_cli"]
36
+ include-package-data = true
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,153 @@
1
+ """Python launcher for the `wallfacer` Rust binary.
2
+
3
+ `pip install mcp-wallfacer` installs this package, which on first
4
+ `wallfacer ...` invocation fetches the matching GitHub release tarball
5
+ into a per-user cache directory and execs the binary. Subsequent calls
6
+ reuse the cached binary.
7
+
8
+ Pure-stdlib (urllib + tarfile + zipfile) — no extra dependencies.
9
+
10
+ Mirrors the npm wrapper's behaviour so all install paths converge on
11
+ the same prebuilt binary.
12
+ """
13
+
14
+ from __future__ import annotations
15
+
16
+ import os
17
+ import platform
18
+ import shutil
19
+ import stat
20
+ import subprocess
21
+ import sys
22
+ import tarfile
23
+ import tempfile
24
+ import urllib.request
25
+ import zipfile
26
+ from pathlib import Path
27
+
28
+ __version__ = "0.4.3"
29
+
30
+ _REPO = "lacausecrypto/mcp-wallfacer"
31
+ _RELEASE_TEMPLATE = "https://github.com/{repo}/releases/download/{version}/{archive}"
32
+
33
+
34
+ def _target_triple() -> str:
35
+ """Map the current Python runtime to a Rust release triple."""
36
+ system = platform.system().lower()
37
+ machine = platform.machine().lower()
38
+
39
+ arch = {
40
+ "x86_64": "x86_64",
41
+ "amd64": "x86_64",
42
+ "aarch64": "aarch64",
43
+ "arm64": "aarch64",
44
+ }.get(machine)
45
+ if not arch:
46
+ raise RuntimeError(
47
+ f"unsupported architecture {machine!r}. "
48
+ "Build from source: `cargo install mcp-wallfacer`."
49
+ )
50
+
51
+ if system == "linux":
52
+ return f"{arch}-unknown-linux-gnu"
53
+ if system == "darwin":
54
+ return f"{arch}-apple-darwin"
55
+ if system == "windows":
56
+ if arch != "x86_64":
57
+ raise RuntimeError(
58
+ "only x86_64 windows builds are published; "
59
+ "run `cargo install mcp-wallfacer` to build for ARM."
60
+ )
61
+ return "x86_64-pc-windows-msvc"
62
+ raise RuntimeError(
63
+ f"unsupported OS {system!r}. Supported: linux, darwin, windows."
64
+ )
65
+
66
+
67
+ def _archive_name(triple: str) -> str:
68
+ ext = "zip" if "windows" in triple else "tar.gz"
69
+ return f"wallfacer-{triple}.{ext}"
70
+
71
+
72
+ def _binary_name(triple: str) -> str:
73
+ return "wallfacer.exe" if "windows" in triple else "wallfacer"
74
+
75
+
76
+ def _cache_root() -> Path:
77
+ """Per-user cache directory holding the downloaded binary."""
78
+ override = os.environ.get("WALLFACER_CACHE_DIR")
79
+ if override:
80
+ return Path(override).expanduser()
81
+ if sys.platform == "win32":
82
+ base = os.environ.get("LOCALAPPDATA") or str(Path.home() / "AppData" / "Local")
83
+ elif sys.platform == "darwin":
84
+ base = str(Path.home() / "Library" / "Caches")
85
+ else:
86
+ base = os.environ.get("XDG_CACHE_HOME") or str(Path.home() / ".cache")
87
+ return Path(base) / "mcp-wallfacer"
88
+
89
+
90
+ def _download(url: str, dest: Path) -> None:
91
+ """Stream `url` into `dest` with a User-Agent header."""
92
+ req = urllib.request.Request(url, headers={"User-Agent": "mcp-wallfacer-py"})
93
+ with urllib.request.urlopen(req) as response, open(dest, "wb") as fh:
94
+ shutil.copyfileobj(response, fh)
95
+
96
+
97
+ def _extract(archive: Path, dest_dir: Path) -> None:
98
+ if archive.suffix == ".zip" or str(archive).endswith(".zip"):
99
+ with zipfile.ZipFile(archive) as zf:
100
+ zf.extractall(dest_dir)
101
+ else:
102
+ with tarfile.open(archive, mode="r:gz") as tf:
103
+ tf.extractall(dest_dir)
104
+
105
+
106
+ def _ensure_binary(version: str) -> Path:
107
+ """Return the path to a usable wallfacer binary, downloading if absent."""
108
+ triple = _target_triple()
109
+ binary_name = _binary_name(triple)
110
+ cache_dir = _cache_root() / version / triple
111
+ binary_path = cache_dir / binary_name
112
+ if binary_path.exists():
113
+ return binary_path
114
+
115
+ cache_dir.mkdir(parents=True, exist_ok=True)
116
+ archive_name = _archive_name(triple)
117
+ url = _RELEASE_TEMPLATE.format(repo=_REPO, version=version, archive=archive_name)
118
+
119
+ sys.stderr.write(f"[mcp-wallfacer] downloading {archive_name} from {url}\n")
120
+ with tempfile.TemporaryDirectory() as tmp:
121
+ archive_path = Path(tmp) / archive_name
122
+ _download(url, archive_path)
123
+ _extract(archive_path, cache_dir)
124
+
125
+ if not binary_path.exists():
126
+ raise RuntimeError(
127
+ f"expected {binary_name} after extraction; got {list(cache_dir.iterdir())}"
128
+ )
129
+ if sys.platform != "win32":
130
+ binary_path.chmod(binary_path.stat().st_mode | stat.S_IEXEC | stat.S_IRUSR)
131
+ return binary_path
132
+
133
+
134
+ def main() -> int:
135
+ """Entry point installed as `wallfacer` by `[project.scripts]`."""
136
+ version = os.environ.get("WALLFACER_VERSION") or f"v{__version__}"
137
+ try:
138
+ binary = _ensure_binary(version)
139
+ except Exception as err: # noqa: BLE001 — surface any failure verbatim.
140
+ sys.stderr.write(
141
+ f"[mcp-wallfacer] install failed: {err}\n"
142
+ "[mcp-wallfacer] build from source: `cargo install mcp-wallfacer`\n"
143
+ )
144
+ return 1
145
+
146
+ # Forward argv + stdio. `os.execv` would be lighter but Windows
147
+ # doesn't honour it; subprocess.run + return-code is portable.
148
+ completed = subprocess.run([str(binary), *sys.argv[1:]], check=False)
149
+ return completed.returncode
150
+
151
+
152
+ if __name__ == "__main__":
153
+ raise SystemExit(main())