ProcmonMCPのロゴ

ProcmonMCP

コミュニティ
JameZUK

An MCP server for procmon

公開者JameZUK
リポジトリProcmonMCP
言語Python
フォーク
5
スター
54
利用可能なツール
0
通信方式stdio, streamable-http
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    ProcmonMCPは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには54件のスターと5件のフォークがあります。

ProcmonMCP

ProcmonMCP is a Model Context Protocol (MCP) server that allows LLMs to autonomously analyse Process Monitor (Procmon) XML log files. It exposes a comprehensive set of analysis tools to any MCP-compatible client, including Claude Code, Claude Desktop, Cline, and others.

Overview

Process Monitor captures detailed system activity — file access, registry operations, network connections, process creation, and more. ProcmonMCP parses these XML logs into an optimised in-memory representation and exposes them as MCP tools, enabling an LLM to investigate system behaviour without manual data wrangling.

Key capabilities:

  • Load files at runtime — no need to restart the server to analyse a different capture
  • Parsed-capture cache — reloading an unchanged file is near-instant (parsing is skipped)
  • String interning for reduced memory footprint on large logs
  • Indexed lookups by process name, operation, PID, and file path for fast filtering
  • Multiple transport protocols — stdio (recommended), Streamable HTTP, and SSE (deprecated)
  • Progress feedback during file loading via MCP notifications

This project was inspired by the approach taken in GhidraMCP.

Security Warning

Process Monitor logs can contain extremely sensitive system information (keystrokes, passwords in command lines, file contents, network traffic details, etc.).

  • This tool loads any file path that the user running the script has read permissions for. There is no directory sandboxing.
  • Only run this server in trusted environments.
  • Never run this server with Procmon logs captured from systems containing sensitive production or personal data unless you fully understand and accept the risks.
  • Review the logs you intend to load for sensitive information before using this tool.

Installation

Current release: v0.5.0, which requires MCP SDK v2 (mcp[cli]>=2.0.0). Earlier versions are listed on the releases page; notable changes are recorded in CHANGELOG.md.

Prerequisites

  • Python 3.10 or newer (required by the MCP SDK; developed and tested with 3.10-3.13)
  • pip (Python package installer)

Install from source

bash
git clone https://github.com/JameZUK/ProcmonMCP
cd ProcmonMCP
pip install -r requirements.txt

That tracks the latest state of the default branch. To pin the current release instead:

bash
git clone --branch v0.5.0 --depth 1 https://github.com/JameZUK/ProcmonMCP
cd ProcmonMCP
pip install ".[all]"

Or install the package itself (provides a procmon-mcp console script):

bash
pip install .            # core only (mcp[cli])
pip install ".[all]"     # core + optional lxml and psutil
pip install -e ".[dev]"  # editable install with test tooling

Dependencies

PackageRequiredPurpose
mcp[cli]>=2.0.0YesMCP SDK with CLI tools and Streamable HTTP support
lxml>=4.9.0RecommendedFaster XML parsing (falls back to stdlib ElementTree if absent)
psutil>=5.9.0OptionalMemory usage reporting after file loading
google-re2OptionalLinear-time, ReDoS-safe engine for user filter regexes (pip install ".[re2]"; falls back to stdlib re)

Install all at once:

bash
pip install "mcp[cli]>=2.0.0" lxml psutil

MCP SDK v2: the SDK renamed FastMCP to MCPServer and moved it to mcp.server.mcpserver in v2. ProcmonMCP targets v2, and still runs against mcp<2 via a compatibility fallback. If you previously installed with an unpinned mcp[cli] and saw "the MCP SDK could not be loaded", upgrade with pip install --upgrade "mcp[cli]>=2".

Quick Start with Claude Code

The recommended way to use ProcmonMCP is via stdio transport with Claude Code. The server starts without any file loaded — you (or the LLM) can then use the load_file tool to open a Procmon capture.

Option 1: Add via Claude Code CLI

bash
# Add ProcmonMCP as a stdio server (user-wide)
claude mcp add procmon --scope user -- python -m procmon_mcp

