Skip to main content
Glama
sterile-nu-bbn-server

sterile-nu-bbn-server

by nesar

sterile-nu-bbn-server

CI analysis trial particle-physics cosmology HPC · part of the HEP-KE MCP server library

An MCP server that bridges sterile neutrino particle physics with Big Bang Nucleosynthesis cosmology: from particle parameters (m_s, sin²2θ, production mechanism) to ΔN_eff, relic density, light-element abundances, the X-ray decay line and free streaming in a single call, checked against observational data. Built as a companion to bbn-server, extending the BBN framework into the BSM particle physics domain.

At a glance

Category

analysis, trial

Domain

particle physics, cosmology

HPC dispatch

yes (IRI + Globus via hep-genesis)

Skill prefix

sterile_nu (list_sterile_nu_skills, load_sterile_nu_skill)

Default port

8007 (streamable-http)

Hosted endpoint

none

Related MCP server: Supernova Cosmology MCP Server

The science

Sterile neutrinos are hypothetical neutral fermions that mix with active neutrinos. They appear in many extensions of the Standard Model and are candidates for dark matter (keV-scale) or the source of short-baseline oscillation anomalies (eV-scale). Their existence has direct, quantitative consequences for:

Scale

Observable

Data

Particle

Mixing angle sin²2θ, mass m_s

SBL experiments (BEST, STEREO), reactor anomalies

Nuclear / BBN

Primordial He-4 (Y_p), D/H, ⁷Li/H

Quasar absorption spectra, H II regions

CMB

N_eff (number of relativistic species)

Planck 2018, ACT, SPT; future CMB-S4

X-ray

Decay line ν_s → ν_a + γ

NuSTAR, XMM-Newton, XRISM, Chandra

LSS

Free-streaming suppression

Lyman-α forest (SDSS, DESI)

This server computes the entire chain: given (m_s, sin²2θ, production mechanism), it predicts ΔN_eff, BBN abundances, X-ray line flux, and free-streaming length — then checks all predictions against actual observational data.

Physics and validity

  • BBN: Y_p, D/H, ⁷Li/H are fits to the full PRyMordial network over N_eff 2.04–6.04, ω_b ±15%, τ_n ±12 s (max deviation 0.11%, 0.26%, 0.14%). Exclusion is Δχ² vs the SM > 3.84 (95%, 1 dof): the SM itself carries χ² ≈ 2.8 from the D/H tension, which says nothing about sterile ν. BBN alone gives ΔN_eff < 0.55.

  • Mass regimes: valid below ~100 keV (relativistic at BBN). At ≥ 1 MeV the particle decays during BBN and decay-product injection is not modeled — results there are flagged and are not constraints.

  • Known approximations: eV partial thermalisation is a crude fit (a QKE run gives ΔN_eff = 0.93 at Δm² = 1 eV², sin²2θ = 1e-3 vs 0.40 here); Shi–Fuller ΔN_eff is a heuristic; X-ray fluxes are whole-halo.

Questions to ask an agent

"If the BEST experiment's sterile neutrino is real, what happens to primordial helium and deuterium?"

"Can a 7 keV sterile neutrino be all the dark matter, and would XRISM see its X-ray decay line in the Perseus cluster?"

"Scan the parameter space and show me where BBN, X-ray limits, and structure formation all agree."

Tools

MCP tool names all carry a sterile_nu token so agents never confuse them with a BBN abundance server's or a client harness's tools. Science tools return a JSON string {status, files, message, metadata}.

tool

what it does

list_sterile_nu_skills / load_sterile_nu_skill

server-side skills (also served as MCP prompts)

describe_sterile_nu_tools

Capabilities, physics, validity range, observational data — call first

predict_sterile_nu

The bridge for one point: ΔN_eff, Ω_s h², Y_p/D/H/Li7, BBN Δχ² vs SM, X-ray line, free streaming, regime flag

predict_sterile_nu_grid

Same for many points in one call (product or zip of mass/mixing lists) → compact table + CSV (HPC-dispatchable)

check_sterile_nu_sbl_anomaly

What BEST's best-fit sterile ν means for BBN and Planck N_eff

predict_sterile_nu_xray_line

X-ray line flux from DM decay; target="all" compares Perseus, M31, MW, Coma, stacks

scan_sterile_nu_parameters

Scan the (m_s, sin²2θ) plane → CSV/NPZ, BBN-allowed mixing per mass (HPC-dispatchable)

