MNE-CPP is an open-source, cross-platform C++ framework for real-time and offline processing of functional brain imaging data: non-invasive MEG and EEG as well as invasive intracranial recordings (sEEG and ECoG). It provides modular libraries and ready-to-use applications — from data browsing and 3D visualization to real-time acquisition and source localization. For documentation please visit mne-cpp.github.io.
Understanding the language of the brain is one of the great scientific challenges of our time. Advances in artificial intelligence are opening new avenues to investigate how neural activity gives rise to perception, cognition and intention.
We believe that the knowledge we gain about the brain and the computational methods that enable its discovery should be openly accessible to everyone.
Our mission is to build an open computational foundation that brings together biophysical modelling, signal processing and artificial intelligence to understand, decode and interact with the brain in real time.
From investigating the principles of neural computation to developing adaptive experimental paradigms, brain–computer interfaces and closed-loop neurotechnology, we want to advance our understanding of the brain and contribute to restoring lost human abilities.
Bring your scientific questions, ideas, models and code. Let's build it together.
No install required — runs entirely in your browser via WebAssembly. Your data stays on your machine.
| Application | Description | Release | Nightly | |
|---|---|---|---|---|
| MNE Browse | Browse raw MEG/EEG data with filtering, events, averaging, ICA | Open | Open | |
| MNE Inspect | 3D visualization of brain surfaces, source estimates, forward models, and sEEG/ECoG electrodes | Open | Open |
| Application | Description |
|---|---|
| MNE Browse | Raw data browsing, filtering, event detection, averaging, ICA, and covariance computation |
| MNE Inspect | Interactive 3D visualization of brain surfaces, source estimates, forward models, and sEEG/ECoG implantations |
| MNE Scan | Real-time acquisition and processing pipeline — MEGIN, BabyMEG, BrainAmp, eegosports, gUSBAmp, TMSI, Natus, LSL, FieldTrip Buffer |
| MNE Analyze | Sensor- and source-level analysis: browsing, filtering, averaging, co-registration, dipole fitting, source localization |
| MNE Dipole Fit | Sequential equivalent current dipole fitting for focal brain activity |
| MNE Align | Co-registration wizard: head shape from a recorded or live Polhemus digitization to a head→MRI transform |
| MNE Anonymize | Removing personal information from FIFF files, with a GUI and on the command line |
MNE Analyze Studio is retired in 3.0: its agent workflows move to the command registry, MNA pipelines and the MCP gateway of the engine.
80+ command-line tools for BEM models, forward/inverse computation, data conversion, anonymization, acquisition and streaming — most of them C++ ports of the original MNE-C utilities.
MNE-CPP consists of 23 libraries in layers, described on the Library Architecture page. A library's name is its CMake component, its target and its include path: find_package(MNE-CPP COMPONENTS io dsp), MNE-CPP::io, #include <mne/io/io.h>.
| Area | Library | Contents, in MNE-Python terms |
|---|---|---|
| Foundation | base |
Errors, logging, JSON, CBOR and XML, threads, paths, command line (mne.utils) |
math |
Linear algebra, numerics, geometry | |
network |
TCP and UDP; the engine's control channel | |
pybridge |
Running Python and exchanging arrays with it | |
| Data model and formats | core |
The data model: Raw, Epochs, Evoked, Info, Covariance, Annotations, Transform, projections |
io |
The data model at rest: FIFF, EDF, BrainVision, BIDS (mne.io, MNE-BIDS) |
|
channels |
Layouts, montages (DigMontage), channel selections and derivations; sEEG and ECoG implantations (mne.channels) |
|
fs |
FreeSurfer surfaces, labels and annotations | |
mri |
MRI volumes and voxel geometry | |
| Acquisition | acq |
The data model in motion: devices and live streams in both directions, incl. LSL (MNE-LSL) |
acq_fiff |
Recording to FIFF and BIDS, FIFF replay | |
| Analysis | dsp |
Filtering, artefacts, ICA, xDAWN, SSS/tSSS, spectra and time–frequency (mne.filter, mne.preprocessing, mne.time_frequency) |
fwd |
Forward, SourceSpaces, BEM (mne.forward, mne.bem) |
|
inv |
InverseOperator (MNE, dSPM, sLORETA, eLORETA), LCMV/DICS beamformers, MxNE, RAP-MUSIC, dipole fit, HPI, source estimates (mne.minimum_norm, mne.beamformer, mne.inverse_sparse) |
|
connectivity |
Coherence, PLV, PLI, wPLI, Granger causality, DTF, PDC (MNE-Connectivity) | |
stats |
t-tests, F-tests, cluster permutation tests, covariance estimators (mne.stats) |
|
ml |
Model interface, tensors, training; CSP, SPoC, SSD (mne.decoding) |
|
ml_onnx |
ONNX Runtime backend of ml |
|
| Engine and projects | mna |
MNA projects: subjects, sessions, recordings, pipeline graphs |
engine |
Runs pipelines and live streams: executor, operation registry, stream nodes (EvokedStream, CovarianceStream), control channel |
|
| Visualization | viz |
Figures, views and GPU frames without a GUI toolkit; HTML reports (mne.viz, mne.Report) |
viz_qt |
Qt backend of viz: windows, plots and the 3D brain view (Metal, Vulkan, D3D, OpenGL through QRhi) |
|
viz_sdl |
SDL3 backend of viz |
The libraries need only Eigen, zlib (the system's, or built by the build) and the C++ standard library; the interface of acq is standard C++ only. Qt is needed only by viz_qt and the windows of the applications; the command-line tools build without it. The optional backends bring their own dependency: ONNX Runtime for ml_onnx, SDL3 for viz_sdl. See the API documentation and the examples.
# Linux / macOS
git clone --recursive https://github.com/mne-tools/mne-cpp.git && cd mne-cpp
./init.sh && cmake --build build/developer-dynamic --parallel# Windows
git clone --recursive https://github.com/mne-tools/mne-cpp.git && cd mne-cpp
.\init.bat
cmake --build build\developer-dynamic --parallelinit downloads Qt and Eigen into src/3rdparty/, then configures CMake. Run ./init.sh --help for all options (linkage, build type, custom Qt path, etc.).
CMake ≥ 3.21 and a C++23 compiler:
| Platform | Compiler |
|---|---|
| Windows | MSVC 2022+ |
| Linux | GCC ≥ 13 |
| macOS | Xcode ≥ 16 |
For the full build guide see the documentation.
If you want to contribute to MNE-CPP you can find all the information you need here.
Pre-built binaries for Windows, macOS, and Linux are available on the download page.
Free code signing provided by SignPath.io, certificate by SignPath Foundation.
Windows release binaries are built by GitHub Actions from this repository and submitted to SignPath for Authenticode signing; no request is signed without the manual approval of the signing approver. Team roles, the privacy statement and the current signing status are in the Code signing policy.
A list of contact persons can be found here.
MNE-CPP is licensed under the BSD-3-Clause license.