# Or with a file pre-loaded at startup
claude mcp add procmon --scope user -- python -m procmon_mcp --input-file /path/to/capture.xml.gz

# Or scoped to the current project only
claude mcp add procmon --scope project -- python -m procmon_mcp

Option 2: Add via JSON

bash
claude mcp add-json procmon '{
  "type": "stdio",
  "command": "python",
  "args": ["-m", "procmon_mcp"]
}'

Option 3: Edit configuration files directly

Claude Code reads MCP server configuration from these locations:

ScopeFileDescription
Project (shared, version-controlled).mcp.json in project rootShared with the team
Project (personal).claude/settings.local.jsonYour local overrides
User (global)~/.claude.jsonAvailable across all projects

Example .mcp.json for a shared project:

json
{
  "mcpServers": {
    "procmon": {
      "type": "stdio",
      "command": "python",
      "args": ["-m", "procmon_mcp"]
    }
  }
}

Example with a pre-loaded file and options:

json
{
  "mcpServers": {
    "procmon": {
      "type": "stdio",
      "command": "python",
      "args": [
        "-m", "procmon_mcp",
        "--input-file", "/path/to/capture.xml.gz",
        "--no-stack-traces"
      ]
    }
  }
}

Option 4: Streamable HTTP transport

For network access or multi-client scenarios, use Streamable HTTP:

bash
# Add as an HTTP server (start the server separately first)
claude mcp add --transport http procmon http://127.0.0.1:8081/mcp

Then start the server:

bash
python -m procmon_mcp --transport streamable-http --mcp-port 8081

Verify the connection

Once configured, verify that Claude Code can see ProcmonMCP:

bash
claude mcp list

Inside a Claude Code session, you can also type /mcp to check the status of connected servers.

Usage

Typical workflow

  1. Start the server (Claude Code does this automatically for stdio servers)
  2. Check status: The LLM calls get_status to see if a file is loaded
  3. Load a file: The LLM calls load_file with a path to a Procmon XML capture
  4. Analyse: The LLM uses the analysis tools to investigate the log data

Command-line arguments

ArgumentDefaultDescription
--input-file <path>(none)Pre-load a Procmon XML file at startup. If omitted, use load_file from the MCP client.
--transport <mode>stdioTransport protocol: stdio, streamable-http, or sse (deprecated).
--mcp-host <ip>127.0.0.1Host address (HTTP transports only).
--mcp-port <port>8081Port number (HTTP transports only).
--no-stack-tracesoffSkip loading stack traces to save memory.
--no-extra-dataoffSkip loading unknown/extra event fields to save memory.
--no-cacheoffBypass the parsed-capture cache (always re-parse, and refresh the cache).
--clear-cacheoffRemove all cached parsed captures, then exit.
--debugoffEnable verbose debug logging.
--log-file <path>(console)Write logs to a file instead of the console.
--profileoffEnable cProfile profiling (for development).

Examples

Start with stdio (no file pre-loaded — use load_file from the client):

bash
python -m procmon_mcp

Pre-load a compressed XML file:

bash
python -m procmon_mcp --input-file /path/to/capture.xml.gz

Start with Streamable HTTP on a custom port:

bash
python -m procmon_mcp --transport streamable-http --mcp-port 9000

Skip stack traces for a very large file:

bash
python -m procmon_mcp --input-file /path/to/huge_capture.xml --no-stack-traces --no-extra-data

Transport Protocols

TransportUse caseStatus
stdioLocal use with Claude Code, Claude Desktop, etc.Recommended
streamable-httpNetwork access, multiple clients, remote deploymentSupported
sseLegacy MCP clients that do not yet support Streamable HTTPDeprecated (MCP spec 2025-03-26)

stdio (recommended)

The simplest and most reliable transport. Claude Code spawns the server as a child process and communicates over stdin/stdout. No network configuration required.

Streamable HTTP

Uses a single HTTP endpoint (/mcp) for all communication. Supports session management, optional SSE streaming for long-running operations, and is designed for scalability.

bash
python -m procmon_mcp --transport streamable-http --mcp-host 0.0.0.0 --mcp-port 8081

