Skip to main content
Glama
clusters-mcp-server
by HEP-KE

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
COSMO_MCP_DATANoOverride the download cache directory (default is ~/.cache/cosmo-mcp/clusters-mcp-server/).

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Galaxy Cluster Catalogs MCP Server: Planck PSZ2, SPT-SZ 2500d (Bocquet+19), SPTpol 100d, SPT-ECS, SPT-3G Main 5yr, ACT DR6, eROSITA eRASS1 (primary + cosmology) and DES Y6 WaZP (optical; richness NGALS instead of mass, M500=NaN, extra columns richness/z_spec/in_cosmo; footprint 4544.7 deg^2 via compute_wazp_footprint_area) cluster catalogues. Start with list_clusters_datasets; list_clusters_skills for recipes (clusters-tour first). fetch_cluster_catalog downloads a catalogue on first use and writes a harmonised CSV (name, ra, dec [deg J2000], z, z_err, M500 [1e14 Msun, M500c], M500_err_lo/hi, snr, survey, dataset; NaN = missing); every other catalogue tool takes those CSV paths (or a dataset key for the full catalogue). Units/conventions: M500 is each survey's own estimate - SPT (xi-mass, WL+X-ray calibrated, h70), ACT DR6 (WL-consistent normalisation, Eddington-corrected), Planck PSZ2 MSZ (hydrostatic Y-M, expect 20% lower, 1-b0.8), eRASS1 (count-rate-mass, native 1e13 Msun converted). snr is survey-native (xi / SNR / EXT_LIKE / WaZP wavelet SNR) and NOT comparable across surveys. fetch_cluster_wl_profiles returns the REAL measured Megacam shear profiles of 19 SPT clusters (Dietrich+19) with source N(z); get masses with fit_cluster_wl_mass, never by fitting the gt means. predict_cluster_counts_lcdm (heavy) uses Tinker+08 x Eisenstein-Hu P(k) with no selection function: use mass thresholds where samples are ~complete. Tools that write files take an output_dir and return ArtifactResult; pass file paths between tools, never raw arrays. Heavy tools can run on ALCF/NERSC via the hep-genesis IRI dispatch engine (set_dispatch / export_dispatch_pack); this server holds no facility credentials.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_clusters_datasetsA

List the public datasets this server exposes. Call this first.

Products are grouped as catalogs (object-level data), summary statistics (measurements with covariance) and published results (chains / parameter constraints, for comparison only). Build analyses on catalogs and summary statistics. Each entry also gives access (bundled vs downloaded on first use) and which tools read it.

describe_clusters_datasetA

Full description of one dataset: products, units, conventions, URLs, citation.

list_clusters_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.
load_clusters_skillA

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

fetch_cluster_catalogA

Download one cluster catalogue (first use only) and write a harmonised CSV with cuts applied.

Use this first: every other catalogue tool takes the CSV path it writes.
Columns: name, ra, dec [deg], z, z_err, M500 [1e14 Msun, M500c], M500_err_lo,
M500_err_hi, snr (survey-native statistic), survey, dataset. NaN = missing.
des_y6_wazp (optical) has M500 = NaN everywhere and extra columns richness,
richness_err (NGALS), z_spec, in_cosmo, cover_frac; cut on richness, not mass.
describe_catalog_columnsA

Explain a catalogue's columns: harmonised mapping, units, mass convention, and native FITS columns.

Use before comparing masses across surveys - each survey's M500 comes from
a different scaling relation, and ``snr`` means different things.
plot_mass_redshiftA

Overlay several cluster catalogues in the M500-z plane (the standard selection-function picture).

Use to show how SZ (flat-in-M at high z) and X-ray (flux-limited, low z, low mass) selections differ. Only entries with both z and M500 are drawn.

plot_cluster_sky_mapA

Mollweide sky map of one or more cluster catalogues (RA increasing to the left, astronomical convention).

Use to show footprints and overlaps (e.g. SPT south, ACT equatorial strip, eRASS1 western Galactic half, Planck all-sky) before a crossmatch.

compute_cluster_countsA

Histogram cluster counts: N(z) per redshift bin and cumulative N(>M500) (or N(>richness)), per catalogue.

