|国家预印本平台
| 注册
首页|MNE-MCP:面向 AI 编程助手的神经电生理分析自动化系统

MNE-MCP:面向 AI 编程助手的神经电生理分析自动化系统

薛茎申 魏楚光 朱廷劭

MNE-MCP:面向 AI 编程助手的神经电生理分析自动化系统

MNE-MCP: An Automated Neurophysiological Analysis System for MCP-Compatible AI Coding Assistants

薛茎申 1魏楚光 1朱廷劭1

作者信息

  • 1. 中国科学院大学心理学系;中国科学院心理研究所
  • 折叠

摘要

本文提出 MNE-MCP,一个基于模型上下文协议(Model Context Protocol, MCP)的服务器,将支持 MCP 的 AI 编程助手(如 Claude Code、Codex、opencode)与开源神经电生理分析平台 MNE-Python 集成,使用户能以自然语言对话驱动 EEG、MEG、sEEG、ECoG 与 fNIRS 数据的分析。针对神经电生理分析“有状态、强可视化”的特点,系统基于 FastMCP 构建常驻内存会话,并为每个绘图工具实现“自动出图—AI 读图”闭环。服务器提供 38 个分为 9 类的工具,覆盖从数据读取、预处理、ICA、分段、ERP/ERF 叠加、时频到源定位、连接性与解码的完整流程。在工具层之上,系统配备了遵循“质询—分析—审查”流程的 Agent 技能,以及一个独立的方法学审查代理——后者在结果被采纳之前评估其方法学的有效性,以减少模型结论的偏误。本文介绍了系统的架构与设计,报告了端到端验证的结果,并讨论了其局限性和使用建议,旨在降低神经电生理分析的技术门槛并提高其可复现性。

Abstract

This paper presents MNE-MCP, a server based on the Model Context Protocol (MCP) that integrates MCP-compatible AI coding assistants (e.g., Claude Code, Codex, opencode) with MNE-Python, an open-source platform for neurophysiological data analysis, enabling users to drive analyses of electroencephalography (EEG), magnetoencephalography (MEG), stereo-EEG (sEEG), electrocorticography (ECoG), and functional near-infrared spectroscopy (fNIRS) data through natural-language dialogue. Addressing the stateful, visualization-intensive nature of neurophysiological analysis, the system builds a persistent in-memory session upon FastMCP and implements an automatic plottingAI figure interpretation loop for every visualization tool. The server provides 38 tools across nine categories, spanning the pipeline from data I/O, preprocessing, ICA, epoching, ERP/ERF averaging, and time-frequency analysis to source localization, connectivity, and decoding, with the general-purpose mne_run_code tool supporting arbitrary MNE code. Above the tool layer, the system provides agent Skills following a grillanalyzecritic workflow and an independent methodology-critic agent that adjudicates each result (PASS/REVISE/BLOCK) before adoption, mitigating the automation-bias risk of laundering researcher degrees of freedom into authoritative-sounding conclusions. We describe the architecture and design, report end-to-end validation, and discuss limitations and usage recommendations, aiming to lower the technical barrier of neurophysiological analysis and improve its reproducibility.

关键词

模型上下文协议/MNE-Python/脑电/脑磁/大语言模型

Key words

Model Context Protocol/MNE-Python/Electroencephalography/Magnetoencephalography/Large Language Model

引用本文复制引用

薛茎申,魏楚光,朱廷劭.MNE-MCP:面向 AI 编程助手的神经电生理分析自动化系统[EB/OL].(2026-06-06)[2026-06-10].https://chinaxiv.org/abs/202606.00065.

学科分类

生物科学研究方法、生物科学研究技术/计算技术、计算机技术
首发时间 2026-06-06
下载量:0
|
点击量:8
段落导航相关论文