Skip to main content
Glama
Poker Task Management MCP

Poker Task Management MCP

by Hirao-Y

POKER-MCP

点減衰核法の遮蔽計算コード POKER(光子。POKER 2.3.0 からは中性子も)を、Claude などの AI アプリから 使えるようにする MCP(Model Context Protocol)サーバです。

An MCP server that lets AI applications build, validate and run inputs for POKER, a point-kernel shielding code for gamma rays (and, from POKER 2.3.0, neutrons), and read back the computed doses.

  • AI アプリへの自然言語の指示から、POKER の入力(YAML)を作成・編集・検証し、計算を実行して線量を返します

  • 線量はすべて POKER の出力ファイル(.summary・.dose)から抽出します。AI が数値を作ることはありません

  • FreeCAD のモデルから入力を生成し、CAD 形状の上で透視線を追跡して計算できます(CAD 連携)

最新版

1.16.0

動作環境

Windows、Linux(macOS も同じ作りで動く見込み。未確認)

ツール数

45(非同期ジョブを有効にすると 48)

通信

標準入出力(poker-mcp)、HTTP(poker-mcp-http)

変更履歴

CHANGELOG.md

必要なもの

入手先

備考

POKER 本体

pointkernel.com(v2.1.5 以降。中性子線源は v2.3.0 以降)

Windows 版(GUI 付き)と、v2.3.0 からは計算部(poker_cui)の Linux 版。フォーム登録でダウンロードリンクが届く

Node.js

18 以降

MCP クライアント

Claude Desktop など

HTTP 版は Claude Code、または Claude Desktop + mcp-remote

FreeCAD

freecad.org(1.0 以降)

CAD 連携を使う場合だけ

Related MCP server: Task Planner MCP Server

セットアップ(Claude Desktop)

設定ファイル(Windows では %APPDATA%\Claude\claude_desktop_config.json)に追記し、 Claude Desktop を再起動します。

{
  "mcpServers": {
    "poker-mcp": {
      "command": "npx",
      "args": ["poker-mcp"],
      "env": {
        "POKER_MCP_HOME": "C:\\Users\\<username>\\poker_mcp_workspace",
        "POKER_INSTALL_PATH": "C:/Poker"
      }
    }
  }
}
  • cwd は指定しないでください。作業場所は POKER_MCP_HOME で決まります

  • 版を固定するときは "args": ["poker-mcp@1.10.0"] のように書きます

動作確認として、Claude に次のように頼んでみてください。

厚さ 30 cm のコンクリート壁の向こう 1 m の位置で、Co-60 点線源 1 GBq による線量を計算してください

主な環境変数

変数

既定

内容

POKER_MCP_HOME

~/.poker-mcp

作業ファイル(YAML、バックアップ、ログ)の置き場所

POKER_INSTALL_PATH

Windows: C:/Poker、Linux・macOS: PATH 上の poker_cui があるフォルダ

POKER のインストール先(lib の核種データ、POKER.exe)

POKER_CUI_PATH

PATH 上の poker_cui

計算部の実行ファイルを直接指定する

FREECAD_PATH

自動探索

FreeCAD の場所(CAD 連携)

POKER_MCP_ASYNC

無効

1 で計算の非同期実行を有効にする

POKER_MCP_GUI

有効

0 で poker_openGui を外す(リモート公開時)

EQUIL_CUI_PATH

POKER_INSTALL_PATH の EquilibriumSheet_CUI.exe(Linux・macOS は EquilibriumSheet_CUI)

equil_* ツールが使う EquilibriumSheet のコマンドライン版

Linux で使う(v1.14.0)

POKER 2.3.0 の計算部の Linux 版(poker230_linux_x86_64.zip)を Linux の上で展開し、そのフォルダを PATH に加えます (Windows で展開してから写した場合は、chmod +x poker_cui EquilibriumSheet_CUI で実行権限を付けてください)。 POKER_INSTALL_PATH を書かなければ、PATH 上の poker_cui があるフォルダ(lib を含む)を使います。

unzip poker230_linux_x86_64.zip -d ~/
export PATH=$PATH:~/poker230_linux_x86_64

Claude Code では次のように登録します(Claude Desktop の Linux 版はありません)。

claude mcp add --transport stdio --env POKER_MCP_HOME=$HOME/poker_mcp_workspace poker-mcp -- npx -y poker-mcp

OpenAI Codex では ~/.codex/config.toml に書きます。

[mcp_servers.poker-mcp]
command = "npx"
args = ["-y", "poker-mcp"]
env = { POKER_MCP_HOME = "/home/<username>/poker_mcp_workspace" }

equil_*(崩壊系列・放射平衡)は、同じフォルダの EquilibriumSheet_CUI(Linux 版。.NET のインストール不要)を使います。 Linux で使えないものは poker_openGui(POKER.exe は Windows 専用。自動的に外れます)だけです。

Web GUI(poker-gui)

POKER の GUI をブラウザで使う Web GUI(poker-gui)は、POKER の Linux 版(2.3.3 以降の zip)に同梱しています(./poker-gui。Node.js のインストールは不要)。 MCP のツールではないので、poker-mcp(このリポジトリと npm のパッケージ)には含めていません。