The server will be available at http://<host>:<port>/mcp.

SSE (deprecated)

Deprecated since MCP specification 2025-03-26. SSE is retained for backwards compatibility but will be removed in a future release. Please migrate to streamable-http or stdio.

bash
python -m procmon_mcp --transport sse --mcp-port 8081

User Configuration

ProcmonMCP stores user preferences in ~/.procmonmcp/config.json. This file is created automatically and remembers:

  • The last loaded file path (shown as a hint in get_status when no file is loaded)
  • Loading preferences (no_stack_traces, no_extra_data)

No API keys or authentication tokens are required — ProcmonMCP is a purely local analysis tool.

Parsed-capture cache

Parsing a large capture is expensive (tens of seconds to minutes). After a successful parse, ProcmonMCP serializes the optimised in-memory representation (events, interners, indices, process tables) to ~/.procmonmcp/cache/, keyed on the source file's path, size, and modification time plus the load options. Reloading the same unchanged file is then served from the cache and is near-instant — in practice a 20s parse drops to well under a second.

  • The cache is invalidated automatically when the file changes (mtime/size) or when the cache format version changes. Different no_stack_traces/no_extra_data options are cached separately.
  • Bypass it with --no-cache (CLI) or no_cache: true (the load_file tool); the from_cache field in the load response indicates whether the cache was used.
  • Clear it with --clear-cache (CLI) or the clear_cache tool. The cache is size-bounded with LRU eviction (default 5 GiB; override with the PROCMONMCP_CACHE_MAX_BYTES environment variable).
  • Security: cache files are serialized with Python's pickle and are read back only from your user-owned ~/.procmonmcp/cache directory (only this tool's own output is ever deserialized). Do not point the cache at a location other users can write to.

Available MCP Tools

Lifecycle Tools

ToolDescription
get_status()Returns the current server state — whether a file is loaded, loading progress, memory usage, and available actions. Call this first.
load_file(file_path, no_stack_traces?, no_extra_data?, no_cache?)Loads a Procmon XML file (.xml, .gz, .bz2, .xz) for analysis. Uses the parsed-capture cache for near-instant reloads (from_cache in the response says whether it was used). Set no_cache: true to bypass the cache. Provides progress feedback. Replaces any previously loaded data.
close_file()Closes (unloads) the currently loaded capture and frees its memory. Analysis tools are unavailable until another file is opened with load_file. Does not remove the on-disk cache.
clear_cache()Removes all on-disk parsed-capture caches. Reclaims disk space and forces a clean re-parse on the next load. Does not affect currently loaded data.

Data Retrieval Tools

ToolDescription
get_loaded_file_summary()Returns a detailed summary of the loaded file — filename, counts, compression, index stats, interner stats, and selective loading flags.
get_metadata()Returns basic metadata (filename, type, event/process counts).
list_processes()Lists unique processes (PID, name, image path, parent PID) from the process list section.
get_process_details(pid)Returns detailed properties for a specific process by PID.
query_events(...)Queries events with flexible filters — by process, PID (filter_pid), operation, result, path (contains/regex), detail (regex), timestamp range, and stack module path. Returns event summaries with index.
get_event_details(event_index)Returns all properties for a specific event by its index.
get_event_stack_trace(event_index)Returns the call stack for a specific event (module path, location, address).

Analysis Tools

ToolDescription
count_events_by_process()Counts events per process name.
summarize_operations_by_process(process_name_filter)Counts operations for a specific process.
get_timing_statistics(group_by)Calculates duration statistics grouped by process or operation.
get_process_lifetime(pid)Finds the Process Create and Process Exit timestamps for a given PID.
find_file_access(path_contains, limit?)Finds file system events matching a path substring (case-insensitive).
find_network_connections(process_name)Returns enriched records for the remote endpoints a process accessed: endpoint, host/ip/hostname/port, operations, inferred directions (connect/send/receive), results, event count, and first/last-seen timestamps — ranked by count.
list_network_connections(limit?)Capture-wide network triage: one enriched record per (process, PID, endpoint) across all processes, ranked by event count.
get_network_top_talkers(limit?)Ranks unique remote endpoints across the whole capture by event count, with the count of distinct processes (and their names) that touched each.

