MNE-Python neurophysiology analysis (EEG, MEG, sEEG, ECoG, fNIRS) via the Model Context Protocol
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag — we're steadily working through the catalog.
💡 Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
English | 简体中文
A Model Context Protocol (MCP) server that gives AI assistants direct, conversational access to MNE-Python for analyzing human neurophysiology data — EEG, MEG, sEEG, ECoG, and fNIRS.
Describe your analysis in plain language — MNE-MCP loads your recording, runs the MNE pipeline (filtering, ICA, epoching, ERP/ERF averaging, time-frequency, source-level work via code), saves the figures, and explains the results.
Works in Claude Code and opencode (any MCP-capable client). Pairs with bundled Agent Skills —
mne-analyst,mne-mcp-guard, plus a skeptical analysis suite (mne-methodology-critic+ per-category skills) for reliable, archived workflows.
MNE analysis is stateful and visual — unlike a one-shot statistics batch job:
Raw recording once, then filter → re-reference → fit ICA → epoch → average →
time-frequency, each step mutating large in-memory objects. MNE-MCP keeps one persistent
session so recordings never get re-loaded between steps.mne_run_code escape hatch that reaches the entire MNE API in the same live session.mne-mcp configure wizard.mne-mcp[analysis] if you preferscikit-learn for ICA (in the ica / full extras, or mne-mcp install-backend)Cross-platform: unlike a closed engine, MNE-Python is pure Python, so analysis tools work on Windows, macOS, and Linux.
Or run the one-shot installer (creates the venv, installs, verifies, registers, installs skills):
See QUICK_START.md for a guided first session, or docs/INSTALL.md for the full guide.
One command does everything:
mne-mcp setupregisters themneserver in Claude Code, Codex, and opencode (whichever you use) and installs the companion skills. Narrow it with--clients claude,codex. Themne_*tools require one client restart afterwards (MCP servers load at startup).
uvx / pipx (standard MCP — recommended)mne-mcp is published on PyPI, so the most portable path is the
standard MCP launcher — no clone, no setup. Add this to your client config (~/.claude.json for
Claude Code, claude_desktop_config.json for Claude Desktop):
uvx (from uv) fetches and runs mne-mcp on demand. The [ica] extra
pulls in scikit-learn so ICA works out of the box; swap it for mne-mcp[full] to also get the
advanced tools (source localization, connectivity, decoding, BIDS). Because MNE pulls in a large
scientific stack, a persistent install is usually snappier than re-resolving each run:
then set the config command to mne-mcp with args: ["serve", "--transport", "stdio"]. The source
install above remains the path for development.
No uv? Bootstrap pipx with plain Python, then install and register in one go:
Skills are bundled in the package (since 0.2.2). A PyPI install carries the skill suite and the
mne-methodology-criticagent, so one extra command installs them —mne-mcp setup(afterpipx/uv tool install) oruvx mne-mcp setup. No clone required.
Since 0.3.0 the package itself is tiny: a bare pip install mne-mcp / pipx install mne-mcp
pulls in only the MCP protocol layer (mcp, fastmcp, pydantic, python-dotenv), so it installs
in seconds. The heavy scientific stack (MNE-Python + numpy/scipy/matplotlib/pandas, and scikit-learn
for ICA) is provisioned the first time an analysis needs it:
mne_install_backend
tool (or it is offered by mne_check_status). It pip installs into the server's own environment and
becomes usable without a client restart.mne-mcp install-backend (add --profile full for source localization / connectivity
/ decoding / BIDS).Prefer everything up front? Install an extra instead: mne-mcp[analysis] (MNE core), [ica]
(+ scikit-learn), or [full] (+ advanced tools). For ephemeral uvx runs, pin the extra in the
config (--from mne-mcp[ica], as above) since an uvx environment is discarded between runs, so an
on-demand install would not persist.
setup registers the mne server in each client and installs the skills, writing a timestamped
backup of any file it touches:
| Client | Config file | Key |
|---|---|---|
| Claude Code | ~/.claude.json | mcpServers.mne |
| OpenAI Codex CLI | ~/.codex/config.toml | [mcp_servers.mne] |
| opencode | ~/.config/opencode/opencode.json | mcp.mne |
Point command at the Python where you installed the package (or mne-mcp if it is on PATH).
Claude Code — ~/.claude.json:
Codex CLI — ~/.codex/config.toml:
opencode — ~/.config/opencode/opencode.json:
.env)Set the defaults the structured tools fall back to — mains line frequency (50/60 Hz), default montage, filter band, EEG rejection threshold, ICA method/components, epoch window, directories, and timeout:
Defaults are saved to ~/.mne-mcp/config.json (override path with MNE_MCP_CONFIG). Precedence at
runtime: environment variable > config file > built-in. View the active config in-session with the
mne_get_config tool. Restart the MCP server for changes to take effect.
mne-mcp setup installs all bundled skills automatically. To do it by hand, copy every folder under
skills/ into your skills dir — the suite is mne-analyst, mne-mcp-guard, mne-methodology-critic,
plus the per-category analysis skills (mne-preprocess, mne-artifacts, mne-erp, mne-spectral,
mne-timefreq, mne-connectivity, mne-source, mne-decoding, mne-stats, mne-advanced) and the
write-up skill (mne-writeup):
mne-mcp setupalso installs themne-methodology-criticsubagent to~/.claude/agents/(the skills' Phase 3 dispatches it in an isolated context). Copyagents\mne-methodology-critic.mdthere by hand if installing manually.
Restart your client after installation. (Skills are a Claude Code feature; Codex / opencode use the MCP server directly.)
Just describe what you want:
The assistant will:
mne_check_status)mne_result/Every plotting tool saves a PNG to the results dir and returns its path:
With the mne-analyst skill installed, results and the exact MNE code that produced them are
archived to mne_result/ in your working directory (sequence-numbered), so the analysis is
fully reproducible.
mne_check_status · mne_session_info · mne_describe · mne_get_info ·
mne_reset_session · mne_run_code · mne_get_config
mne_list_files · mne_load_raw
mne_filter · mne_resample · mne_crop · mne_set_montage ·
mne_set_reference · mne_mark_bad_channels · mne_interpolate_bads
mne_plot_psd · mne_plot_raw · mne_plot_sensors
mne_fit_ica · mne_plot_ica_components · mne_plot_ica_sources · mne_apply_ica
mne_find_events · mne_events_from_annotations · mne_make_epochs ·
mne_plot_epochs_image · mne_average_evoked · mne_plot_evoked · mne_plot_topomap
mne_tfr_morlet
mne_decode (MVPA) · mne_connectivity · mne_compute_noise_cov · mne_make_forward ·
mne_apply_inverse · mne_plot_source_estimate
mne_save
Anything still not covered — BIDS, custom statistics, beamformers, autoreject — is reachable through
mne_run_code in the same live session. See TOOLS_REFERENCE.md for full
parameter details. Advanced tools need the [full] extra (pip install -e ".[full]").
MIT — see LICENSE
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mne-mcp)<a href="https://allmcps.com/mcp/mne-mcp"><img src="https://allmcps.com/api/badge/mne-mcp?style=directory" alt="MNE MCP on AllMCPs" /></a>