plot_sterile_nu_exclusion

Exclusion plane: BBN, overclosure, X-ray, Ly-α, 3.5 keV, invalid-regime hatching

plot_sterile_nu_bbn_impact

Y_p, D/H vs N_eff with observed bands and the BBN 95% ΔN_eff limit

set_dispatch / get_dispatch / auth_status / export_dispatch_pack

HPC dispatch (see Run on HPC)

Python functions behind them (predict_from_particle_params, scan_constraints, plot_exclusion, plot_bbn_vs_neff, ... in tools/sterile_tools.py; physics in tools/physics.py) keep their names for notebooks and scripts (notebooks/, run_predictions.py). Figures use a shared publication style (tools/plotting.py: STIX mathtext, no LaTeX needed, colorblind-safe palette); every plot tool accepts save_pdf.

Skills

skill

use it to

sterile-nu-tour

a guided two-minute first run through every tool, with expected numbers

sterile-nu-bbn-constraints

constrain sterile neutrinos with BBN and N_eff: regimes, benchmark grids, exclusion plane, BEST anomaly

kev-sterile-dm-xray

keV sterile-neutrino dark matter: 3.5 keV line, X-ray limits, relic density, Lyman-α

hpc-dispatch-handoff

run the scan / grid kernels on ALCF Polaris or NERSC Perlmutter

Install and run

git clone https://github.com/nesar/sterile-nu-bbn-server.git && cd sterile-nu-bbn-server
uv sync                                  # creates this server's own .venv from uv.lock
./run_server.sh                          # stdio (what agent clients launch)
./run_server.sh --transport streamable-http --port 8007   # URL endpoint at http://127.0.0.1:8007/mcp

uv sync --extra notebook adds Jupyter for the demo notebooks.

Connect a client

Claude Code (from the repo directory, .mcp.json is picked up automatically):

claude mcp add sterile_nu -- /path/to/sterile-nu-bbn-server/run_server.sh

Claude Desktop, Codex, ChatGPT, Antigravity and hep-genesis-agent: see the library site.

Run on HPC

Every tool is analytic and fast locally (a 150 × 150 scan takes ~0.5 s); dispatch is for facility campaigns, not speed. Two kernels are declared in tools/sterile_nu/__init__.py (DISPATCH_KERNELS) and implemented in tools/sterile_nu/kernels.py (numpy-only, JSON in → JSON out):

kernel

backs

duration hint

sterile_nu.kernels.scan_parameter_space

scan_sterile_nu_parameters

600 s

sterile_nu.kernels.predict_points

predict_sterile_nu_grid

300 s

  • Client-side (hosted, recommended): export_dispatch_pack hands the tools/ package and the kernel manifest to the client's hep-genesis harness, which stages and submits with its own credentials.

  • Server-side (your own machine): auth_status, then set_dispatch("perlmutter" | "polaris"); the two tools above then run their kernel as one facility job and still write their CSV/NPZ locally. Needs the hep-genesis backend in this environment (uv pip install -e <hep-genesis-agent>/backend[iri]).

No SSH, no batch scripts, no credentials in the server. Details: the hpc-dispatch-handoff skill.

Development and tests

uv sync --extra dev
uv run ruff check .
uv run pytest -m "not network and not slow"   # contract + science tests (what CI runs)
uv run pytest -m network                       # tests that download public data (none yet)
uv run python tests/smoke_server.py            # live stdio server: lists tools and prompts

The generic files (mcp_server/, tools/meta/, tests/test_contract.py, tests/smoke_server.py, CI) come from the HEP-KE MCP server standard; do not edit them per server. Server-specific code: tools/physics.py, tools/sterile_tools.py, tools/plotting.py, tools/sterile_nu/, mcp_server/INSTRUCTIONS.md, skills/, tests/test_physics.py, tests/test_dispatch_pack.py.

Limitations

  • BBN abundances are a fit to PRyMordial, not a network run; for full-network abundances at other (N_eff, ω_b, τ_n) use a BBN abundance server.

  • The only BBN effect modeled is ΔN_eff: for m_s ≥ ~1 MeV decay injection (photodissociation, hadronic injection, entropy release) is not modeled, so results there are flagged and are not constraints.

  • eV partial thermalisation is a crude fit (limits there are conservative); the 10 eV seam between the eV fit and the DW relic density gives a ~30× jump in the BBN limit; Shi–Fuller ΔN_eff is a heuristic (0.1 × DW).

  • X-ray fluxes are whole-halo with f_DM = 1 (no field of view, no profile integration); X-ray limits are tabulated points checked within 30% in mass.