Use to compare survey depths or as the observed side of predict_cluster_counts_lcdm.
Writes counts_nz.csv and counts_nm.csv (+ a PNG with both panels). Optical catalogues
without masses (des_y6_wazp) get N(>richness) rows in counts_nrich.csv instead of
N(>M500); m500_min is not applied to them (use richness_min).
compute_wazp_footprint_areaA

Effective survey area [deg^2] of the DES Y6 WaZP footprint, total and as a function of redshift.

Use to turn WaZP cluster counts into counts per deg^2: the footprint is a HEALPix
map (Nside 4096, NESTED) with coverage fraction DETFRAC and depth limit ZMAX per pixel;
effective area = sum(DETFRAC) x pixel area = 4544.7 deg^2, and at redshift z only the
pixels with ZMAX > z have complete richness (IN_COSMO). Writes area_vs_z CSV.
crossmatch_catalogsA

Positionally (+ redshift) cross-match two cluster catalogues; write the matched pairs and mass ratios.

Use for SZ-vs-X-ray (or SZ-vs-SZ) comparisons. Nearest neighbour in A for each B
entry within the radius, made one-to-one (each A keeps its closest B). Typical
radii: 2' for SZ-SZ (ACT/SPT beams ~1'), 3' for Planck (5' beam, larger
positional error) or SZ-vs-eROSITA. Output CSV has *_a / *_b columns,
sep_arcmin, dz and mass_ratio = M500_b / M500_a. Optical catalogues (des_y6_wazp)
carry richness instead of mass (mass_ratio NaN): pass WaZP (optionally richness-cut) as
catalog_a and the SZ catalogue as catalog_b with ~2' radius to get a richness_a-vs-M500_b
table (the KD-tree is built on A, every B entry is queried).
compare_mass_calibrationA

Mass-calibration comparison for matched clusters: M500_b vs M500_a scatter, ratio vs z and vs mass.

