Install
$ agentstack add skill-exekiel179-mne-mcp-mne-artifacts ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
MNE Artifact Correction (grill → analyze → critic)
Artifact correction of neurophysiology data via the MNE MCP server. This skill is skeptical by design: a bad decontamination runs without any error — ICA happily over-fits, removes neural signal, or is fit on the wrong data — so the discipline is to grill the artifact inventory before cleaning and critique the cleaned data before believing.
> Companion skills: mne-mcp-guard for technical execution safety (ICA convergence, units); and > mne-methodology-critic for Phase 3. Loaded objects persist in one MNE session.
PHASE 1 — GRILL (before cleaning anything)
Do not fit ICA or reject anything until these are answered. If the user can't answer one, propose a sensible default and explicitly flag the open risk — never silently choose.
Artifact inventory & claim
- Which artifacts are actually present — blink, saccade, ECG, muscle, line noise, electrode pop,
drift? (Look first; don't assume.) Do EOG/ECG reference channels exist?
- What downstream analysis is this for, and could cleaning bias the comparison? (e.g. removing an
ECG component differently across groups)
The two questions that decide validity
- Is ICA fit on a ~1 Hz high-passed COPY? ICA assumes stationarity; slow drifts make components
unstable. Fit on a 1 Hz high-passed copy, then apply the unmixing to the 0.1 Hz data you actually analyze. (This is the single most common fatal error here.)
- Is
n_components≤ the data rank? Asking for more components than the rank yields unstable,
uninterpretable components. ⚠️ An average reference and each interpolated channel REDUCE rank by ≥1 — count them.
Identification & selection
- How are artifact components identified — objectively (EOG/ECG correlation, ICLabel) or **by
eye**? Subjective selection is not reproducible.
- How many components removed, and is the rule fixed across subjects (same threshold/labeller),
or hand-picked per subject?
Bias & reporting (pin this down NOW)
- Will the artifact rate differ across groups/conditions (clinical vs control blink rates;
high- vs low-load muscle)? Differential cleaning manufactures effects.
- Over-cleaning: how do you guard against removing neural signal (e.g. an occipital alpha or a
genuine frontal component)?
- Plan to report n components removed, the labelling method, and per-group rejection rates.
PHASE 2 — ANALYZE
- Capability + look first.
mne_check_status;mne_plot_rawand read the PNG — confirm
which artifacts are present (blinks, heartbeat, muscle bursts, line noise) before deciding.
- High-pass a copy for fitting (do not high-pass the data you analyze):
``python raw_for_ica = raw.copy().filter(l_freq=1.0, h_freq=None) # ICA-only copy ``
- Fit ICA on the copy, with
n_components≤ rank. Use the structured tool, ormne_run_code
when you need the copy / rank control: mne_fit_ica(name="raw_for_ica", n_components=0.99, method="picard"). (fastica/infomax/picard; pass random_state for reproducibility.)
- Plot and read the components.
mne_plot_ica_components(scalp topographies) and
mne_plot_ica_sources (time courses) — read both PNGs: blink = frontal topo + slow square waves; ECG = ~1 Hz periodic spikes; muscle = high-freq edge/temporal; line = narrowband.
- Identify objectively, not by eye (via
mne_run_code): correlate with EOG/ECG channels, or
label with ICLabel:
``python eog_idx, _ = ica.find_bads_eog(raw) # needs an EOG channel (or by name) ecg_idx, _ = ica.find_bads_ecg(raw, method="correlation") ica.exclude = sorted(set(eog_idx + ecg_idx)) # automatic labelling (extra deps): from mne_icalabel import label_components # labels = label_components(raw_for_ica, ica, method="iclabel") ``
- Exclude and apply to the 0.1 Hz data (not the high-passed copy):
mne_apply_ica(ica_name="ica", inst_name="raw", exclude="0,3").
- Alternatives where appropriate — SSP (project out a blink/ECG subspace), or autoreject
(automated per-channel epoch thresholds / interpolation). Both via mne_run_code and need extra deps from the [full] extra (autoreject, mne-icalabel).
- Archive the equivalent code + figures, and report n components removed (the
mne-analyst
archiving convention).
Best-practice reminders: fit on the 1 Hz copy, apply to the 0.1 Hz data; count avg-ref/interp toward rank; use a fixed, objective selection rule across subjects; report per-group rejection.
PHASE 3 — CRITIC (before believing the cleaned data)
Hand the plan + cleaned data to mne-methodology-critic (invoke the skill, or dispatch it as a subagent with references/methodology-checklist.md). For artifact work it will specifically check:
- ICA fit on non-high-passed data (unstable components);
n_components> data rank (avg-ref / interpolated channels reduce rank by ≥1);- subjective / inconsistent component selection vs objective (EOG/ECG/ICLabel);
- over-cleaning that removes neural signal;
- differential rejection between conditions/groups manufacturing an effect;
- not reporting the number of components removed or the labelling method.
Report its BLOCK / REVISE / PASS verdict to the user and act on it before stating conclusions.
See references/artifact-methods.md for deeper recipes (ICA prerequisites & rank, fastica/infomax/ picard, component identification, ICLabel, SSP, autoreject, and regression EOG).
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Exekiel179
- Source: Exekiel179/MNE-MCP
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.