Export Tools

ToolDescription
export_query_results(...)Exports filtered events to CSV or JSON file. Uses the same filters as query_events.

MCP Clients

ProcmonMCP works with any MCP-compatible client. Below are setup instructions for popular clients.

Claude Code (recommended)

See the Quick Start with Claude Code section above.

Claude Desktop

Add the following to your Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
json
{
  "mcpServers": {
    "procmon": {
      "command": "python",
      "args": ["-m", "procmon_mcp"]
    }
  }
}

Cline

For Cline with Streamable HTTP transport, first start the server:

bash
python -m procmon_mcp --transport streamable-http --mcp-port 8081

Then in Cline, select MCP Servers and add:

  • Server Name: ProcmonMCP
  • Server URL: http://127.0.0.1:8081/mcp

Example LLM Prompts for Malware Analysis

(Assuming a Procmon XML file is loaded)

Initial Triage

  • "Get the summary of the loaded file."
  • "List the unique processes found in the log."
  • "Count the events per process." (Identify high-activity processes)
  • "Calculate timing statistics grouped by process." (Identify long-duration events)

Investigating a Suspicious Process

  • "Get details for process PID 4568." (Check command line, parent PID, image path)
  • "Summarise operations for process suspicious.exe."
  • "Query events where filter_process is suspicious.exe and filter_operation is RegSetValue, limit 10."
  • "Find network connections for process suspicious.exe." (Enriched: directions, results, counts, first/last-seen)
  • "List network connections across the whole capture." (Capture-wide triage, busiest first)
  • "Show the network top talkers." (Rank remote endpoints by event count)
  • "Find file access containing temp\\suspicious_data, limit 50."

Looking for Persistence

  • "Query events where filter_operation is RegSetValue and filter_path_contains is CurrentVersion\\Run, limit 20."
  • "Query events where filter_operation is CreateFile and filter_path_contains is StartUp, limit 10."

Troubleshooting Errors

  • "Query events where filter_result is ACCESS DENIED, limit 10."
  • "Query events where filter_result is NAME NOT FOUND, limit 10."
  • "Get details for event 987."
  • "Get stack trace for event 987."

Exporting Data

  • "Export query results to suspicious_reg_writes.csv where filter_process is suspicious.exe and filter_operation contains RegSet."
  • "Export query results to network_activity.json in json format."

Performance and Indexing

ProcmonMCP builds four indices during file loading for fast filtered lookups:

IndexUsed byComplexity
Process name (interned ID)query_events, count_events_by_processO(1) lookup
Operation (interned ID)query_events, summarize_operations_by_processO(1) lookup
PIDquery_events (filter_pid), get_process_lifetimeO(1) lookup with set intersection
File path (interned ID)find_file_accessO(unique_paths) substring scan

For filters not backed by an index (e.g., regex, path contains, stack module path), ProcmonMCP falls back to a linear scan of all events. Use indexed filters first to narrow results, then apply more expensive filters.

Limitations

  • Memory usage: Whilst optimised with string interning, loading extremely large XML files (millions of events with stack traces) can consume significant RAM. Use --no-stack-traces and --no-extra-data for very large files.
  • Loading time: Parsing and optimising large XML files takes time, particularly compressed ones. Progress is reported during loading. Reloading an unchanged file is near-instant thanks to the parsed-capture cache; only the first parse pays the full cost.
  • XML structure: Relies on the standard Procmon XML export structure. Malformed or non-standard XML will likely cause parsing errors.
  • Non-ASCII names: Procmon's XML export double-encodes non-ASCII process/path names (e.g. Japanese filenames). ProcmonMCP detects and repairs this on load so names are readable and matchable by their true value; if a process name is still awkward to type exactly, filter by filter_pid instead.
  • Stack traces: Stack trace quality depends on what Procmon resolved and included in the XML export. Requires running Procmon with symbols configured correctly.
  • Single file at a time: Only one file can be loaded at any given time. Loading a new file replaces the previous data.

