Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MNE_MCP_CONFIGNoPath to configuration file (default: ~/.mne-mcp/config.json)
MNE_MCP_TIMEOUTNoPer-operation timeout in seconds; raise for ICA/TFR/large files300
MNE_MCP_DATA_DIRNoDefault directory that mne_list_files scans
MNE_MCP_RESULTS_DIRNoDirectory where figures and exported objects are saved

Instructions

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

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
mne_check_statusA

Check MNE MCP capabilities: MNE-Python version, scikit-learn (needed for ICA), numpy/scipy/matplotlib versions, and runtime directories. Call this first.

mne_install_backendA

Provision the analysis backend (MNE-Python + numpy/scipy/matplotlib/pandas, plus scikit-learn for ICA) into this server's own Python environment, on demand. Call this once when mne_check_status reports the backend is not installed; afterwards every mne_* tool works with NO client restart. profile: 'ica' (default), 'analysis' (no scikit-learn), or 'full' (adds source localization, connectivity, decoding, BIDS, extra file readers). The first run downloads a large scientific stack and may take a few minutes.

mne_get_configA

Show the configured default analysis parameters (line frequency, default montage, filter band, rejection threshold, ICA method/components, epoch window, dirs, timeout) that the structured tools fall back to when a parameter is omitted. Users change these by running mne-mcp configure in a terminal.

mne_session_infoA

List every object currently held in the persistent analysis session (raw recordings, epochs, evoked, ICA, events, arrays) with a one-line summary. Use this to see what is loaded before operating on it.

mne_describeA

Show a detailed summary of one named session object (channels, sfreq, montage, bads, etc.).

mne_get_infoA

Show the full channel list and measurement info for a named session object.

mne_reset_sessionA

Clear all loaded objects and figures from the session, starting fresh. Irreversible.

mne_run_codeA

Execute arbitrary Python/MNE code in the persistent session namespace. Pre-bound names: mne, np, pd, plt, plus every object you have loaded (e.g. raw, epochs, evoked, ica). Like a notebook cell: the value of a final expression is returned, stdout is captured, and any matplotlib figures are saved as PNG (paths returned). Use this for anything the structured tools do not cover.

mne_list_filesA

List neurophysiology data files (.fif, .edf, .bdf, .vhdr, .set, .cnt, .egi/.mff, .ds, .snirf, …) under a directory. Defaults to MNE_MCP_DATA_DIR / current dir. Optionally pass a glob pattern.

mne_load_rawA

Load a raw recording from disk into the session. Auto-detects the format by extension (FIF/EDF/BDF/BrainVision/EEGLAB/CNT/EGI/…). Stores it under name (default raw). Set preload=False for very large files.

mne_filterA

Band-pass / high-pass / low-pass and/or notch filter a Raw/Epochs/Evoked object in place. l_freq=high-pass edge, h_freq=low-pass edge (either may be null), notch=line-noise frequency (e.g. 50 or 60). picks optional ('eeg', 'meg', or null).

mne_resampleA

Resample a Raw/Epochs object to a new sampling frequency (Hz), in place.

mne_cropA

Crop a Raw/Epochs/Evoked object to the time window [tmin, tmax] seconds, in place.

mne_set_montageA

Apply a standard electrode montage (e.g. 'standard_1020', 'standard_1005', 'biosemi64', 'GSN-HydroCel-128') to set channel positions. Needed before topographic plots and interpolation. If montage is omitted, uses the configured default (set via mne-mcp configure).

mne_set_referenceA

Set the EEG reference. Use 'average' for average reference, 'REST', or a comma-separated list of channel names (e.g. 'TP9,TP10').

mne_mark_bad_channelsA

Mark channels as bad (comma-separated names, e.g. 'Fp1,T7'). By default appends to existing bads; set replace=true to overwrite.

mne_interpolate_badsC

Interpolate currently-marked bad channels using spherical splines (requires a montage).

mne_plot_psdB

Plot the power spectral density of a Raw/Epochs/Evoked object. Returns a PNG path.

mne_plot_rawB

Plot raw signal traces (a window of channels over time). Returns a PNG path.

