mcpcap 0.5.6__tar.gz → 0.5.8__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.
Files changed (51) hide show
  1. {mcpcap-0.5.6 → mcpcap-0.5.8}/PKG-INFO +1 -1
  2. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap/_version.py +3 -3
  3. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap/cli.py +1 -3
  4. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap/core/config.py +1 -4
  5. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap/core/server.py +2 -9
  6. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap.egg-info/PKG-INFO +1 -1
  7. {mcpcap-0.5.6 → mcpcap-0.5.8}/tests/test_cli.py +0 -3
  8. {mcpcap-0.5.6 → mcpcap-0.5.8}/tests/test_dhcp.py +2 -5
  9. {mcpcap-0.5.6 → mcpcap-0.5.8}/tests/test_dns.py +2 -4
  10. {mcpcap-0.5.6 → mcpcap-0.5.8}/.github/FUNDING.yml +0 -0
  11. {mcpcap-0.5.6 → mcpcap-0.5.8}/.github/workflows/release.yml +0 -0
  12. {mcpcap-0.5.6 → mcpcap-0.5.8}/.github/workflows/test.yml +0 -0
  13. {mcpcap-0.5.6 → mcpcap-0.5.8}/.gitignore +0 -0
  14. {mcpcap-0.5.6 → mcpcap-0.5.8}/.readthedocs.yaml +0 -0
  15. {mcpcap-0.5.6 → mcpcap-0.5.8}/CONTRIBUTING.md +0 -0
  16. {mcpcap-0.5.6 → mcpcap-0.5.8}/LICENSE +0 -0
  17. {mcpcap-0.5.6 → mcpcap-0.5.8}/README.md +0 -0
  18. {mcpcap-0.5.6 → mcpcap-0.5.8}/docs/Makefile +0 -0
  19. {mcpcap-0.5.6 → mcpcap-0.5.8}/docs/source/_static/.gitkeep +0 -0
  20. {mcpcap-0.5.6 → mcpcap-0.5.8}/docs/source/api/cli.rst +0 -0
  21. {mcpcap-0.5.6 → mcpcap-0.5.8}/docs/source/api/core.rst +0 -0
  22. {mcpcap-0.5.6 → mcpcap-0.5.8}/docs/source/api/modules.rst +0 -0
  23. {mcpcap-0.5.6 → mcpcap-0.5.8}/docs/source/conf.py +0 -0
  24. {mcpcap-0.5.6 → mcpcap-0.5.8}/docs/source/developer/contributing.md +0 -0
  25. {mcpcap-0.5.6 → mcpcap-0.5.8}/docs/source/developer/module-creation-tutorial.md +0 -0
  26. {mcpcap-0.5.6 → mcpcap-0.5.8}/docs/source/index.rst +0 -0
  27. {mcpcap-0.5.6 → mcpcap-0.5.8}/docs/source/user-guide/analysis-guides.md +0 -0
  28. {mcpcap-0.5.6 → mcpcap-0.5.8}/docs/source/user-guide/installation.md +0 -0
  29. {mcpcap-0.5.6 → mcpcap-0.5.8}/docs/source/user-guide/mcp-integration.md +0 -0
  30. {mcpcap-0.5.6 → mcpcap-0.5.8}/docs/source/user-guide/quickstart.md +0 -0
  31. {mcpcap-0.5.6 → mcpcap-0.5.8}/examples/README.md +0 -0
  32. {mcpcap-0.5.6 → mcpcap-0.5.8}/examples/dhcp.pcap +0 -0
  33. {mcpcap-0.5.6 → mcpcap-0.5.8}/examples/dns.pcap +0 -0
  34. {mcpcap-0.5.6 → mcpcap-0.5.8}/pyproject.toml +0 -0
  35. {mcpcap-0.5.6 → mcpcap-0.5.8}/readme-assets/mcpcap-logo.png +0 -0
  36. {mcpcap-0.5.6 → mcpcap-0.5.8}/server.json +0 -0
  37. {mcpcap-0.5.6 → mcpcap-0.5.8}/setup.cfg +0 -0
  38. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap/__init__.py +0 -0
  39. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap/core/__init__.py +0 -0
  40. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap/modules/__init__.py +0 -0
  41. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap/modules/base.py +0 -0
  42. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap/modules/dhcp.py +0 -0
  43. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap/modules/dns.py +0 -0
  44. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap/modules/icmp.py +0 -0
  45. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap.egg-info/SOURCES.txt +0 -0
  46. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap.egg-info/dependency_links.txt +0 -0
  47. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap.egg-info/entry_points.txt +0 -0
  48. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap.egg-info/requires.txt +0 -0
  49. {mcpcap-0.5.6 → mcpcap-0.5.8}/src/mcpcap.egg-info/top_level.txt +0 -0
  50. {mcpcap-0.5.6 → mcpcap-0.5.8}/tests/__init__.py +0 -0
  51. {mcpcap-0.5.6 → mcpcap-0.5.8}/tests/test_modules/test_icmp.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcpcap
3
- Version: 0.5.6
3
+ Version: 0.5.8
4
4
  Summary: A modular Python MCP Server for analyzing PCAP files
5
5
  Author: mcpcap contributors
6
6
  License: MIT License
@@ -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.5.6'
32
- __version_tuple__ = version_tuple = (0, 5, 6)
31
+ __version__ = version = '0.5.8'
32
+ __version_tuple__ = version_tuple = (0, 5, 8)
33
33
 
