BCI-MCP Server
모델 컨텍스트 프로토콜(BCI-MCP)을 통한 뇌-컴퓨터 인터페이스
이 프로젝트는 BCI(뇌-컴퓨터 인터페이스) 기술과 MCP(모델 컨텍스트 프로토콜)를 통합하여 신경 신호 수집, 처리 및 AI 기반 상호작용을 위한 강력한 프레임워크를 구축합니다.
개요
BCI-MCP는 다음을 결합합니다.
뇌-컴퓨터 인터페이스(BCI) : 신경 신호의 실시간 수집 및 처리
모델 컨텍스트 프로토콜(MCP) : 표준화된 AI 커뮤니케이션 인터페이스
이러한 통합을 통해 의료, 접근성, 연구, 인간-컴퓨터 상호 작용 분야에서 고급 응용 프로그램이 가능해집니다.
Related MCP server: KOI-MCP Integration
주요 특징
BCI 핵심 기능
신경 신호 수집 : 뇌 활동으로부터 실시간으로 전기 신호를 수집합니다.
신호 처리 : 뇌 신호 전처리, 특징 추출 및 분류
명령 생성 : 해석된 뇌 신호를 명령으로 변환
피드백 메커니즘 : 사용자가 제어를 개선할 수 있도록 피드백을 제공합니다.
실시간 작업 : 지연을 최소화하여 뇌 활동을 처리합니다.
MCP 통합 기능
표준화된 컨텍스트 공유 : MCP를 사용하여 BCI 데이터를 AI 모델과 연결
도구 노출 : BCI 기능을 AI 애플리케이션에 사용 가능하게 만들기
구성 가능한 워크플로 : BCI 신호와 AI 처리를 결합한 복잡한 작업 구축
안전한 데이터 교환 : 개인 정보를 보호하는 신경 데이터 전송을 활성화합니다.
시스템 아키텍처
BCI-MCP 시스템은 다음과 같은 몇 가지 핵심 구성 요소로 구성됩니다.
지엑스피1
시작하기
필수 조건
파이썬 3.10+
호환 EEG 하드웨어(또는 테스트를 위해 시뮬레이션 모드 사용)
requirements.txt에 나열된 추가 종속성
설치
# Clone the repository
git clone https://github.com/enkhbold470/bci-mcp.git
cd bci-mcp
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtDocker 사용
더 쉽게 설정하려면 Docker를 사용할 수 있습니다.
# Build and start all services
docker-compose up -d
# Access the documentation at http://localhost:8000
# The MCP server will be available at ws://localhost:8765기본 사용법
# Start the MCP server
python src/main.py --server
# Or use the interactive console
python src/main.py --interactive
# List available EEG devices
python src/main.py --list-ports
# Record a 60-second BCI session
python src/main.py --port /dev/tty.usbmodem1101 --record 60고급 응용 프로그램
BCI-MCP 통합을 통해 다양한 최첨단 애플리케이션을 구현할 수 있습니다.
의료 및 접근성
보조 기술 : 이동 장애가 있는 개인이 장치를 제어할 수 있도록 지원
재활 : 실시간 피드백으로 신경학적 재활 지원
진단 도구 : 신경계 질환 진단에 도움
연구개발
신경과학 연구 : 뇌 기능 및 인지 연구 촉진
BCI 교육 : BCI 제어에 대한 학습 및 적응 가속화
프로토콜 개발 : 신경 데이터 교환을 위한 표준 수립
AI 강화 인터페이스
적응형 인터페이스 : 신경 신호와 AI 지원에 따라 조정되는 인터페이스
의도 인식 : 신경 신호를 통해 사용자 의도를 더 잘 이해
증강 의사소통 : 언어 장애가 있는 개인을 위한 향상된 의사소통
선적 서류 비치
프로젝트 문서는 GitHub Pages (https://enkhbold470.github.io/bci-mcp/) 에 호스팅됩니다.
문서 유지 관리
이 문서는 Material 테마를 적용한 MkDocs를 사용하여 작성되었습니다. 문서를 업데이트하려면 다음을 수행하세요.
main브랜치의docs/디렉토리에 있는 Markdown 파일을 변경합니다.변경 사항을
main브랜치에 커밋하고 푸시합니다.GitHub Actions 워크플로는 업데이트된 문서를 자동으로 빌드하고 GitHub Pages에 배포합니다.
로컬 문서 개발
로컬에서 문서를 사용하려면 다음을 수행하세요.
필요한 종속성을 설치하세요:
pip install mkdocs-material mkdocstrings mkdocstrings-python로컬 서버를 실행합니다.
mkdocs serve설명서는 http://localhost:8000 에서 확인하세요.
프로젝트 구조
.
├── docs/ # Documentation files
│ ├── api/ # API Documentation
│ ├── features/ # Feature Documentation
│ ├── getting-started/ # Getting Started Guides
│ └── index.md # Documentation Home Page
├── mkdocs.yml # MkDocs Configuration
└── .github/workflows/ # GitHub Actions Workflows기여하다
기여를 환영합니다! 풀 리퀘스트를 제출해 주세요.
저장소를 포크하세요
기능 브랜치를 생성합니다(
git checkout -b feature/amazing-feature)변경 사항을 커밋하세요(
git commit -m 'Add some amazing feature')브랜치에 푸시(
git push origin feature/amazing-feature)풀 리퀘스트 열기
특허
이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.
감사의 말
OpenBCI 프로젝트에서 영감을 받음
모델 컨텍스트 프로토콜 프레임워크 기반으로 구축됨
신경과학 및 AI 연구 커뮤니티에 감사드립니다.
연락하다
Enkhbold Ganbold - GitHub 프로필
Available Tools
14 toolscalibrateC
Capture a baseline so focus/calm/etc. are personalized to the wearer.
Inputs: seconds, condition.
connectB
Connect to an EEG device and start streaming. Default is the synthetic brain.
Inputs: device_uri.
disconnectA
Disconnect from the current EEG device.
Inputs: no named parameters.
get_band_powersB
Get absolute and relative EEG band powers (delta, theta, alpha, beta, gamma).
Inputs: no named parameters.
get_brain_stateA
Get the current brain state. Returns heuristic band-power proxy metrics
(focus, calm, attention, engagement, fatigue, meditation), band powers, and
signal quality. Each reading carries confidence (0..1), per-metric
metric_confidence, and a status ('ok'/'warming_up'/'unreliable') — weight
the metrics by these and do not interpret an unreliable/low-confidence
reading. Call get_metric_definitions to learn what each metric means.
Inputs: no named parameters.
get_metric_definitionsA
Explain each brain metric: its exact formula, the literature it draws on
(with DOIs under references), and an honest caveat. Call this to learn what
focus/calm/attention/engagement/fatigue/meditation actually measure and how
much to trust them — they are heuristic proxies, not validated cognitive
measurements. Cite a reference only for its role: a caveat source
contests the metric and must never be cited as support.
Inputs: no named parameters.
get_neurofeedback_scoreA
Sample the current neurofeedback score (in-zone now + cumulative %).
Inputs: no named parameters.
get_pipeline_limitationsA
What this pipeline can and cannot do: the exact analysis method (Welch PSD window, band edges, filters), a plain-English list of limitations (it averages transients out, is not clinical/qEEG, metrics are heuristic proxies, no source localization/connectivity), and its intended use. Read this before drawing any conclusion from the metrics — especially do not present them as clinical, diagnostic, or event-level (ERP/spindle) results.
Inputs: no named parameters.
get_signal_qualityA
Get electrode signal quality, reading confidence, and detected artifacts (blink, railing, emg, flatline).
Inputs: no named parameters.
list_devicesA
List EEG devices/URIs you can connect to.
Inputs: no named parameters.
mark_eventC
Annotate the live stream with a labeled event marker.
Inputs: label (required).
recordB
Record the live stream for N seconds to a file (npz/csv/edf).
Inputs: fmt, path, seconds.
start_neurofeedbackC
Begin a neurofeedback session rewarding time spent above a metric target.
Inputs: metric, target.
stream_summaryB
Current brain-state snapshot. (The seconds window for rolling stats arrives in a
later phase; this currently returns the live reading.)
Inputs: seconds.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Most tools target distinct actions, but get_brain_state, get_band_powers, get_signal_quality, and stream_summary overlap significantly because get_brain_state already bundles band powers, metrics, and signal quality. stream_summary is especially vague and its description admits it currently returns only the live reading, making it hard to distinguish from get_brain_state.
The set mostly follows a predictable snake_case pattern with clear verb/noun forms such as list_devices, get_brain_state, mark_event, and start_neurofeedback. Minor deviations are bare verbs like connect, disconnect, record, and calibrate, plus the noun-like stream_summary, but these remain readable and conventional for session lifecycle actions.
Fourteen tools is well-scoped for an EEG/BCI server that needs device lifecycle, signal inspection, calibration, events, recording, and neurofeedback. Each tool generally corresponds to a meaningful part of the live BCI workflow without excessive surface area.
The surface covers the core lifecycle: device discovery, connect/disconnect, signal and brain-state reads, calibration, event marking, recording, and neurofeedback start/score. Minor gaps remain, notably no explicit stop_neurofeedback or clear session-stop operation beyond disconnect, and marker/event retrieval is absent.
Maintenance
Related MCP Connectors
On-device human sensing for AI: EDNA ID continuity and live human context via MCP.
Real-time planetary signal engine and Model Context Protocol (MCP) server for autonomous AI agents.
AI, Synapse Work Royalties, Agent KV Memory, Deep Research, LLM, Vision, OCR & PDF MCP.
Cross-device AI memory with encrypted activity capture and context handoff between AI tools
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceFacilitates interaction and context sharing between AI models using the standardized Model Context Protocol (MCP) with features like interoperability, scalability, security, and flexibility across diverse AI systems.1-
- AlicenseNot gradedqualityNot gradedmaintenanceA bridging framework that integrates Knowledge Organization Infrastructure (KOI) with Model Context Protocol (MCP), enabling autonomous agents to exchange personality traits and expose capabilities as standardized tools.2MIT
- AlicenseNot gradedqualityDmaintenanceA Python framework that enables secure hardware control through the Model Context Protocol, allowing AI agents and automation systems to interact with physical devices across multiple platforms.5Apache 2.0
- AlicenseCqualityDmaintenanceIntegrates a bio-hybrid neuromorphic simulation pipeline with SNN, consciousness proxies, and bio-computing platform telemetry as MCP tools, resources, and prompts for AI assistants.482MIT