mcpcap 0.3.0__tar.gz → 0.3.2__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.
- {mcpcap-0.3.0 → mcpcap-0.3.2}/.github/workflows/release.yml +28 -17
- {mcpcap-0.3.0 → mcpcap-0.3.2}/PKG-INFO +1 -1
- {mcpcap-0.3.0 → mcpcap-0.3.2}/docs/source/user-guide/mcp-integration.md +0 -8
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap/_version.py +3 -3
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap/core/server.py +1 -3
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap.egg-info/PKG-INFO +1 -1
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap.egg-info/SOURCES.txt +0 -4
- mcpcap-0.3.0/.DS_Store +0 -0
- mcpcap-0.3.0/requirements.txt +0 -62
- mcpcap-0.3.0/src/mcpcap/resources/__init__.py +0 -5
- mcpcap-0.3.0/src/mcpcap/resources/references.py +0 -90
- {mcpcap-0.3.0 → mcpcap-0.3.2}/.github/FUNDING.yml +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/.github/workflows/test.yml +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/.gitignore +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/.readthedocs.yaml +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/LICENSE +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/README.md +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/docs/Makefile +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/docs/source/_static/.gitkeep +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/docs/source/api/cli.rst +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/docs/source/api/core.rst +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/docs/source/api/modules.rst +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/docs/source/conf.py +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/docs/source/index.rst +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/docs/source/user-guide/analysis-guides.md +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/docs/source/user-guide/installation.md +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/docs/source/user-guide/quickstart.md +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/examples/README.md +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/examples/dns.pcap +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/pyproject.toml +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/readme-assets/mcpcap-logo.png +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/setup.cfg +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap/__init__.py +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap/cli.py +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap/core/__init__.py +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap/core/config.py +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap/modules/__init__.py +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap/modules/base.py +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap/modules/dns.py +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap.egg-info/dependency_links.txt +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap.egg-info/entry_points.txt +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap.egg-info/requires.txt +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/src/mcpcap.egg-info/top_level.txt +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/tests/__init__.py +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/tests/test_cli.py +0 -0
- {mcpcap-0.3.0 → mcpcap-0.3.2}/tests/test_dns.py +0 -0
@@ -52,25 +52,36 @@ jobs:
|
|
52
52
|
twine check dist/*
|
53
53
|
|
54
54
|
- name: Create GitHub Release
|
55
|
-
|
55
|
+
run: |
|
56
|
+
# Extract version without 'v' prefix for pip install
|
57
|
+
VERSION=${GITHUB_REF_NAME#v}
|
58
|
+
|
59
|
+
# Get previous tag for release notes generation
|
60
|
+
PREV_TAG=$(git tag --sort=-version:refname | grep -v "$GITHUB_REF_NAME" | head -1)
|
61
|
+
|
62
|
+
# Create release with auto-generated notes
|
63
|
+
if [ -n "$PREV_TAG" ]; then
|
64
|
+
gh release create $GITHUB_REF_NAME \
|
65
|
+
--title "Release $GITHUB_REF_NAME" \
|
66
|
+
--generate-notes \
|
67
|
+
--notes-start-tag "$PREV_TAG"
|
68
|
+
else
|
69
|
+
# First release, no previous tag
|
70
|
+
gh release create $GITHUB_REF_NAME \
|
71
|
+
--title "Release $GITHUB_REF_NAME" \
|
72
|
+
--generate-notes
|
73
|
+
fi
|
74
|
+
|
75
|
+
# Add installation instructions to the beginning
|
76
|
+
gh release edit $GITHUB_REF_NAME \
|
77
|
+
--notes "$(echo "## Installation
|
78
|
+
\`\`\`bash
|
79
|
+
pip install mcpcap==$VERSION
|
80
|
+
\`\`\`
|
81
|
+
|
82
|
+
$(gh release view $GITHUB_REF_NAME --json body -q .body)")"
|
56
83
|
env:
|
57
84
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
58
|
-
with:
|
59
|
-
tag_name: ${{ github.ref }}
|
60
|
-
release_name: Release ${{ github.ref }}
|
61
|
-
draft: false
|
62
|
-
prerelease: false
|
63
|
-
body: |
|
64
|
-
## What's Changed
|
65
|
-
|
66
|
-
Release ${{ github.ref }} of mcpcap.
|
67
|
-
|
68
|
-
### Installation
|
69
|
-
```bash
|
70
|
-
pip install mcpcap==${{ github.ref_name }}
|
71
|
-
```
|
72
|
-
|
73
|
-
See [CHANGELOG.md](CHANGELOG.md) for detailed changes.
|
74
85
|
|
75
86
|
- name: Publish to PyPI
|
76
87
|
uses: pypa/gh-action-pypi-publish@release/v1
|
@@ -123,14 +123,6 @@ Analyzes DNS packets in a PCAP file.
|
|
123
123
|
|
124
124
|
**Returns**: Structured JSON with packet details and statistics
|
125
125
|
|
126
|
-
## Available Resources
|
127
|
-
|
128
|
-
### DNS Reference Materials
|
129
|
-
|
130
|
-
- `dns-record-types://reference`: DNS record types guide
|
131
|
-
- `dns-flags://reference`: DNS flags and response codes
|
132
|
-
- `suspicious-domains://indicators`: Security indicators for domains
|
133
|
-
|
134
126
|
## Available Prompts
|
135
127
|
|
136
128
|
### Analysis Prompts
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
28
28
|
commit_id: COMMIT_ID
|
29
29
|
__commit_id__: COMMIT_ID
|
30
30
|
|
31
|
-
__version__ = version = '0.3.
|
32
|
-
__version_tuple__ = version_tuple = (0, 3,
|
31
|
+
__version__ = version = '0.3.2'
|
32
|
+
__version_tuple__ = version_tuple = (0, 3, 2)
|
33
33
|
|
34
|
-
__commit_id__ = commit_id = '
|
34
|
+
__commit_id__ = commit_id = 'g1841e69fb'
|
@@ -3,7 +3,6 @@
|
|
3
3
|
from fastmcp import FastMCP
|
4
4
|
|
5
5
|
from ..modules.dns import DNSModule
|
6
|
-
from ..resources.references import setup_resources
|
7
6
|
from .config import Config
|
8
7
|
|
9
8
|
|
@@ -25,8 +24,7 @@ class MCPServer:
|
|
25
24
|
# Register tools
|
26
25
|
self._register_tools()
|
27
26
|
|
28
|
-
# Setup
|
29
|
-
setup_resources(self.mcp)
|
27
|
+
# Setup prompts
|
30
28
|
self.dns_module.setup_prompts(self.mcp)
|
31
29
|
|
32
30
|
def _register_tools(self) -> None:
|
@@ -1,10 +1,8 @@
|
|
1
|
-
.DS_Store
|
2
1
|
.gitignore
|
3
2
|
.readthedocs.yaml
|
4
3
|
LICENSE
|
5
4
|
README.md
|
6
5
|
pyproject.toml
|
7
|
-
requirements.txt
|
8
6
|
.github/FUNDING.yml
|
9
7
|
.github/workflows/release.yml
|
10
8
|
.github/workflows/test.yml
|
@@ -37,8 +35,6 @@ src/mcpcap/core/server.py
|
|
37
35
|
src/mcpcap/modules/__init__.py
|
38
36
|
src/mcpcap/modules/base.py
|
39
37
|
src/mcpcap/modules/dns.py
|
40
|
-
src/mcpcap/resources/__init__.py
|
41
|
-
src/mcpcap/resources/references.py
|
42
38
|
tests/__init__.py
|
43
39
|
tests/test_cli.py
|
44
40
|
tests/test_dns.py
|
mcpcap-0.3.0/.DS_Store
DELETED
Binary file
|
mcpcap-0.3.0/requirements.txt
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
annotated-types==0.7.0
|
2
|
-
anyio==4.10.0
|
3
|
-
attrs==25.3.0
|
4
|
-
Authlib==1.6.3
|
5
|
-
certifi==2025.8.3
|
6
|
-
cffi==2.0.0
|
7
|
-
charset-normalizer==3.4.3
|
8
|
-
click==8.2.1
|
9
|
-
cryptography==45.0.7
|
10
|
-
cyclopts==3.24.0
|
11
|
-
dnspython==2.8.0
|
12
|
-
docstring_parser==0.17.0
|
13
|
-
docutils==0.22
|
14
|
-
email-validator==2.3.0
|
15
|
-
exceptiongroup==1.3.0
|
16
|
-
fastmcp==2.12.2
|
17
|
-
h11==0.16.0
|
18
|
-
httpcore==1.0.9
|
19
|
-
httpx==0.28.1
|
20
|
-
httpx-sse==0.4.1
|
21
|
-
idna==3.10
|
22
|
-
isodate==0.7.2
|
23
|
-
jsonschema==4.25.1
|
24
|
-
jsonschema-path==0.3.4
|
25
|
-
jsonschema-specifications==2025.9.1
|
26
|
-
lazy-object-proxy==1.12.0
|
27
|
-
markdown-it-py==4.0.0
|
28
|
-
MarkupSafe==3.0.2
|
29
|
-
mcp==1.13.1
|
30
|
-
mdurl==0.1.2
|
31
|
-
more-itertools==10.8.0
|
32
|
-
openapi-core==0.19.5
|
33
|
-
openapi-pydantic==0.5.1
|
34
|
-
openapi-schema-validator==0.6.3
|
35
|
-
openapi-spec-validator==0.7.2
|
36
|
-
parse==1.20.2
|
37
|
-
pathable==0.4.4
|
38
|
-
pycparser==2.22
|
39
|
-
pydantic==2.11.7
|
40
|
-
pydantic-settings==2.10.1
|
41
|
-
pydantic_core==2.33.2
|
42
|
-
Pygments==2.19.2
|
43
|
-
pyperclip==1.9.0
|
44
|
-
python-dotenv==1.1.1
|
45
|
-
python-multipart==0.0.20
|
46
|
-
PyYAML==6.0.2
|
47
|
-
referencing==0.36.2
|
48
|
-
requests==2.32.5
|
49
|
-
rfc3339-validator==0.1.4
|
50
|
-
rich==14.1.0
|
51
|
-
rich-rst==1.3.1
|
52
|
-
rpds-py==0.27.1
|
53
|
-
scapy==2.6.1
|
54
|
-
six==1.17.0
|
55
|
-
sniffio==1.3.1
|
56
|
-
sse-starlette==3.0.2
|
57
|
-
starlette==0.47.3
|
58
|
-
typing-inspection==0.4.1
|
59
|
-
typing_extensions==4.15.0
|
60
|
-
urllib3==2.5.0
|
61
|
-
uvicorn==0.35.0
|
62
|
-
Werkzeug==3.1.1
|
@@ -1,90 +0,0 @@
|
|
1
|
-
"""Reference resources for DNS analysis."""
|
2
|
-
|
3
|
-
from fastmcp import FastMCP
|
4
|
-
|
5
|
-
|
6
|
-
def setup_resources(mcp: FastMCP) -> None:
|
7
|
-
"""Set up reference resources for the MCP server.
|
8
|
-
|
9
|
-
Args:
|
10
|
-
mcp: FastMCP server instance
|
11
|
-
"""
|
12
|
-
|
13
|
-
@mcp.resource("dns-record-types://reference")
|
14
|
-
def get_dns_record_types() -> str:
|
15
|
-
"""Reference guide for DNS record types"""
|
16
|
-
return """
|
17
|
-
# DNS Record Types Reference
|
18
|
-
|
19
|
-
## Common Record Types:
|
20
|
-
- **A (1)**: IPv4 address record
|
21
|
-
- **AAAA (28)**: IPv6 address record
|
22
|
-
- **CNAME (5)**: Canonical name (alias)
|
23
|
-
- **MX (15)**: Mail exchange record
|
24
|
-
- **NS (2)**: Name server record
|
25
|
-
- **PTR (12)**: Pointer record (reverse DNS)
|
26
|
-
- **SOA (6)**: Start of authority
|
27
|
-
- **TXT (16)**: Text record
|
28
|
-
- **SRV (33)**: Service record
|
29
|
-
|
30
|
-
## Security-Related Types:
|
31
|
-
- **DNSKEY (48)**: DNS public key
|
32
|
-
- **RRSIG (46)**: Resource record signature
|
33
|
-
- **DS (43)**: Delegation signer
|
34
|
-
- **NSEC (47)**: Next secure record
|
35
|
-
"""
|
36
|
-
|
37
|
-
@mcp.resource("dns-flags://reference")
|
38
|
-
def get_dns_flags_reference() -> str:
|
39
|
-
"""Reference guide for DNS flags and their meanings"""
|
40
|
-
return """
|
41
|
-
# DNS Flags Reference
|
42
|
-
|
43
|
-
## Header Flags:
|
44
|
-
- **QR**: Query/Response (0=Query, 1=Response)
|
45
|
-
- **AA**: Authoritative Answer
|
46
|
-
- **TC**: Truncated (message was truncated)
|
47
|
-
- **RD**: Recursion Desired
|
48
|
-
- **RA**: Recursion Available
|
49
|
-
- **Z**: Reserved (must be zero)
|
50
|
-
- **AD**: Authenticated Data
|
51
|
-
- **CD**: Checking Disabled
|
52
|
-
|
53
|
-
## Response Codes (RCODE):
|
54
|
-
- **0**: No error
|
55
|
-
- **1**: Format error
|
56
|
-
- **2**: Server failure
|
57
|
-
- **3**: Name error (domain doesn't exist)
|
58
|
-
- **4**: Not implemented
|
59
|
-
- **5**: Refused
|
60
|
-
"""
|
61
|
-
|
62
|
-
@mcp.resource("suspicious-domains://indicators")
|
63
|
-
def get_suspicious_domain_indicators() -> str:
|
64
|
-
"""Common indicators of suspicious or malicious domains"""
|
65
|
-
return """
|
66
|
-
# Suspicious Domain Indicators
|
67
|
-
|
68
|
-
## Common Patterns:
|
69
|
-
- Long random-looking subdomains
|
70
|
-
- Domains with excessive hyphens or numbers
|
71
|
-
- Recently registered domains
|
72
|
-
- Domains using punycode (internationalized domains)
|
73
|
-
- DGA (Domain Generation Algorithm) patterns
|
74
|
-
|
75
|
-
## Suspicious TLDs (often abused):
|
76
|
-
- .tk, .ml, .ga, .cf (free TLDs)
|
77
|
-
- .bit (blockchain domains)
|
78
|
-
- Newly introduced gTLDs
|
79
|
-
|
80
|
-
## Behavioral Indicators:
|
81
|
-
- High frequency of DNS queries
|
82
|
-
- Queries to non-existent domains (NXDOMAIN)
|
83
|
-
- Unusual query patterns or timing
|
84
|
-
- Queries for infrastructure domains (.arpa, .root-servers.net)
|
85
|
-
|
86
|
-
## DNS Tunneling Indicators:
|
87
|
-
- Unusually long DNS queries
|
88
|
-
- High volume of TXT record queries
|
89
|
-
- Queries with encoded data in subdomain names
|
90
|
-
"""
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|