Citation and license

Physics references:

  • Dodelson & Widrow, PRL 72, 17 (1994) — non-resonant production

  • Shi & Fuller, PRL 82, 2832 (1999) — resonant production

  • Pal & Wolfenstein, PRD 25, 766 (1982) — radiative decay rate

  • Burns, Tait & Valli, EPJC 84, 86 (2024) — PRyMordial (BBN calibration)

  • Pitrou, Coc, Uzan & Vangioni, PhysRep 754, 1 (2018) — BBN review

  • Roach+ (2020), PRD 101, 103011 — NuSTAR X-ray limits

  • Dessert+ (2020), Science 367, 1465 — XMM-Newton blank-sky limits

  • Barinov+ (2022), PRL 128, 232501 — BEST experiment

  • Aver, Olive & Skillman, JCAP 07 (2021) 029 — primordial He-4

  • Cooke, Pettini & Steidel, ApJ 855 (2018) 102 — primordial D/H

MIT license (see LICENSE).

Available Tools

14 tools
auth_statusA

Report the facility sign-in state THIS server sees for its own HPC dispatch (ALCF and NERSC).

Call this before set_dispatch to a remote site, or when one of this
server's remote calls fails with an auth error. It says nothing about
the facility servers' own tokens - ask those servers directly. Sign-in
happens outside this server (hep-genesis auth CLIs or the desktop app's
HPC panel); tokens are re-read on every call.

Inputs: no named parameters. Returns: result

check_sterile_nu_sbl_anomalyA

Assess the BEST short-baseline sterile neutrino (Δm² = 1.3 eV², sin²2θ = 0.42) against BBN and Planck N_eff.

Inputs: no named parameters. Returns: result

describe_sterile_nu_toolsA

Describe this sterile-neutrino server: its tools, physics, validity range, and the observational data it uses. Call this first.

Inputs: no named parameters. Returns: result

export_dispatch_packA

Hand THIS server's compute kernels to the client for HPC runs.

Returns the ``tools/`` package as in-band text files plus a manifest of
kernel entry points (dotted function path, args shape, node-side
pip_deps, walltime hint). The CLIENT - which holds the facility tokens,
Globus endpoint, project and workdir - stages and submits the kernels
with ITS OWN credentials (e.g. the hep-genesis facility servers'
run_pack_kernel tool). Nothing credential-shaped or project-shaped is
needed on, or returned by, this server.

Clients that recognise the ``dispatch_pack`` key should save the files
locally and NOT echo their contents into the conversation.

Inputs: no named parameters.

get_dispatchA

Report where THIS server's heavy tools currently execute.

Inputs: no named parameters. Returns: result

list_sterile_nu_skillsA

List this server's skills: named multi-tool recipes.

A skill is procedural know-how - which tools to chain, in which order,
with what parameters, and how to sanity-check and report. When a task
matches one, load it with the load-skill tool and follow it.

Inputs: no named parameters. Returns: Uniform result contract returned by every tool.

load_sterile_nu_skillA

Load the full instructions of one of this server's skills and follow them.

Inputs: name (required). Returns: Uniform result contract returned by every tool.

plot_sterile_nu_bbn_impactA

Plot how extra radiation from sterile neutrinos shifts Yp and D/H.

Yp and D/H vs N_eff (PRyMordial-calibrated fit) with observed bands,
the Planck N_eff band, the SM and +1 thermalised-sterile lines, and the
95% BBN limit on Delta N_eff (quoted in the result).

Inputs: n_points, neff_max, neff_min, save_pdf, +1 more. Returns: result

plot_sterile_nu_exclusionB

Plot the sterile-neutrino exclusion plane from a scan file.

BBN exclusion, overclosure and the Omega_DM line, NuSTAR/XMM X-ray
limits, the Lyman-alpha thermal-WDM bound, the 3.5 keV line, and
hatching where the BBN treatment is invalid. Publication style.

Inputs: scan_file (required), title, save_pdf, output_dir. Returns: result

predict_sterile_nuA

Predict everything ONE sterile neutrino (m_s, sin²2θ) produces and its constraints.

