Skip to main content
Glama
test_mcp_server_min.py1.11 kB
import eventwhisper.mcp.server as server def test_list_evtx_files_passthrough(monkeypatch): calls = {} def fake_list(directory, recursive=False): calls["directory"] = directory calls["recursive"] = recursive return ["a.evtx"] # Patch the IO impl the wrapper calls monkeypatch.setattr(server, "_list_evtx_files_impl", fake_list) out = server._list_evtx_files_tool(r"C:\logs", recursive=True) assert out == ["a.evtx"] assert calls == {"directory": r"C:\logs", "recursive": True} def test_filter_evtx_events_provider_only(monkeypatch): captured = {} def fake_get(**kwargs): captured.update(kwargs) return ["ok"] # Patch the IO impl the wrapper calls monkeypatch.setattr(server, "_get_events_from_evtx_impl", fake_get) out = server._get_events_from_evtx_tool(provider="Security.evtx") assert out == ["ok"] assert captured == {"provider": "Security.evtx"} def test_tools_registered(): assert server.mcp.get_tool("list_evtx_files") is not None assert server.mcp.get_tool("filter_evtx_events") is not None

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Hexastrike/EventWhisper'

If you have feedback or need assistance with the MCP directory API, please join our Discord server