Use after crossmatch_catalogs to quantify relative mass bias between surveys
(e.g. Planck's hydrostatic 1-b ~0.8 vs WL-calibrated SPT/ACT, or SZ vs eROSITA).
Reports median ratio with bootstrap error, log-normal scatter, per-z-bin ratios
and (optionally) a power-law slope.
fetch_cluster_selection_functionA

Fetch the survey selection function / completeness characterisation for a cluster survey.

Use to get the detection probability as a function of the survey observable
(Planck: completeness C(Y500, theta500); ACT: Q-filter + RMS noise per tile;
SPT: field areas + noise correction factors). These are the inputs needed to
forward-model cluster counts via predict_cluster_counts_lcdm.

Planck data: range-fetches only the ~120 KB tail of the 403 MB FITS file.
ACT data: streams the 7.4 GB tarball but extracts only the ~2 MB selFn tables.
SPT data: hard-coded field parameters from Bocquet+19 (no download needed).
fetch_cluster_wl_profilesA

Fetch the measured Megacam weak-lensing tangential shear profiles of 19 SPT-SZ clusters (Dietrich+19).

These are the REAL observed reduced-shear profiles g_t(r) from the official SPT-SZ cluster
likelihood release (Bocquet+19), not synthetic data. One CSV per cluster (r_deg, gt, gt_err,
kbin, n_src, r_mpc) plus one source-redshift N(z) CSV per cluster (needed for Sigma_crit /
<beta>). Use fit_cluster_wl_mass to turn them into M500c/M200c; do not fit to bin means.
fit_cluster_wl_massA

NFW weak-lensing mass of SPT-SZ Megacam clusters from their measured g_t(r) profiles.

Use after (or instead of) fetch_cluster_wl_profiles to get M500c and M200c [1e14 Msun]
with 68% intervals per cluster. Model (mirrors the release's lensing.py): NFW with c fixed
by c(M,z), Sigma_crit from each cluster's source N(z) via <beta>, reduced shear
g = gamma/(1-kappa) (1 + kappa(<beta^2>/<beta>^2 - 1)), Gaussian likelihood, flat prior in
ln M200c. Reports the ratio to the Dietrich+19 published masses where available. These
are raw NFW masses: no simulation-calibrated WL bias (~0.94) or LSS scatter is applied.
plot_completenessA

Plot the survey completeness / selection function.

Planck: heatmap of completeness C(Y500, theta500) at a chosen SNR cut.
ACT DR6: histogram of tile y0 RMS noise levels.
SPT-SZ: bar chart of field areas and noise correction factors.
predict_cluster_counts_lcdmA

Predict LCDM cluster counts dN/dz above a mass threshold (Tinker+08 HMF x Eisenstein-Hu P(k)) and compare with a catalogue.

Use to ask "is this survey's N(z) above M consistent with LCDM / which sigma8?".
No selection function, mass scatter or Eddington bias is modelled: pick a
threshold where the catalogue is ~complete (SPT-SZ ~5e14 at z>0.25, ACT DR6
SNR>5 ~5e14, PSZ2 ~6e14 at z~0.2) and treat ratios at the 10-20% level as the
systematics floor (the mass-calibration uncertainty dominates). Heavy:
runs as an HPC kernel when dispatch is active.
plot_counts_vs_predictionA

Plot observed cluster N(z) (Poisson errors) against LCDM predictions, with a residual panel and the sigma8 profile if scanned.

Use after predict_cluster_counts_lcdm.
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.
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.
get_dispatchA

Report where THIS server's heavy tools currently execute.

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.

Prompts

Interactive templates invoked by user choice

NameDescription
cluster-counts-vs-lcdmCompare observed cluster N(z) above a mass threshold with LCDM predictions (Tinker+08 HMF x Eisenstein-Hu P(k)) for SPT-SZ, ACT DR6, SPT-3G, PSZ2 or eRASS1 (DES Y6 WaZP richness counts per deg^2 as the observed side only) - obs/pred ratio, per-bin pulls, and a Poisson sigma8 profile; with the completeness/mass-calibration caveats
clusters-tourFive-minute all-local tour of the cluster server - fetch catalogues (SZ, X-ray, DES Y6 WaZP optical), M500-z overlay, sky map, counts, crossmatch, mass calibration, selection functions, WL profiles + NFW WL masses, LCDM prediction; one call per tool family with expected numbers
hpc-dispatch-handoffRun this server's heavy kernels (likelihood scans, fits, large downloads + reductions) on ALCF Polaris or NERSC Perlmutter through the hep-genesis IRI engine - client-side pack export (hosted) or server-side set_dispatch (own machine)
multi-survey-mass-redshiftReproduce the classic SZ/X-ray cluster mass-redshift comparison figure (SPT Bleem+15 Fig. 6 style) - SPT-SZ, SPTpol, SPT-3G, ACT DR6, Planck PSZ2 and eRASS1 on one M500-z plane, with completeness-threshold annotations and the mass-convention caveats
selection-function-forward-modelRecipe to extract selection functions and use them alongside LCDM counts - Planck PSZ2 completeness to show how the mass limit varies with z and theta, ACT tile noise, SPT field corrections, plus WL shear profiles
sz-xray-crossmatchCross-match SZ catalogues (ACT DR6, SPT-SZ, SPT-3G, Planck PSZ2) with each other and with eROSITA eRASS1, and quantify relative mass calibration (median M500 ratio, log scatter, z trend, slope) - recovers the Planck hydrostatic bias 1-b~0.8

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 22 tools

Disambiguation5/5

Each tool targets a distinct resource or analysis step: catalog fetching, column description, sky/mass plots, counts, crossmatching, WL fitting, selection functions, predictions, and dispatch control. Fetch-like tools are clearly separated by data type (catalog, selection function, WL profiles), and observed vs predicted counts are explicitly distinguished.

Naming Consistency4/5

Most names follow a predictable verb_noun snake_case pattern (fetch_cluster_catalog, compute_cluster_counts, plot_mass_redshift, crossmatch_catalogs). Minor deviations exist: auth_status is noun-only, and cluster/clusters pluralization varies, but the convention remains readable and consistent overall.

Tool Count3/5

With 22 tools, the surface is above the ideal 3-15 range and feels heavy, though most tools have a clear specialized role. The inclusion of skills, dispatch, and many analysis/plotting tools makes it broad but borderline for a single MCP server.

Completeness4/5

The server covers the core cluster-catalog lifecycle: list/describe datasets, fetch catalogs, inspect columns, plot, count, crossmatch, compare mass calibration, fit WL masses, model selection functions, and predict LCDM counts. Minor gaps remain, such as no obvious tool for reading summary statistics or published chains despite listing them as dataset products.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues