
Xraylib Mcp Server
io.github.tschoonj由 GitHub 帳號 tschoonj 發布v0.1.6更新於 Oct 24, 2026
MCP server providing X-ray interaction data via xraylib
概覽
本機 MCP 伺服器,透過 xraylib 提供 X 射線交互作用資料,讓助理計算截面、螢光譜線、吸收邊能量等物理量。
- 可以做什麼
- 在原子序數與元素符號之間轉換,並查詢原子量、密度、電子組態和解析化學式
- 計算螢光譜線與吸收邊能量、螢光產率、躍遷因子、輻射速率和原子能階寬度
- 計算元素與化合物的質量截面和原子截面,包括螢光截面與 Kissel 光電游離變體
- 計算微分截面、瑞利與康普頓散射因子、反常散射因子和康普頓分布
- 查詢奧杰與 Coster-Kronig 躍遷速率和機率、折射率實部與虛部,以及內建 NIST 化合物與放射性核種資料
- 列出有效的譜線、殼層、躍遷、奧杰和 NIST 化合物常數名稱
- 適用情境
- 適用於 X 射線物理、光譜學、材料分析或偵測器建模等工作,希望助理直接查詢或計算 xraylib 數值而不必自行寫腳本時。適合能啟動本機程序的桌面用戶端。
- 執行需求
- 以本機程序執行,僅限桌面端,沒有網頁版。可透過 PyPI 套件以 uvx 或 pip 安裝,或執行已發布的 Docker 映像;未宣告驗證、環境變數或請求標頭。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Xraylib Mcp Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
xraylib MCP Server
[CI] [Docker Image] [PyPI] [License: BSD-3-Clause]
A Model Context Protocol (MCP) server that provides access to xraylib X-ray interaction data through a standardized interface. Query cross-sections, fluorescence lines, edge energies, and more from any MCP-compatible client.
Table of Contents
Features
This server exposes 104 tools organized into the following categories:
Utility tools
- AtomicNumberToSymbol / SymbolToAtomicNumber -- convert between atomic numbers and element symbols
- AtomicWeight -- atomic weight (g/mol)
- ElementDensity -- element density (g/cm3)
- ElectronConfig -- electron configuration for a given shell
- CompoundParser -- parse chemical formulas (e.g.
SiO2,Ca5(PO4)3F) - Atomic_Factors -- atomic scattering factors f0, f', f''
Line, edge, and shell properties
- LineEnergy / EdgeEnergy -- fluorescence line and absorption edge energies (keV)
- FluorYield / JumpFactor / RadRate -- fluorescence yields, jump factors, radiative rates
- AtomicLevelWidth -- natural widths of atomic levels (keV)
Cross-sections (element)
- CS_Total, CS_Photo, CS_Rayl, CS_Compt, CS_Energy, CS_KN -- mass cross-sections (cm2/g)
- CSb_Total, CSb_Photo, CSb_Rayl, CSb_Compt -- atomic cross-sections (barn/atom)
Fluorescence cross-sections
- CS_FluorLine / CSb_FluorLine -- line fluorescence cross-sections
- CS_FluorShell / CSb_FluorShell -- shell fluorescence cross-sections
- Kissel photoionization variants with full, radiative, nonradiative, and no cascade options
Differential cross-sections
- DCS_Rayl / DCS_Compt and barn/atom variants -- unpolarized differential cross-sections
- DCSP_Rayl / DCSP_Compt and barn/atom variants -- polarized differential cross-sections
Scattering factors
- FF_Rayl / SF_Compt -- Rayleigh form factor and Compton scattering function
- MomentTransf / ComptonEnergy -- momentum transfer and Compton-scattered photon energy
- Fi / Fii -- anomalous scattering factors
- ComptonProfile / ComptonProfile_Partial -- Compton profiles (total and per-shell)
Auger and Coster-Kronig transitions
- AugerRate / AugerYield -- Auger transition rates and yields
- CosKronTransProb -- Coster-Kronig transition probabilities
Compound cross-sections
- All CS/CSb, DCS/DCSb, and DCSP/DCSPb variants for compounds (by chemical formula)
- Kissel photoionization variants for compounds
Refractive index
- Refractive_Index_Re / Refractive_Index_Im -- real and imaginary parts of the refractive index
NIST compounds
- GetCompoundDataNISTByName / GetCompoundDataNISTByIndex / GetCompoundDataNISTList -- access the built-in NIST compound database
Radionuclide data
- GetRadioNuclideDataByName / GetRadioNuclideDataByIndex / GetRadioNuclideDataList -- access the built-in radionuclide database (X-ray lines, intensities, gamma energies)
Constant listings
- ListLineConstants / ListShellConstants / ListTransitionConstants / ListAugerConstants / ListNISTCompoundConstants -- enumerate valid constant names
Installation
Using uv (recommended)
Using pip
Usage
As a standalone server
With Claude Desktop
Add to your Claude Desktop configuration:
Or using the pre-built Docker image:
With VS Code
Add to your VS Code settings (.vscode/settings.json or user settings):
Or using the pre-built Docker image:
With Claude Code
Add the server using the CLI:
Or using the pre-built Docker image:
As a development server
Using Docker
Pre-built images from GitHub Container Registry
Local development with Docker
Development
Setup
Running tests
Code quality
License
BSD 3-Clause License -- see LICENSE for details.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request
來源:README.md,提交 caee27b
工具
0版本歷史
1- v0.1.6最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分