mne-mcp 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mne_mcp-0.2.0/.env.example +10 -0
- mne_mcp-0.2.0/.github/ISSUE_TEMPLATE/bug_report.md +22 -0
- mne_mcp-0.2.0/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- mne_mcp-0.2.0/.github/pull_request_template.md +15 -0
- mne_mcp-0.2.0/.github/workflows/ci.yml +89 -0
- mne_mcp-0.2.0/.github/workflows/release.yml +44 -0
- mne_mcp-0.2.0/.gitignore +34 -0
- mne_mcp-0.2.0/CHANGELOG.md +41 -0
- mne_mcp-0.2.0/CONTRIBUTING.md +75 -0
- mne_mcp-0.2.0/LICENSE +21 -0
- mne_mcp-0.2.0/PKG-INFO +333 -0
- mne_mcp-0.2.0/QUICK_START.md +82 -0
- mne_mcp-0.2.0/README.md +283 -0
- mne_mcp-0.2.0/README.zh-CN.md +273 -0
- mne_mcp-0.2.0/TOOLS_REFERENCE.md +139 -0
- mne_mcp-0.2.0/TOOLS_REFERENCE.zh-CN.md +135 -0
- mne_mcp-0.2.0/agents/mne-methodology-critic.md +81 -0
- mne_mcp-0.2.0/docs/INSTALL.docx +0 -0
- mne_mcp-0.2.0/docs/INSTALL.md +288 -0
- mne_mcp-0.2.0/docs/INTRODUCTION.docx +0 -0
- mne_mcp-0.2.0/docs/INTRODUCTION.md +175 -0
- mne_mcp-0.2.0/docs/USAGE.docx +0 -0
- mne_mcp-0.2.0/docs/USAGE.md +211 -0
- mne_mcp-0.2.0/paper/MNE-MCP_paper.md +323 -0
- mne_mcp-0.2.0/paper/MNE-MCP_/350/256/272/346/226/207_APA7.docx +0 -0
- mne_mcp-0.2.0/paper/MNE-MCP_/350/256/272/346/226/207_APA7.pdf +0 -0
- mne_mcp-0.2.0/paper/apa7_polish.py +209 -0
- mne_mcp-0.2.0/paper/make_figure1.py +65 -0
- mne_mcp-0.2.0/paper/media/figure1_architecture.png +0 -0
- mne_mcp-0.2.0/pyproject.toml +84 -0
- mne_mcp-0.2.0/scripts/install.ps1 +74 -0
- mne_mcp-0.2.0/scripts/install.sh +64 -0
- mne_mcp-0.2.0/skills/MNE_ANALYSIS_SUITE.md +79 -0
- mne_mcp-0.2.0/skills/mne-advanced/SKILL.md +147 -0
- mne_mcp-0.2.0/skills/mne-advanced/references/advanced-methods.md +160 -0
- mne_mcp-0.2.0/skills/mne-analyst/SKILL.md +89 -0
- mne_mcp-0.2.0/skills/mne-analyst/references/failure-patterns.md +51 -0
- mne_mcp-0.2.0/skills/mne-analyst/references/mne-mcp-tools.md +81 -0
- mne_mcp-0.2.0/skills/mne-analyst/references/mne-pipelines.md +107 -0
- mne_mcp-0.2.0/skills/mne-artifacts/SKILL.md +115 -0
- mne_mcp-0.2.0/skills/mne-artifacts/references/artifact-methods.md +127 -0
- mne_mcp-0.2.0/skills/mne-connectivity/SKILL.md +127 -0
- mne_mcp-0.2.0/skills/mne-connectivity/references/connectivity-methods.md +102 -0
- mne_mcp-0.2.0/skills/mne-decoding/SKILL.md +114 -0
- mne_mcp-0.2.0/skills/mne-decoding/references/decoding-methods.md +104 -0
- mne_mcp-0.2.0/skills/mne-erp/SKILL.md +135 -0
- mne_mcp-0.2.0/skills/mne-erp/references/erp-methods.md +126 -0
- mne_mcp-0.2.0/skills/mne-mcp-guard/SKILL.md +62 -0
- mne_mcp-0.2.0/skills/mne-mcp-guard/references/failure-patterns.md +31 -0
- mne_mcp-0.2.0/skills/mne-methodology-critic/SKILL.md +119 -0
- mne_mcp-0.2.0/skills/mne-methodology-critic/references/methodology-checklist.md +91 -0
- mne_mcp-0.2.0/skills/mne-preprocess/SKILL.md +153 -0
- mne_mcp-0.2.0/skills/mne-preprocess/references/preprocess-methods.md +135 -0
- mne_mcp-0.2.0/skills/mne-source/SKILL.md +143 -0
- mne_mcp-0.2.0/skills/mne-source/references/source-methods.md +107 -0
- mne_mcp-0.2.0/skills/mne-spectral/SKILL.md +135 -0
- mne_mcp-0.2.0/skills/mne-spectral/references/spectral-methods.md +88 -0
- mne_mcp-0.2.0/skills/mne-stats/SKILL.md +152 -0
- mne_mcp-0.2.0/skills/mne-stats/references/stats-methods.md +152 -0
- mne_mcp-0.2.0/skills/mne-timefreq/SKILL.md +125 -0
- mne_mcp-0.2.0/skills/mne-timefreq/references/timefreq-methods.md +100 -0
- mne_mcp-0.2.0/skills/mne-writeup/SKILL.md +82 -0
- mne_mcp-0.2.0/skills/mne-writeup/references/writeup-guide.md +70 -0
- mne_mcp-0.2.0/src/mne_mcp/__init__.py +10 -0
- mne_mcp-0.2.0/src/mne_mcp/_compat.py +58 -0
- mne_mcp-0.2.0/src/mne_mcp/_version.py +1 -0
- mne_mcp-0.2.0/src/mne_mcp/claude_config.py +364 -0
- mne_mcp-0.2.0/src/mne_mcp/cli.py +238 -0
- mne_mcp-0.2.0/src/mne_mcp/config.py +240 -0
- mne_mcp-0.2.0/src/mne_mcp/figures.py +82 -0
- mne_mcp-0.2.0/src/mne_mcp/kernel.py +231 -0
- mne_mcp-0.2.0/src/mne_mcp/operations.py +932 -0
- mne_mcp-0.2.0/src/mne_mcp/py.typed +1 -0
- mne_mcp-0.2.0/src/mne_mcp/server.py +774 -0
- mne_mcp-0.2.0/src/mne_mcp/summaries.py +181 -0
- mne_mcp-0.2.0/src/mne_mcp/wizard.py +148 -0
- mne_mcp-0.2.0/tests/smoke_eegbci.py +115 -0
- mne_mcp-0.2.0/tests/smoke_pipeline.py +131 -0
- mne_mcp-0.2.0/tests/test_claude_config.py +39 -0
- mne_mcp-0.2.0/tests/test_cli.py +40 -0
- mne_mcp-0.2.0/tests/test_client_config.py +83 -0
- mne_mcp-0.2.0/tests/test_config.py +37 -0
- mne_mcp-0.2.0/tests/test_kernel.py +68 -0
- mne_mcp-0.2.0/tests/test_operations.py +108 -0
- mne_mcp-0.2.0/tests/test_operations_more.py +131 -0
- mne_mcp-0.2.0/tests/test_regressions.py +90 -0
- mne_mcp-0.2.0/tests/test_server.py +29 -0
- mne_mcp-0.2.0/tests/test_wizard.py +74 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# MNE MCP configuration (optional). Copy to `.env` and edit.
|
|
2
|
+
|
|
3
|
+
# Per-operation timeout in seconds. Raise for ICA, time-frequency, large files.
|
|
4
|
+
MNE_MCP_TIMEOUT=300
|
|
5
|
+
|
|
6
|
+
# Where figures (PNG) and exported objects are saved.
|
|
7
|
+
# MNE_MCP_RESULTS_DIR=C:\Users\you\AppData\Local\Temp\mne-mcp\results
|
|
8
|
+
|
|
9
|
+
# Default directory that `mne_list_files` scans for data.
|
|
10
|
+
# MNE_MCP_DATA_DIR=F:\data\eeg
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Report a problem with the MNE-MCP server, a tool, or a skill
|
|
4
|
+
title: "[bug] "
|
|
5
|
+
labels: bug
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
**What happened**
|
|
9
|
+
A clear description of the bug and what you expected instead.
|
|
10
|
+
|
|
11
|
+
**Environment**
|
|
12
|
+
- OS:
|
|
13
|
+
- Python version:
|
|
14
|
+
- MNE-MCP version (`mne-mcp version`):
|
|
15
|
+
- `mne-mcp status` output (MNE / scikit-learn / numpy versions):
|
|
16
|
+
|
|
17
|
+
**To reproduce**
|
|
18
|
+
The tool call(s) or natural-language request, the recording format (FIF/EDF/BDF/…), and any error
|
|
19
|
+
message or traceback. For analysis issues, please include whether it reproduces via `mne_run_code`.
|
|
20
|
+
|
|
21
|
+
**Additional context**
|
|
22
|
+
Logs, screenshots of figures, or a minimal dataset if shareable.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest a new tool, analysis skill, or improvement
|
|
4
|
+
title: "[feat] "
|
|
5
|
+
labels: enhancement
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
**Problem / use case**
|
|
9
|
+
What neurophysiology workflow are you trying to support, and what is missing today?
|
|
10
|
+
|
|
11
|
+
**Proposed solution**
|
|
12
|
+
A new structured tool, an analysis skill, or a change to an existing one. If it's an analysis
|
|
13
|
+
method, note the MNE-Python API it would wrap.
|
|
14
|
+
|
|
15
|
+
**Alternatives**
|
|
16
|
+
Can this already be done via `mne_run_code`? If so, what would a dedicated tool/skill add?
|
|
17
|
+
|
|
18
|
+
**Additional context**
|
|
19
|
+
References, papers, or examples.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
## What & why
|
|
2
|
+
|
|
3
|
+
<!-- What does this change and why? Link any related issue. -->
|
|
4
|
+
|
|
5
|
+
## Changes
|
|
6
|
+
|
|
7
|
+
<!-- Bullet the notable changes. -->
|
|
8
|
+
|
|
9
|
+
## Checklist
|
|
10
|
+
|
|
11
|
+
- [ ] `pytest -q` passes locally
|
|
12
|
+
- [ ] `black src tests` and `isort --profile black src tests` are clean
|
|
13
|
+
- [ ] Added/updated tests (regression test for any bug fixed)
|
|
14
|
+
- [ ] Updated `CHANGELOG.md`
|
|
15
|
+
- [ ] Docs/README updated if behavior or tools changed
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ci-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
env:
|
|
15
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
unit:
|
|
19
|
+
name: unit · ${{ matrix.os }} · py${{ matrix.python }}
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
25
|
+
python: ["3.10", "3.12"]
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
|
+
- uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python }}
|
|
31
|
+
- run: python -m pip install --upgrade pip
|
|
32
|
+
- run: pip install -e ".[ica,dev]"
|
|
33
|
+
- name: Compile check
|
|
34
|
+
run: python -m compileall src/mne_mcp
|
|
35
|
+
- name: Unit tests (with coverage)
|
|
36
|
+
run: pytest -q --cov=mne_mcp --cov-report=term-missing --cov-fail-under=65
|
|
37
|
+
|
|
38
|
+
numpy-compat:
|
|
39
|
+
name: numpy compat · ${{ matrix.numpy }}
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
strategy:
|
|
42
|
+
fail-fast: false
|
|
43
|
+
matrix:
|
|
44
|
+
# Verify the package works on both the 1.x and 2.x NumPy lines. The 2.x leg is the
|
|
45
|
+
# regression guard for the alias bug (np.trapz/np.in1d removal) found on real data.
|
|
46
|
+
numpy: ["numpy>=1.26,<2", "numpy>=2.1"]
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/checkout@v4
|
|
49
|
+
- uses: actions/setup-python@v5
|
|
50
|
+
with:
|
|
51
|
+
python-version: "3.12"
|
|
52
|
+
- run: python -m pip install --upgrade pip
|
|
53
|
+
- run: pip install -e ".[ica,dev]"
|
|
54
|
+
- name: Pin NumPy line
|
|
55
|
+
run: pip install "${{ matrix.numpy }}"
|
|
56
|
+
- run: python -c "import numpy; print('NumPy', numpy.__version__)"
|
|
57
|
+
- name: Regression + unit tests
|
|
58
|
+
run: pytest -q
|
|
59
|
+
|
|
60
|
+
real-data-smoke:
|
|
61
|
+
name: real eegbci smoke · ubuntu · py3.12
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
timeout-minutes: 15
|
|
64
|
+
steps:
|
|
65
|
+
- uses: actions/checkout@v4
|
|
66
|
+
- uses: actions/setup-python@v5
|
|
67
|
+
with:
|
|
68
|
+
python-version: "3.12"
|
|
69
|
+
- name: Cache MNE datasets
|
|
70
|
+
uses: actions/cache@v4
|
|
71
|
+
with:
|
|
72
|
+
path: ~/mne_data
|
|
73
|
+
key: mne-eegbci-S001-r1r2
|
|
74
|
+
- run: python -m pip install --upgrade pip
|
|
75
|
+
- run: pip install -e ".[ica]"
|
|
76
|
+
- name: Real-data end-to-end (eyes-open vs eyes-closed alpha)
|
|
77
|
+
run: python tests/smoke_eegbci.py
|
|
78
|
+
|
|
79
|
+
lint:
|
|
80
|
+
name: lint (black + isort, check-only)
|
|
81
|
+
runs-on: ubuntu-latest
|
|
82
|
+
steps:
|
|
83
|
+
- uses: actions/checkout@v4
|
|
84
|
+
- uses: actions/setup-python@v5
|
|
85
|
+
with:
|
|
86
|
+
python-version: "3.12"
|
|
87
|
+
- run: pip install black isort
|
|
88
|
+
- run: black --check src tests
|
|
89
|
+
- run: isort --check-only --profile black src tests
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Build and publish to PyPI when a version tag is pushed.
|
|
4
|
+
# Publishing uses PyPI Trusted Publishing (OIDC) — configure the publisher once at
|
|
5
|
+
# https://pypi.org/manage/project/mne-mcp/settings/publishing/ (no stored token needed).
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
tags: ["v*"]
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
env:
|
|
13
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build:
|
|
17
|
+
name: build sdist + wheel
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.12"
|
|
24
|
+
- run: python -m pip install --upgrade pip build
|
|
25
|
+
- run: python -m build
|
|
26
|
+
- run: python -m pip install dist/*.whl && python -c "import mne_mcp; print(mne_mcp.__version__)"
|
|
27
|
+
- uses: actions/upload-artifact@v4
|
|
28
|
+
with:
|
|
29
|
+
name: dist
|
|
30
|
+
path: dist/
|
|
31
|
+
|
|
32
|
+
publish:
|
|
33
|
+
name: publish to PyPI (trusted publishing)
|
|
34
|
+
needs: build
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
permissions:
|
|
37
|
+
id-token: write # required for OIDC trusted publishing
|
|
38
|
+
contents: read
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/download-artifact@v4
|
|
41
|
+
with:
|
|
42
|
+
name: dist
|
|
43
|
+
path: dist/
|
|
44
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
mne_mcp-0.2.0/.gitignore
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
.pytest_cache/
|
|
9
|
+
.mypy_cache/
|
|
10
|
+
|
|
11
|
+
# Virtual environments
|
|
12
|
+
.venv/
|
|
13
|
+
venv/
|
|
14
|
+
env/
|
|
15
|
+
|
|
16
|
+
# Local config / secrets (ship .env.example, never .env)
|
|
17
|
+
.env
|
|
18
|
+
|
|
19
|
+
# Analysis outputs
|
|
20
|
+
mne_result/
|
|
21
|
+
*.spv
|
|
22
|
+
demo_study/
|
|
23
|
+
|
|
24
|
+
# MS Office lock files
|
|
25
|
+
~$*
|
|
26
|
+
|
|
27
|
+
# Reference material (input docs, not part of the package)
|
|
28
|
+
SPSS-MCP*.docx
|
|
29
|
+
|
|
30
|
+
# OS / editor
|
|
31
|
+
.DS_Store
|
|
32
|
+
Thumbs.db
|
|
33
|
+
.idea/
|
|
34
|
+
.vscode/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to MNE-MCP are documented here. The format loosely follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/); versions are pre-1.0 and may move quickly.
|
|
5
|
+
|
|
6
|
+
## [0.2.0] — 2026-06-05
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- Test **coverage** in CI (pytest-cov); CLI, server-layer, and broad operation-layer tests lift
|
|
10
|
+
coverage to ~71%, with a 65% regression floor.
|
|
11
|
+
- **`py.typed`** marker (PEP 561) — the package ships inline type hints.
|
|
12
|
+
- **`CONTRIBUTING.md`**, GitHub issue/PR templates, and a **`release.yml`** workflow that publishes
|
|
13
|
+
to PyPI via Trusted Publishing on a version tag.
|
|
14
|
+
- Opt GitHub Actions into **Node.js 24** (clears the Node 20 deprecation warning).
|
|
15
|
+
- **Continuous integration** (`.github/workflows/ci.yml`): unit tests on Linux/macOS/Windows ×
|
|
16
|
+
Python 3.10/3.12; a **NumPy 1.x / 2.x compatibility matrix**; a **real-data eegbci smoke test**;
|
|
17
|
+
and a black/isort lint job.
|
|
18
|
+
- **Real-data smoke test** (`tests/smoke_eegbci.py`): downloads PhysioNet eegbci S001 eyes-open vs
|
|
19
|
+
eyes-closed baselines and asserts the **Berger effect** (occipital alpha higher eyes-closed) end
|
|
20
|
+
to end through the operation layer — covering the real EDF-reading path the synthetic smoke test
|
|
21
|
+
never exercised.
|
|
22
|
+
- **Regression tests** (`tests/test_regressions.py`) for the two bugs fixed below.
|
|
23
|
+
- **Analysis skill suite** (`skills/`): `mne-methodology-critic` (shared methodology reviewer, also
|
|
24
|
+
shipped as a subagent in `agents/`), per-category skills (`mne-preprocess`, `mne-artifacts`,
|
|
25
|
+
`mne-erp`, `mne-spectral`, `mne-timefreq`, `mne-connectivity`, `mne-source`, `mne-decoding`,
|
|
26
|
+
`mne-stats`, `mne-advanced`), and `mne-writeup`; all installed by `mne-mcp setup`.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
- **NumPy 2.x compatibility** (`mne_mcp/_compat.py`, applied at package import): restore aliases
|
|
30
|
+
removed in NumPy ≥ 2.0 (`np.trapz`→`trapezoid`, `np.in1d`→`isin`, `np.row_stack`→`vstack`, …)
|
|
31
|
+
that a transitive dependency still calls while reading EDF. Previously this raised
|
|
32
|
+
`AttributeError` and **blocked all recording loads under NumPy 2.x**.
|
|
33
|
+
- **`picks` comma lists**: `plot_psd` / `plot_epochs_image` now accept `"O1,Oz,O2"` (split via
|
|
34
|
+
`operations._parse_picks`) instead of treating the whole string as one nonexistent channel.
|
|
35
|
+
- Docs: corrected the unit-test count in `docs/INTRODUCTION.md` (31 → 39).
|
|
36
|
+
|
|
37
|
+
## [0.1.0]
|
|
38
|
+
|
|
39
|
+
- Initial release: 38-tool MCP server for MNE-Python (EEG/MEG/sEEG/ECoG/fNIRS), persistent
|
|
40
|
+
in-memory session, `mne_run_code` escape hatch, one-command multi-client setup, and the
|
|
41
|
+
`mne-analyst` + `mne-mcp-guard` skills.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Contributing to MNE-MCP
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in improving MNE-MCP. This guide covers the dev setup, the test/lint
|
|
4
|
+
workflow, and how the project is released.
|
|
5
|
+
|
|
6
|
+
## Development setup
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
git clone https://github.com/Exekiel179/MNE-MCP.git
|
|
10
|
+
cd MNE-MCP
|
|
11
|
+
python -m venv .venv && . .venv/bin/activate # Windows: .venv\Scripts\activate
|
|
12
|
+
pip install -e ".[ica,dev]" # or ".[full,dev]" for the advanced tools
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`status` confirms the environment:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
mne-mcp status
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Tests
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pytest -q # fast unit tests (synthetic data, no downloads)
|
|
25
|
+
pytest -q --cov=mne_mcp --cov-report=term-missing # with coverage
|
|
26
|
+
python tests/smoke_pipeline.py # synthetic end-to-end smoke
|
|
27
|
+
python tests/smoke_eegbci.py # REAL-data smoke (downloads PhysioNet eegbci)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- Unit tests must stay fast and **offline** (synthetic data only).
|
|
31
|
+
- The real-data smoke (`smoke_eegbci.py`) downloads a small public dataset; it **skips cleanly** if
|
|
32
|
+
the network is unavailable so it never flakes CI.
|
|
33
|
+
- Advanced tools (connectivity, source, decoding) need the `[full]` extra; tests that require an
|
|
34
|
+
optional package guard it with `pytest.importorskip(...)`.
|
|
35
|
+
|
|
36
|
+
## Lint / formatting
|
|
37
|
+
|
|
38
|
+
The project uses **black** (line length 88) and **isort** (black profile). CI checks both:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
black src tests
|
|
42
|
+
isort --profile black src tests
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Adding an analysis skill
|
|
46
|
+
|
|
47
|
+
Analysis skills live in `skills/` and follow the suite contract documented in
|
|
48
|
+
`skills/MNE_ANALYSIS_SUITE.md`: a three-phase **GRILL → ANALYZE → CRITIC** workflow, with
|
|
49
|
+
methodology review delegated to `mne-methodology-critic`. Use `mne-spectral` as the template, keep
|
|
50
|
+
each skill self-contained (it is installed per-folder by `mne-mcp setup`), and add the skill name to
|
|
51
|
+
`SKILL_NAMES` in `src/mne_mcp/claude_config.py`.
|
|
52
|
+
|
|
53
|
+
## Continuous integration
|
|
54
|
+
|
|
55
|
+
`.github/workflows/ci.yml` runs on every push/PR to `main`:
|
|
56
|
+
|
|
57
|
+
- **unit** — Linux/macOS/Windows × Python 3.10/3.12 (with coverage)
|
|
58
|
+
- **numpy-compat** — NumPy 1.x and 2.x
|
|
59
|
+
- **real-data-smoke** — the eegbci Berger-effect end-to-end
|
|
60
|
+
- **lint** — black + isort
|
|
61
|
+
|
|
62
|
+
All jobs must be green to merge.
|
|
63
|
+
|
|
64
|
+
## Releasing
|
|
65
|
+
|
|
66
|
+
1. Update `CHANGELOG.md` and bump `src/mne_mcp/_version.py`.
|
|
67
|
+
2. Tag the release: `git tag v0.x.y && git push --tags`.
|
|
68
|
+
3. `.github/workflows/release.yml` builds the sdist/wheel and publishes to PyPI via
|
|
69
|
+
[Trusted Publishing](https://docs.pypi.org/trusted-publishers/) (configure the PyPI publisher for
|
|
70
|
+
this repo once, no stored token needed).
|
|
71
|
+
|
|
72
|
+
## Reporting issues
|
|
73
|
+
|
|
74
|
+
Use the issue templates under `.github/ISSUE_TEMPLATE/`. For analysis bugs, include the recording
|
|
75
|
+
format, the `mne_check_status` output, and the failing tool call.
|
mne_mcp-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MNE MCP Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|