Skip to main content
Glama

PubFigure & ClusterCraft — Open-Source Python SDK & Local MCP Server

Web Workbench License: MIT

Open-source Python Matplotlib SDK (pubfigure) and 100% local, zero-upload Model Context Protocol (MCP) Server (clustercraft-mcp) for researchers, PhD students, and HPC/AI labs.


1. Local MCP Server (clustercraft-mcp) — 8 Deterministic Scientific Tools

Stop AI coding agents from hallucinating #SBATCH directives, QOS walltime limits, nonlinear curve fits, or p-values. Runs 100% locally over stdio with zero runtime dependencies and zero telemetry:

  1. list_cluster_profiles — Specs for 13 global supercomputers (Taiwan NCHC Nano5 H100 / Taiwania 2 / Forerunner 1, Canada DRAC 2026 Fir/Nibi/Rorqual/Trillium/Narval, USA NERSC Perlmutter / TACC Vista ibrun / NCSA Delta, EuroHPC JUWELS Booster).

  2. lint_sbatch_script — Pre-submission .sbatch validator (GPU directives, walltime/RAM QOS limits, offline compute-node HF_HUB_OFFLINE=1 / WANDB_MODE=offline traps, TACC ibrun, DRAC Conda-on-Lustre checks).

  3. generate_slurm_script — Validated .sbatch generator with torchrun DDP, MPI, job arrays, $SLURM_TMPDIR staging, and 24h --requeue checkpoint chains.

  4. diagnose_slurm_log — 12 offline diagnostic rules (OOM Exit 137 + MaxRSS patch, PyTorch /dev/shm SIGBUS, CUDA VRAM OOM, NCCL timeout, seff efficiency) + unified diff.

  5. audit_lab_sacct — Bulk sacct -P lab GPU/RAM waste auditor.

  6. analyze_grouped_statistics — Exact One-Way ANOVA + Welch's t-test / Student's t-test / Mann–Whitney U with Holm–Bonferroni correction + ready-to-paste Methods boilerplate.

  7. fit_scientific_curve — Safe zero-eval() weighted Levenberg–Marquardt (1/σ²) nonlinear regression (10 curated models including 4PL Hill IC50, Michaelis–Menten, Lorentzian/Gaussian peaks, power law, or custom formula y = f(x)).

  8. render_publication_figure — Compiles grouped or XY CSV data + any of 42 journal specs (Nature, Science, Cell, JAMA, Elsevier, Springer, AIP, IOP, Optica, ASME, ASCE, APA 7th, SAGE, MDPI, Frontiers, A4 Thesis) into true-vector SVG and reproducible Matplotlib + SciPy Python code.

Quick Setup (Cursor / Claude Desktop / Claude Code / Antigravity)

git clone https://github.com/youxunzhangjim-netizen/pubfigure-mcp.git

Add to mcp_config.json / .cursor/mcp.json:

{
  "mcpServers": {
    "clustercraft": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/pubfigure-mcp/mcp-server/dist/clustercraft-mcp.mjs"]
    }
  }
}

Or deploy directly via Smithery (smithery.yaml) or Glama (glama.json + Dockerfile).


Related MCP server: grant-mcp

2. Python SDK (pubfigure) — 42 Journal Presets + Curve Fitting for Matplotlib

pip install pubfigure
# or from source:
pip install -e ./python
import pubfigure as pf

fig = pf.Figure(journal="nature-single", palette="npg-nature")
fit = fig[0].fit(
    x=[0.01, 0.03, 0.1, 0.3, 1.0, 3.0, 10.0, 30.0],
    y=[99.2, 97.5, 91.8, 76.4, 49.8, 25.6, 12.4, 8.1],
    yerr=[2.1, 2.4, 2.8, 3.2, 3.0, 2.5, 1.9, 1.6],
    preset="hill_4pl",
    log_x=True,
    label="Kinase Inhibitor",
)
fig[0].set_labels(title="Dose-Response", xlabel="Conc. (µM)", ylabel="Viability (%)")
fig.save("fig1_nature_89mm.pdf")
fig.save_workspace("fig1_workspace.json")  # Round-trips directly into the PubFigure Web UI!
print(fit.methods_sentence)

See python/README.md and mcp-server/README.md for full API docs.


Built by YFind Digital Studio.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      Not graded
      maintenance
      Provides comprehensive access to NCBI's PubMed database of over 36 million biomedical citations, allowing users to search, retrieve, and analyze literature directly through MCP tools. It supports advanced queries, citation management, full-text retrieval from PubMed Central, and precise discovery using MeSH terms.
      16
      16
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      MCP server for searching research grants across NSF (US), ERC (EU), and KRF/NRF (Korea) via a unified interface. NIH excluded—covered by existing connectors.
      3
      7 npm
      MIT
    • A
      license
      C
      quality
      A
      maintenance
      MCP server for searching, importing, and materializing scientific figure templates from FigureYa and user libraries, enabling data-driven figure selection via visual/data profiling.
      62
      233 npm
      142
      MIT