34
- __commit_id__ = commit_id = 'gff58bfaa5'
34
+ __commit_id__ = commit_id = 'gc6e7a1cea'
@@ -40,14 +40,12 @@ def main():
40
40
  args = parser.parse_args()
41
41
 
42
42
  try:
43
- # Parse modules and automatically set protocols to match
43
+ # Parse modules
44
44
  modules = args.modules.split(",") if args.modules else ["dns", "dhcp", "icmp"]
45
- protocols = modules # Protocols automatically match loaded modules
46
45
 
47
46
  # Initialize configuration
48
47
  config = Config(
49
48
  modules=modules,
50
- protocols=protocols,
51
49
  max_packets=args.max_packets,
52
50
  )
53
51
 
@@ -7,18 +7,15 @@ class Config:
7
7
  def __init__(
8
8
  self,
9
9
  modules: list[str] | None = None,
10
- protocols: list[str] | None = None,
11
10
  max_packets: int | None = None,
12
11
  ):
13
12
  """Initialize configuration.
14
13
 
15
14
  Args:
16
15
  modules: List of modules to load
17
- protocols: List of protocols to analyze
18
16
  max_packets: Maximum number of packets to analyze per file
19
17
  """
20
- self.modules = modules or ["dns", "dhcp"]
21
- self.protocols = protocols or ["dns", "dhcp"]
18
+ self.modules = modules or ["dns", "dhcp", "icmp"]
22
19
  self.max_packets = max_packets
23
20
 
24
21
  self._validate_configuration()
@@ -18,6 +18,7 @@ class MCPServer:
18
18
  config: Configuration instance
19
19
  """
20
20
  self.config = config
21
+
21
22
  self.mcp = FastMCP("mcpcap")
22
23
 
23
24
  # Initialize modules based on configuration
@@ -49,13 +50,5 @@ class MCPServer:
49
50
 
50
51
  def run(self) -> None:
51
52
  """Start the MCP server."""
52
- import sys
53
-
54
- # Log to stderr to avoid breaking MCP JSON-RPC protocol
55
- enabled_modules = ", ".join(self.config.modules)
56
- print(
57
- f"Starting mcpcap MCP server with modules: {enabled_modules}",
58
- file=sys.stderr,
59
- )
60
53
 
61
- self.mcp.run()
54
+ self.mcp.run(show_banner=False)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcpcap
3
- Version: 0.5.6
3
+ Version: 0.5.8
4
4
  Summary: A modular Python MCP Server for analyzing PCAP files
5
5
  Author: mcpcap contributors
6
6
  License: MIT License
@@ -26,7 +26,6 @@ class TestCLI:
26
26
  # Verify behavior
27
27
  mock_config.assert_called_once_with(
28
28
  modules=["dns", "dhcp", "icmp"],
29
- protocols=["dns", "dhcp", "icmp"],
30
29
  max_packets=None,
31
30
  )
32
31
  mock_server.assert_called_once_with(config_instance)
@@ -110,7 +109,6 @@ class TestCLI:
110
109
  # Verify DHCP configuration
111
110
  mock_config.assert_called_once_with(
112
111
  modules=["dhcp"],
113
- protocols=["dhcp"],
114
112
  max_packets=None,
115
113
  )
116
114
  assert result == 0
@@ -133,7 +131,6 @@ class TestCLI:
133
131
  # Verify multi-module configuration
134
132
  mock_config.assert_called_once_with(
135
133
  modules=["dns", "dhcp"],
136
- protocols=["dns", "dhcp"],
137
134
  max_packets=None,
138
135
  )
139
136
  assert result == 0
@@ -315,14 +315,11 @@ class TestDHCPConfig:
315
315
 
316
316
  def test_config_with_dhcp_module(self):
317
317
  """Test configuration with DHCP module specified."""
318
- config = Config(modules=["dhcp"], protocols=["dhcp"])
318
+ config = Config(modules=["dhcp"])
319
319
  assert "dhcp" in config.modules
320
- assert "dhcp" in config.protocols
321
320
 
322
321
  def test_config_with_multiple_modules(self):
323
322
  """Test configuration with multiple modules including DHCP."""
324
- config = Config(modules=["dns", "dhcp"], protocols=["dns", "dhcp"])
323
+ config = Config(modules=["dns", "dhcp"])
325
324
  assert "dns" in config.modules
326
325
  assert "dhcp" in config.modules
327
- assert "dns" in config.protocols
328
- assert "dhcp" in config.protocols
@@ -35,8 +35,7 @@ class TestConfig:
35
35
  def test_config_validation_success(self):
36
36
  """Test successful config validation."""
37
37
  config = Config()
38
- assert config.modules == ["dns", "dhcp"]
39
- assert config.protocols == ["dns", "dhcp"]
38
+ assert config.modules == ["dns", "dhcp", "icmp"]
40
39
 
41
40
  def test_config_validation_nonexistent_path(self):
42
41
  """Test config validation with invalid max_packets."""
@@ -50,9 +49,8 @@ class TestConfig:
50
49
 
51
50
  def test_custom_modules(self):
52
51
  """Test configuration with custom modules."""
53
- config = Config(modules=["dns"], protocols=["dns"])
52
+ config = Config(modules=["dns"])
54
53
  assert config.modules == ["dns"]
55
- assert config.protocols == ["dns"]
56
54
 
57
55
  def test_max_packets_setting(self):
58
56
  """Test max_packets configuration."""
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