Returns Delta N_eff and relic density, the BBN abundances it implies
(Yp, D/H, Li7; PRyMordial-calibrated fit) with Delta chi^2 vs the SM and
a 95% verdict, the radiative-decay X-ray line and lifetime, the
free-streaming length, and a regime flag — for m_s >= ~1 MeV the BBN
numbers ignore decay injection and are NOT constraints. For more than
a couple of points use predict_sterile_nu_grid (one call, one table).

Inputs: m_s_eV (required), sin2_2theta (required), tau_n, mechanism, +2 more. Returns: result

predict_sterile_nu_gridA

Predict sterile-neutrino observables for MANY points in one call (max 400).

Same physics as predict_sterile_nu; returns a compact inline table
(Delta N_eff, Omega_s h^2, BBN Delta chi^2 and verdict, overclosure,
lifetime, regime) and a CSV with every column. Use for benchmark
tables, mass or mixing sweeps, and Delta N_eff-vs-parameter curves.

Inputs: masses_eV (required), sin2_2thetas (required), combine, mechanism, +2 more. Returns: result

predict_sterile_nu_xray_lineA

Predict the X-ray decay line (E = m_s/2) of sterile-neutrino dark matter.

Gives the line energy, radiative lifetime, whole-halo photon flux per
target (assuming the sterile ν is all the dark matter; no field-of-view
cut), and which tabulated X-ray limits (NuSTAR, XMM) exclude the point.
Default target='all' returns every target in one call.

Inputs: m_s_eV, target, sin2_2theta. Returns: result

scan_sterile_nu_parametersA

Scan the sterile-neutrino (m_s, sin²2θ) plane for BBN and relic-density constraints.

Writes CSV + NPZ (pass the NPZ to plot_sterile_nu_exclusion) and returns
counts of BBN-excluded (Delta chi^2 > 3.84) and overclosing points plus
the largest BBN-allowed sin^2 2theta at sampled masses. Different
ranges get different file names. Masses >= ~1 MeV are flagged as
outside model validity.

Inputs: m_max_eV, m_min_eV, n_points, mechanism, +3 more. Returns: result

set_dispatchA

Set where THIS server's heavy tools execute: 'local' (this machine), 'polaris' (ALCF) or 'perlmutter' (NERSC).

Affects only this server's heavy (dispatchable) tools - never other
servers' dispatch state. Remote sites run each heavy call as one facility
job (staging + queue + walltime: minutes, not seconds) and need facility
sign-in - check with auth_status first. Light tools (listing, plotting,
small reads) always run locally. Optional artifact_dir sets where
produced files are fetched back to. Returns the active configuration.

Inputs: site (required), artifact_dir. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 14 tools

    Disambiguation4/5

    The core physics tools are clearly separated by intent: predict_sterile_nu (one point), predict_sterile_nu_grid (many points, inline table), scan_sterile_nu_parameters (file-producing plane scan), and predict_sterile_nu_xray_line (X-ray only), and the descriptions explicitly steer users between them. Residual overlap exists between the grid predictor and the parameter scan (both compute BBN/overclosure over many points) and check_sterile_nu_sbl_anomaly is essentially a canned predict call, but the file-vs-table and benchmark-vs-generic distinctions keep misselection unlikely.

    Naming Consistency4/5

    The physics tools follow a strong verb_noun pattern with a consistent sterile_nu namespace (list_/load_/describe_/predict_/scan_/plot_/check_sterile_nu_*), which makes the domain surface very readable. The four dispatch tools (auth_status, export_dispatch_pack, get_dispatch, set_dispatch) drop the namespace infix and auth_status is noun-phrased rather than verb-first, a minor but visible deviation from the otherwise uniform convention.

    Tool Count4/5

    At 14 tools the server sits comfortably in the well-scoped range, with roughly five prediction/scan tools, two plotting tools, three skill-framework tools, and four dispatch tools. A few entries are conveniences rather than necessities (check_sterile_nu_sbl_anomaly duplicates a fixed predict call; the list/load/describe skill trio is somewhat ceremonial), but nothing feels like padding at this scale.

    Completeness4/5

    The surface covers the sterile-neutrino workflow end to end: single-point and batch prediction, X-ray line limits, parameter-plane scanning, exclusion and BBN-impact plots, plus regime validity flagging and remote dispatch for heavy runs. Gaps are modest — there is no way to query the underlying observational limit tables directly, no separate tool for non-thermal/resonant production scenarios, and no combined-fit or data-comparison helper — but agents can work around these via the existing predict and describe tools.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers