scapy-mcp 0.1.0__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.
- scapy_mcp-0.1.0/.gitignore +46 -0
- scapy_mcp-0.1.0/.python-version +1 -0
- scapy_mcp-0.1.0/LICENSE +29 -0
- scapy_mcp-0.1.0/PKG-INFO +93 -0
- scapy_mcp-0.1.0/README.md +62 -0
- scapy_mcp-0.1.0/pyproject.toml +79 -0
- scapy_mcp-0.1.0/src/scapy_mcp/__init__.py +8 -0
- scapy_mcp-0.1.0/src/scapy_mcp/__main__.py +21 -0
- scapy_mcp-0.1.0/src/scapy_mcp/server.py +14 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
*.egg-info/
|
|
10
|
+
*.egg
|
|
11
|
+
|
|
12
|
+
# Virtual environments
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
env/
|
|
16
|
+
|
|
17
|
+
# Tooling caches
|
|
18
|
+
.mypy_cache/
|
|
19
|
+
.pytest_cache/
|
|
20
|
+
.ruff_cache/
|
|
21
|
+
.hypothesis/
|
|
22
|
+
.complexipy_cache/
|
|
23
|
+
.coverage
|
|
24
|
+
.coverage.*
|
|
25
|
+
htmlcov/
|
|
26
|
+
coverage.xml
|
|
27
|
+
.cache/
|
|
28
|
+
.benchmarks/
|
|
29
|
+
.pyscn/
|
|
30
|
+
|
|
31
|
+
# OS / editor
|
|
32
|
+
.DS_Store
|
|
33
|
+
.idea/
|
|
34
|
+
.vscode/
|
|
35
|
+
*.swp
|
|
36
|
+
*.swo
|
|
37
|
+
|
|
38
|
+
# Project-local
|
|
39
|
+
.oneiric_cache/
|
|
40
|
+
.crackerjack/
|
|
41
|
+
.lycheecache/
|
|
42
|
+
dist/
|
|
43
|
+
|
|
44
|
+
# Packet captures (test fixtures should be in tests/fixtures/, gitignored)
|
|
45
|
+
*.pcap
|
|
46
|
+
*.pcapng
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|
scapy_mcp-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Les Leslie. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice,
|
|
9
|
+
this list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
22
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
23
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
24
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
25
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
26
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
27
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
28
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
29
|
+
POSSIBILITY OF SUCH DAMAGE.
|
scapy_mcp-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: scapy-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MCP server wrapping Scapy — packet crafting, dissection, and live capture
|
|
5
|
+
Project-URL: Homepage, https://github.com/lesleslie/scapy-mcp
|
|
6
|
+
Project-URL: Repository, https://github.com/lesleslie/scapy-mcp
|
|
7
|
+
Author-email: Les Leslie <les@wedgwoodwebworks.com>
|
|
8
|
+
License-Expression: BSD-3-Clause
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Requires-Python: >=3.14
|
|
16
|
+
Requires-Dist: fastmcp>=2.12.0
|
|
17
|
+
Requires-Dist: httpx2>=0.28.1
|
|
18
|
+
Requires-Dist: mcp-common>=0.18.0
|
|
19
|
+
Requires-Dist: oneiric>=0.16.0
|
|
20
|
+
Requires-Dist: pydantic-settings>=2.1.0
|
|
21
|
+
Requires-Dist: pydantic>=2.5.0
|
|
22
|
+
Requires-Dist: scapy>=2.5.0
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: bandit>=1.7.9; extra == 'dev'
|
|
25
|
+
Requires-Dist: mypy>=1.9.0; extra == 'dev'
|
|
26
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
29
|
+
Requires-Dist: ruff>=0.4.8; extra == 'dev'
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# scapy-mcp
|
|
33
|
+
|
|
34
|
+
> **Scaffold status: PyPI name reservation.** This package is a placeholder scaffold to claim
|
|
35
|
+
> the `scapy-mcp` name on PyPI. The MCP server is not yet implemented.
|
|
36
|
+
|
|
37
|
+
MCP server wrapping [Scapy](https://scapy.net/) — interactive packet
|
|
38
|
+
manipulation library. Provides access to:
|
|
39
|
+
|
|
40
|
+
- **Packet crafting** — build L2/L3/L4 packets from Pythonic layers
|
|
41
|
+
- **Dissection** — decode captured packet bytes into structured summaries
|
|
42
|
+
- **Live capture** — sniff interfaces with optional BPF filters
|
|
43
|
+
- **PCAP I/O** — read and write `.pcap` / `.pcapng` files
|
|
44
|
+
- **Protocol layers** — TCP, UDP, ICMP, ARP, DNS, TLS, raw
|
|
45
|
+
|
|
46
|
+
## Reserve the PyPI name
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cd /Users/les/Projects/scapy-mcp
|
|
50
|
+
uv build
|
|
51
|
+
uv publish # uses UV_PUBLISH_TOKEN from env
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The package name `scapy-mcp` is currently free on PyPI (verified 2026-08-31).
|
|
55
|
+
Publishing a placeholder 0.1.0 release locks the name.
|
|
56
|
+
|
|
57
|
+
## Connection to flowscape
|
|
58
|
+
|
|
59
|
+
The `flowscape` design spec
|
|
60
|
+
(`docs/superpowers/specs/2026-08-31-flowscape-design.md`) explicitly lists
|
|
61
|
+
`scapy-mcp` as a future integration under **Out of scope / future work**:
|
|
62
|
+
|
|
63
|
+
> scapy-mcp / unifi-mcp integration — Enrichment plugins for `heuristics.py`
|
|
64
|
+
> / `graph.py` — v2+
|
|
65
|
+
|
|
66
|
+
This scaffold is the name-reservation placeholder for that v2 integration.
|
|
67
|
+
|
|
68
|
+
## Architecture (planned)
|
|
69
|
+
|
|
70
|
+
Mirrors the `raindropio-mcp` pattern in this ecosystem:
|
|
71
|
+
|
|
72
|
+
- `scapy` as the core packet manipulation dependency
|
|
73
|
+
- `fastmcp` for the MCP server surface (tools = scapy operations)
|
|
74
|
+
- `oneiric` for layered config (`settings/scapy-mcp.yaml`, `local.yaml`,
|
|
75
|
+
env vars) — configures default interface, capture mode (live vs offline),
|
|
76
|
+
optional `SCAPY_MCP_PRIVILEGED_HELPER` for `/dev/bpf*` ACLs
|
|
77
|
+
- `mcp-common` for bootstrap, health endpoints
|
|
78
|
+
- `pydantic`/`pydantic-settings` for typed config models
|
|
79
|
+
- Live capture requires root or a ChmodBPF-style helper (same constraint
|
|
80
|
+
documented for flowscape)
|
|
81
|
+
|
|
82
|
+
## Status
|
|
83
|
+
|
|
84
|
+
| Phase | State |
|
|
85
|
+
|---|---|
|
|
86
|
+
| PyPI name reservation | **pending** (run `uv publish`) |
|
|
87
|
+
| Spec / plan | not written |
|
|
88
|
+
| Implementation | not started |
|
|
89
|
+
| Tests | not started |
|
|
90
|
+
|
|
91
|
+
## License
|
|
92
|
+
|
|
93
|
+
BSD-3-Clause.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# scapy-mcp
|
|
2
|
+
|
|
3
|
+
> **Scaffold status: PyPI name reservation.** This package is a placeholder scaffold to claim
|
|
4
|
+
> the `scapy-mcp` name on PyPI. The MCP server is not yet implemented.
|
|
5
|
+
|
|
6
|
+
MCP server wrapping [Scapy](https://scapy.net/) — interactive packet
|
|
7
|
+
manipulation library. Provides access to:
|
|
8
|
+
|
|
9
|
+
- **Packet crafting** — build L2/L3/L4 packets from Pythonic layers
|
|
10
|
+
- **Dissection** — decode captured packet bytes into structured summaries
|
|
11
|
+
- **Live capture** — sniff interfaces with optional BPF filters
|
|
12
|
+
- **PCAP I/O** — read and write `.pcap` / `.pcapng` files
|
|
13
|
+
- **Protocol layers** — TCP, UDP, ICMP, ARP, DNS, TLS, raw
|
|
14
|
+
|
|
15
|
+
## Reserve the PyPI name
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
cd /Users/les/Projects/scapy-mcp
|
|
19
|
+
uv build
|
|
20
|
+
uv publish # uses UV_PUBLISH_TOKEN from env
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The package name `scapy-mcp` is currently free on PyPI (verified 2026-08-31).
|
|
24
|
+
Publishing a placeholder 0.1.0 release locks the name.
|
|
25
|
+
|
|
26
|
+
## Connection to flowscape
|
|
27
|
+
|
|
28
|
+
The `flowscape` design spec
|
|
29
|
+
(`docs/superpowers/specs/2026-08-31-flowscape-design.md`) explicitly lists
|
|
30
|
+
`scapy-mcp` as a future integration under **Out of scope / future work**:
|
|
31
|
+
|
|
32
|
+
> scapy-mcp / unifi-mcp integration — Enrichment plugins for `heuristics.py`
|
|
33
|
+
> / `graph.py` — v2+
|
|
34
|
+
|
|
35
|
+
This scaffold is the name-reservation placeholder for that v2 integration.
|
|
36
|
+
|
|
37
|
+
## Architecture (planned)
|
|
38
|
+
|
|
39
|
+
Mirrors the `raindropio-mcp` pattern in this ecosystem:
|
|
40
|
+
|
|
41
|
+
- `scapy` as the core packet manipulation dependency
|
|
42
|
+
- `fastmcp` for the MCP server surface (tools = scapy operations)
|
|
43
|
+
- `oneiric` for layered config (`settings/scapy-mcp.yaml`, `local.yaml`,
|
|
44
|
+
env vars) — configures default interface, capture mode (live vs offline),
|
|
45
|
+
optional `SCAPY_MCP_PRIVILEGED_HELPER` for `/dev/bpf*` ACLs
|
|
46
|
+
- `mcp-common` for bootstrap, health endpoints
|
|
47
|
+
- `pydantic`/`pydantic-settings` for typed config models
|
|
48
|
+
- Live capture requires root or a ChmodBPF-style helper (same constraint
|
|
49
|
+
documented for flowscape)
|
|
50
|
+
|
|
51
|
+
## Status
|
|
52
|
+
|
|
53
|
+
| Phase | State |
|
|
54
|
+
|---|---|
|
|
55
|
+
| PyPI name reservation | **pending** (run `uv publish`) |
|
|
56
|
+
| Spec / plan | not written |
|
|
57
|
+
| Implementation | not started |
|
|
58
|
+
| Tests | not started |
|
|
59
|
+
|
|
60
|
+
## License
|
|
61
|
+
|
|
62
|
+
BSD-3-Clause.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "scapy-mcp"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "MCP server wrapping Scapy — packet crafting, dissection, and live capture"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "BSD-3-Clause"
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "Les Leslie", email = "les@wedgwoodwebworks.com" },
|
|
13
|
+
]
|
|
14
|
+
requires-python = ">=3.14"
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 3 - Alpha",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"License :: OSI Approved :: BSD License",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.14",
|
|
21
|
+
]
|
|
22
|
+
dependencies = [
|
|
23
|
+
"fastmcp>=2.12.0",
|
|
24
|
+
"httpx2>=0.28.1",
|
|
25
|
+
"mcp-common>=0.18.0",
|
|
26
|
+
"oneiric>=0.16.0",
|
|
27
|
+
"pydantic>=2.5.0",
|
|
28
|
+
"pydantic-settings>=2.1.0",
|
|
29
|
+
"scapy>=2.5.0",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.optional-dependencies]
|
|
33
|
+
dev = [
|
|
34
|
+
"pytest>=8.0.0",
|
|
35
|
+
"pytest-asyncio>=0.23.0",
|
|
36
|
+
"pytest-cov>=4.1.0",
|
|
37
|
+
"ruff>=0.4.8",
|
|
38
|
+
"mypy>=1.9.0",
|
|
39
|
+
"bandit>=1.7.9",
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
[project.scripts]
|
|
43
|
+
scapy-mcp = "scapy_mcp.__main__:main"
|
|
44
|
+
|
|
45
|
+
[project.urls]
|
|
46
|
+
Homepage = "https://github.com/lesleslie/scapy-mcp"
|
|
47
|
+
Repository = "https://github.com/lesleslie/scapy-mcp"
|
|
48
|
+
|
|
49
|
+
[tool.hatch.build.targets.wheel]
|
|
50
|
+
packages = ["scapy_mcp"]
|
|
51
|
+
|
|
52
|
+
[tool.hatch.build.targets.sdist]
|
|
53
|
+
exclude = [
|
|
54
|
+
"/.venv",
|
|
55
|
+
"/.pytest_cache",
|
|
56
|
+
"/.mypy_cache",
|
|
57
|
+
"/.ruff_cache",
|
|
58
|
+
"/dist",
|
|
59
|
+
"/tests",
|
|
60
|
+
"/.cache",
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
[tool.ruff]
|
|
64
|
+
line-length = 100
|
|
65
|
+
target-version = "py314"
|
|
66
|
+
|
|
67
|
+
[tool.ruff.lint]
|
|
68
|
+
select = ["E", "F", "I", "N", "W", "UP", "B", "C4", "SIM", "TCH"]
|
|
69
|
+
ignore = ["E501"]
|
|
70
|
+
|
|
71
|
+
[tool.pytest.ini_options]
|
|
72
|
+
asyncio_mode = "auto"
|
|
73
|
+
testpaths = ["tests"]
|
|
74
|
+
|
|
75
|
+
[tool.uv]
|
|
76
|
+
constraint-dependencies = [
|
|
77
|
+
"aiohttp>=3.14.3",
|
|
78
|
+
"cryptography>=50.0.0",
|
|
79
|
+
]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""scapy-mcp CLI entry point.
|
|
2
|
+
|
|
3
|
+
Scaffold stub. Real entry point will dispatch to the FastMCP server
|
|
4
|
+
once the server module is implemented.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import sys
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def main() -> int:
|
|
13
|
+
"""Placeholder entry point. Prints version and exits."""
|
|
14
|
+
from scapy_mcp import __version__
|
|
15
|
+
|
|
16
|
+
print(f"scapy-mcp {__version__} (scaffold — not yet implemented)")
|
|
17
|
+
return 0
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
if __name__ == "__main__":
|
|
21
|
+
sys.exit(main())
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""FastMCP server stub for scapy-mcp.
|
|
2
|
+
|
|
3
|
+
Scaffold status: module exists so future `from scapy_mcp.server import mcp`
|
|
4
|
+
imports resolve cleanly. Implementation pending.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from fastmcp import FastMCP
|
|
10
|
+
|
|
11
|
+
mcp = FastMCP("scapy-mcp")
|
|
12
|
+
|
|
13
|
+
# Tools, resources, and prompts will be registered here once the
|
|
14
|
+
# implementation lands. See the project plan (TBD).
|