Changelog

Notable changes are recorded in CHANGELOG.md.

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues on GitHub.

License

This project is licensed under the MIT License — see the LICENSE file for details.

インストール

TypingMind
{
  "mcpServers": {
    "procmonmcp": {
      "command": "procmon-mcp",
      "args": []
    }
  }
}

ProcmonMCPのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度ProcmonMCPに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 お使いのデバイス上でMCPをローカル実行することも、リモートMCPサーバーのURLに接続することもできます。

方法1:ローカルコネクタを使用

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

ProcmonMCPをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. ProcmonMCPのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "procmonmcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてProcmonMCPのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. ProcmonMCPのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
ProcmonMCPを使ってこのタスクを手伝ってもらえますか?
ProcmonMCP
はい、読みました。
ProcmonMCPで調べた結果をお伝えします。

方法2:MCPサーバーのURLを追加

ProcmonMCPがすでにリモートでホストされている場合や、チームの複数のユーザーで1つのコネクタを共有したい場合は、この方法を使います。

1

MCPコネクタを開く

TypingMindで「プラグイン」に移動し、「MCPコネクタ」を開いて「URLを追加」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 「プラグイン」に移動してください。
  3. 「MCPコネクタ」を開いてください。
  4. 「URLを追加」をクリックします。
TypingMindの「カスタムMCPサーバーURLを追加」フォーム
2

サーバーURLを貼り付け

「サーバーURL」欄にプロバイダーから提供されたMCPサーバーのURLを入力してください。サーバーで必要とされる場合は、接続名、説明、アイコン、カスタムHTTPヘッダー、OAuthクライアント設定を追加してください。

  1. 「サーバーURL」欄にプロバイダーから提供されたMCPサーバーのURLを貼り付けてください。
  2. ProcmonMCPの接続名を入力してください。
  3. 接続を識別しやすくするには、説明とアイコンを追加してください。
  4. サーバーで認証が必要な場合は、カスタムHTTPヘッダーまたはOAuthクライアントの詳細情報を追加してください。
3

接続を作成

「接続を作成」をクリックし、プラグイン一覧に戻って、新しいMCP接続が有効になっていることを確認してください。

  1. 「接続を作成」をクリックします。
  2. MCPコネクタの一覧に戻ってください。
  3. ProcmonMCPの接続が「有効」と表示されていることを確認してください。
  4. 接続がすぐに表示されない場合は、プラグイン一覧を更新してください。
4

再接続せずにモデルを切り替え

お好みのモデルでチャットを開始し、「プラグイン」でProcmonMCPのツールを有効にしてください。必要に応じて別のモデルに切り替えられます。MCP接続は、TypingMindのワークスペースで引き続き利用できます。

  1. TypingMindで新しいチャットを開始してください。
  2. 使用するAIモデルを選択してください。
  3. 「プラグイン」でProcmonMCPのツールを有効にしてください。
  4. 必要に応じて、ツールを使うようモデルに依頼してください。
  5. 別のAIモデルに切り替えて、同じMCP接続を再利用してください。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
ProcmonMCPを使ってこのタスクを手伝ってもらえますか?
ProcmonMCP
はい、読みました。
ProcmonMCPで調べた結果をお伝えします。

よくある質問

ProcmonMCP MCPサーバーは何に使いますか?

ProcmonMCPは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでProcmonMCP MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでProcmonMCPを利用できます。

TypingMindでProcmonMCP MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。ProcmonMCPを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

ProcmonMCP MCPをTypingMindに接続するにはどうすればよいですか?

ProcmonMCPは、ローカルMCPコネクタを使うか、リモートMCPサーバーのURLを追加することでTypingMindに接続できます。サーバーがデバイス上のファイル、アプリ、プライベートリソースにアクセスする必要がある場合はローカルコネクタを、MCPサーバーがリモートでホストされている場合はサーバーURLを使用してください。

TypingMindでProcmonMCP MCPのどのようなツールを利用できますか?

ProcmonMCPはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

ProcmonMCP MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。ProcmonMCPで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