HTTP 版(別の機械から使う)の設定と、非同期実行・リモート公開の詳細は ADMIN_GUIDE(サーバ側)と INTEGRATION_GUIDE(クライアント側)を参照してください。

使い方

Claude に自然言語で指示すると、必要なツールが呼ばれます。

「幅 100 cm、高さ 200 cm、厚さ 30 cm のコンクリート遮蔽壁を作ってください」
「Cs-137 線源 1 TBq を原点に置いてください」        → Ba-137m は自動で追加
「壁から 120 cm の位置に 2 次元の検出器グリッドを置いてください」
「計算して、線量分布を見せてください」

編集は「提案」としていったん保留され、poker_applyChanges でまとめて確定します(自動バックアップ付き)。 入力はスキーマ・要求内容・ファイル生成の各段階で検証され、材料名は POKER のライブラリの正式名に限られます。

CAD 連携

FreeCAD のソリッドに材質(PokerMaterial)や線源・検出器をカスタムプロパティで設定しておけば、 3 回の呼び出しで計算まで進みます。CSG で表せない形状(曲がった配管、フィレットなど)も扱えます。

poker_generateInput({ fcstd: "C:/path/to/model.FCStd" })    // 属性から YAML を生成
poker_generatePaths({ fcstd: "C:/path/to/model.FCStd" })    // 透視線を追跡して .paths を生成
poker_executeCalculation({ yaml_file: "poker.yaml", path_input: "poker.paths" })

手順と実例は CAD_QUICKSTART、詳細は CAD_RAYTRACE、経路ファイルの書式は PATHS_FORMAT を参照してください。

ツール一覧

分類

ツール

立体

poker_proposeBody poker_updateBody poker_deleteBody

材料ゾーン

poker_proposeZone poker_updateZone poker_deleteZone

座標変換

poker_proposeTransform poker_updateTransform poker_deleteTransform

ビルドアップ係数

poker_proposeBuildupFactor poker_updateBuildupFactor poker_deleteBuildupFactor poker_changeOrderBuildupFactor

線源

poker_proposeSource poker_updateSource poker_deleteSource poker_confirmDaughterNuclides

検出器

poker_proposeDetector poker_updateDetector poker_deleteDetector

単位

poker_proposeUnit poker_getUnit poker_updateUnit poker_validateUnitIntegrity poker_analyzeUnitConversion

サマリー出力量

poker_proposeThinnedIndices poker_getThinnedIndices poker_updateThinnedIndices

確定・計算・結果

poker_applyChanges poker_resetYaml poker_executeCalculation poker_getDoseMap poker_getSchema poker_openGui

CAD 連携

poker_generateInput poker_generatePaths

粒子(光子・中性子。中性子は POKER 2.3.0 から)

poker_setParticle poker_getParticle

中性子の有限媒質補正(POKER 2.3.2 から)

poker_setNeutronCorrection poker_getNeutronCorrection

崩壊系列・放射平衡(EquilibriumSheet)

equil_listNuclides equil_getChain equil_calculateDecay equil_getSeries equil_getEmissions

非同期実行(POKER_MCP_ASYNC=1 のとき)

poker_submitCalculation poker_getJobStatus poker_getJobResult

各ツールの引数と戻り値は API_COMPLETE にあります。

現状の制約

POKER 本体は次の指定に対応していますが、POKER-MCP にはまだ対応するツールがありません(今後対応する予定です)。

  • 光子の線源のエネルギースペクトルによる指定(光子はツールでは核種と放射能で指定します。中性子はエネルギ線でも指定できます)

  • 多重層(2 層・3 層)のビルドアップ係数の指定(ツールでは単層の材料で指定します)

必要な場合は YAML を直接編集してください。AI アプリが poker_getSchema で書式を読み、 YAML を直接書き換えることもありますが、その部分は POKER-MCP のツールによる検証を受けず、 計算時の poker_cui による検証だけになります。

任意組成のカスタム材料は、lib_material.dat に登録したものだけ使えます(MATERIAL_SYSTEM)。

ドキュメント

文書

内容

docs/manuals/

マニュアル一式(基本ガイド、API、CAD 連携、運用、トラブルシューティング)

CHANGELOG.md

版ごとの変更内容

開発者向け

git clone https://github.com/Hirao-Y/poker_mcp.git
cd poker_mcp
npm install

コマンド

内容

npm run check:manifest

ツール定義とマニフェストの整合(POKER 本体は不要)

npm run test:http

HTTP 版。ツール一覧・計算結果が stdio 版と同一であること

npm run test:jobs

非同期ジョブ。同期実行との全行一致

npm run test:schema

poker_getSchema と .dose の読み取り

npm run test:neutron

中性子線源(particle: neutron、emission・エネルギ線の指定、光子との取り違えの拒否、古い POKER での停止)

npm run test:equil

equil_* ツールと、暗号化した ICRP-07.NDX からの核種データベースの読み込み