mne_plot_sensorsB

Plot the sensor/electrode layout (kind='topomap' 2D or '3d'). Returns a PNG path.

mne_fit_icaA

Fit Independent Component Analysis on a (preferably 1 Hz high-pass filtered) Raw/Epochs object for artifact removal. n_components can be an int, a float (variance fraction), or null. method: 'fastica' (default), 'infomax', 'picard'. Stored under ica_name (default 'ica'). Requires scikit-learn.

mne_plot_ica_componentsA

Plot ICA component scalp topographies (to identify eye/heart/muscle artifacts). Returns PNG path(s).

mne_plot_ica_sourcesA

Plot ICA component time courses for an instrument (raw/epochs). Returns a PNG path.

mne_apply_icaA

Remove ICA components from an instrument in place. exclude = comma-separated component indices to drop (e.g. '0,3'); if omitted, uses the ICA object's current exclude list.

mne_find_eventsA

Find stimulus/trigger events on a stim channel of a Raw object. Stores them under events_name.

mne_events_from_annotationsB

Convert a Raw object's annotations into an events array + event_id map (for EDF/BrainVision/EEGLAB data).

mne_make_epochsA

Segment a Raw object into Epochs around events. tmin/tmax in seconds relative to the event; baseline 'default' = (None, 0); event_id like 'target:1,standard:2' to name/select conditions; reject_eeg = peak-to-peak EEG rejection threshold in volts (e.g. 100e-6). Stored under epochs_name.

mne_plot_epochs_imageB

Plot an ERP image (epochs × time heatmap) for an Epochs object. Returns PNG path(s).

mne_average_evokedA

Average Epochs into an Evoked (ERP/ERF) response. condition = an event_id name to average just that condition (else averages all). Stored under evoked_name.

mne_plot_evokedA

Plot an Evoked response. style: 'joint' (butterfly + topomaps, default), 'topo', or 'butterfly'. Returns PNG path.

mne_plot_topomapA

Plot scalp topographies of an Evoked at given times. times='auto', 'peaks', or comma-separated seconds (e.g. '0.1,0.2,0.3'). Returns PNG path.

mne_tfr_morletA

Compute Morlet-wavelet time-frequency power on Epochs and plot it. fmin/fmax = frequency range (Hz), n_freqs = number of frequencies. Stored under tfr_name. Returns PNG path.

mne_saveA

Save a session object to disk. MNE naming rules: Raw → '_raw.fif', Epochs → '-epo.fif', Evoked → '*-ave.fif'. Other formats follow the object's .save() support.

mne_decodeA

Time-resolved decoding (MVPA): train a classifier at each time point to discriminate two conditions, with cross-validation. cond_a/cond_b are event_id names (e.g. 'target','standard'). Returns mean/peak score over time + a scores-vs-time plot. Requires scikit-learn.

mne_connectivityB

Spectral connectivity between channels over Epochs in a frequency band. method: 'coh', 'plv', 'wpli', 'pli', 'imcoh', etc. Returns a channel×channel connectivity heatmap + strongest pairs. Requires mne-connectivity.

mne_compute_noise_covA

Compute a noise covariance matrix from the Epochs baseline (data up to tmax seconds, default 0). Needed before building an inverse operator for source localization.

mne_make_forwardA

Build a template-head (fsaverage) EEG forward model for the named object's montage. Downloads the fsaverage template once (~ tens of MB). Use for EEG source localization without an individual MRI. Stored under fwd_name.

mne_apply_inverseA

Estimate cortical sources from an Evoked using a forward model and noise covariance. method: 'dSPM' (default), 'MNE', 'sLORETA', 'eLORETA'. Stores the source estimate (stc) and reports the peak activation time. Pair with mne_make_forward + mne_compute_noise_cov.

mne_plot_source_estimateA

Render a source estimate (stc) as a cortical activation map (PNG) at its peak time or a given time. hemi: 'both' / 'lh' / 'rh'. Requires PyVista with off-screen rendering; if 3D rendering is unavailable the estimate is still computed and can be inspected via mne_run_code.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Exekiel179/MNE-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server