npm run test:cad-full など

CAD 連携(FreeCAD が必要)

check:manifest 以外は POKER 本体が必要です。不具合の報告は GitHub Issues へお願いします。

ライセンス

MIT License(LICENSE)。対象は本リポジトリの内容だけです。POKER 本体と FreeCAD は 別途入手し、それぞれの利用条件に従ってください。poker-mcp は poker_cui を外部プロセスとして 起動するだけなので、POKER 本体の利用条件には影響しません。

Copyright (c) 2025-2026 Yoshihiro Hirao

Available Tools

26 tools
poker_analyzeUnitConversionC

異なる単位系間の変換係数を分析・計算します

Inputs: targetUnits (required), includePhysicalAnalysis.

poker_applyChangesA

保留中の全変更を実際のYAMLファイルに適用します(自動バックアップ実行)

Inputs: backup_comment, force.

poker_changeOrderBuildupFactorC

ビルドアップ係数の順序を変更します

Inputs: material (required), newIndex (required).

poker_deleteBodyB

立体を削除します(依存関係チェック付き)

Inputs: name (required).

poker_deleteBuildupFactorC

ビルドアップ係数を削除します

Inputs: material (required).

poker_deleteDetectorC

検出器を削除します

Inputs: name (required).

poker_deleteSourceB

放射線源を削除します

Inputs: name (required).

poker_deleteTransformC

変換を削除します

Inputs: name (required).

poker_deleteZoneB

ゾーンを削除します(ATMOSPHERE以外)

Inputs: body_name (required).

poker_executeCalculationC

作成したYAMLファイルを使用してpoker_cuiで放射線遮蔽計算を実行します

Inputs: yaml_file (required), output_files, summary_options.

poker_getUnitB

現在の単位設定を取得します(4つのキーすべてを返却)- 完全性保証

Inputs: no named parameters.

poker_proposeBodyC

新しい3D立体を提案します(自動バックアップ付き)

Inputs: name (required), type (required), bottom_center, bottom_radius, +21 more.

poker_proposeBuildupFactorC

ビルドアップ係数を提案します

Inputs: material (required), use_finite_medium_correction (required), use_slant_correction (required).

poker_proposeDetectorC

新しい検出器を提案します

Inputs: name (required), origin (required), show_path_trace (required), grid, +1 more.

poker_proposeSourceD

新しい線源を提案します

Inputs: cutoff_rate (required), inventory (required), name (required), type (required), +3 more.

poker_proposeTransformC

回転・移動変換を提案します

Inputs: name (required), operations (required).

poker_proposeUnitA

単位設定セクションを提案します(YAMLファイルに未存在の場合のみ)- 4キー完全性保証

Inputs: angle (required), density (required), length (required), radioactivity (required).

poker_proposeZoneC

材料ゾーンを提案します(物理検証付き)

Inputs: body_name (required), material (required), density.

poker_updateBodyC

既存立体のパラメータを更新します

Inputs: name (required), bottom_center, bottom_radius, center, +20 more.

poker_updateBuildupFactorC

既存ビルドアップ係数の設定を更新します

Inputs: material (required), use_finite_medium_correction, use_slant_correction.

poker_updateDetectorC

既存検出器のパラメータを更新します

Inputs: name (required), grid, origin, show_path_trace, +1 more.

poker_updateSourceC

既存放射線源のパラメータを更新します

Inputs: name (required), cutoff_rate, division, geometry, +2 more.

poker_updateTransformC

既存変換の操作を更新します

Inputs: name (required), operations.

poker_updateUnitB

既存単位設定を更新します(部分更新可能だが4つのキーは常に維持)- 完全性保証

Inputs: angle, density, length, radioactivity.

poker_updateZoneC

既存ゾーンの材料や密度を更新します

Inputs: body_name (required), density, material.

poker_validateUnitIntegrityC

単位系の4キー完全性と物理的整合性を包括検証します

Inputs: generateReport, includeSystemAnalysis.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 26 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose targeting specific resources (Body, BuildupFactor, Detector, Source, Transform, Zone, Unit) and actions (analyze, apply, change, delete, execute, get, propose, update, validate). There is no ambiguity or overlap between tools, as each handles a unique operation on a specific entity in the radiation shielding calculation domain.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with the prefix 'poker_' (e.g., poker_deleteBody, poker_proposeDetector, poker_updateUnit). The naming is uniform across all 26 tools, using snake_case and clear action-resource combinations, making it highly predictable and readable.

    Tool Count2/5

    With 26 tools, the count is too high for typical MCP server scope, which usually benefits from 3-15 tools. While the domain (radiation shielding calculation) is complex, the tool set feels heavy and could overwhelm agents, suggesting potential over-fragmentation of operations.

    Completeness5/5

    The tool set provides complete CRUD/lifecycle coverage for the domain, including propose (create), get, update, and delete operations for all key entities (Body, BuildupFactor, Detector, Source, Transform, Zone, Unit), plus analysis, validation, and execution tools. There are no obvious gaps, ensuring agents can handle full workflows without dead ends.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers