BCI-MCP Server
Provides containerized deployment of the BCI-MCP system with all necessary services, making setup easier through docker-compose
Hosts the project repository for version control and collaboration
Automates the building and deployment of documentation to GitHub Pages when changes are pushed to the main branch
Hosts the project documentation, automatically built and deployed through GitHub Actions
Provides the runtime environment for the BCI-MCP server, with special requirements for version 3.10+
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@BCI-MCP Serverstart recording my brain signals for 30 seconds"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
https://github.com/user-attachments/assets/8b37cebc-2b6b-40de-b440-b02ffb9b617e
BCI-MCP
Ask Claude about your brain. Focus, calm, attention. Works without a headset.
Real Model Context Protocol server for EEG. Python on the backend. Plug into Claude Desktop, Claude Code, or Cursor.
$ bci-mcp stream --device synthetic://
FOCUS ##############...... 0.71
CALM ######.............. 0.32
ATTENTION #################... 0.86
ENGAGEMENT ##############...... 0.70
alpha #### beta ####### theta ## delta # gamma ### signal: GOODContents
Related MCP server: KOI-MCP Integration
What this is
You have an EEG signal. This turns it into numbers Claude can read: focus, calm, attention, band powers, signal quality. Basically a small brain-computer interface server that stays out of your way.
No headset yet? Use the built-in fake brain (synthetic://). Same code path as real hardware. You can test the whole MCP stack before you buy anything.
Sources that work today:
Synthetic demo (no hardware)
NeuroFocus (serial or BLE)
LSL streams
Generic serial
Recorded sessions (replay from file)
Try it in one line
Claude Code
claude mcp add bci-mcp -- npx -y bci-mcpNo Node? Use Python:
claude mcp add bci-mcp -- uvx bci-mcp serveOr let the install script pick for you:
curl -fsSL https://raw.githubusercontent.com/enkhbold470/bci-mcp/main/scripts/install-mcp.sh | bashClaude Desktop (Settings → Developer → Edit Config):
{
"mcpServers": {
"bci-mcp": {
"command": "npx",
"args": ["-y", "bci-mcp"]
}
}
}Cursor (~/.cursor/mcp.json, under mcpServers):
"bci-mcp": { "command": "npx", "args": ["-y", "bci-mcp"] }Then ask something like: Connect to the demo brain. What's my focus right now?
Published packages: pip install bci-mcp (PyPI) and npx -y bci-mcp (npm).
Deploy on Manufact Cloud
Host a public MCP endpoint on Manufact Cloud (formerly mcp-use). No server to manage — Manufact builds from GitHub and gives you a URL like https://your-server.run.mcp-use.com/mcp.
1. Deploy from GitHub
Go to manufact.com/cloud and sign in.
New server → Deploy from GitHub.
Select this repo:
enkhbold470/bci-mcp, branchmain.Manufact detects Python and the FastMCP stack automatically.
Or use the CLI (after npm i -g mcp-use and mcp-use login):
git push origin main # Manufact builds from GitHub, not your laptop
mcp-use deploy --runtime python --port 80002. Dashboard settings (important)
Use these values in the Manufact deploy form. Getting the build/start commands wrong is the most common failure mode.
Setting | Value |
Port |
|
Build command | (leave empty) |
Start command | (leave empty) — Manufact auto-starts |
If auto-detect fails, set the start command explicitly:
uvicorn bci_mcp:app --host 0.0.0.0 --port 8000Do not set a custom build command like uv sync — Manufact runs that for you.
Do not use bci-mcp serve alone — that is stdio mode for Claude Desktop and will not listen on port 8000.
3. Verify the deployment
After the build succeeds, check:
curl https://YOUR-SLUG.run.mcp-use.com/health
# → {"status":"healthy"}Your MCP endpoint:
https://YOUR-SLUG.run.mcp-use.com/mcp4. Connect an MCP client
Claude Desktop / Cursor — add a remote MCP server (streamable HTTP):
{
"mcpServers": {
"bci-mcp-cloud": {
"url": "https://YOUR-SLUG.run.mcp-use.com/mcp"
}
}
}Then ask: Connect to the demo brain — what's my focus?
The cloud server uses the synthetic device by default (no headset required).
What Manufact runs under the hood
GitHub repo
→ uv sync --frozen --no-dev (needs uv.lock in the repo — do not .dockerignore it)
→ uvicorn bci_mcp:app (streamable HTTP at /mcp, health at /health)
→ port 8000Repo files that matter for Manufact:
File | Purpose |
| Reproducible build ( |
| Exports |
| Documented deploy hints (reference only) |
| Alternative start script if you need it |
Troubleshooting
Symptom | Fix |
| Ensure |
| Pull latest |
| Start command must be HTTP ( |
| Clear both build and start commands to use auto-build, or clear start only to use the repo Dockerfile (stdio — not recommended for Manufact). |
Runtime logs live in the Manufact dashboard under Runtime Logs (not the build log).
Quickstart from source
Cloning the repo:
git clone https://github.com/enkhbold470/bci-mcp.git
cd bci-mcp
pip install -e ".[all,dev]"
bci-mcp stream --device synthetic://
bci-mcp dashboard # http://127.0.0.1:8000Record and replay:
bci-mcp record --device synthetic:// --seconds 30 --out session.npz
bci-mcp play session.npzNeurofeedback on one metric:
bci-mcp neurofeedback --device synthetic:// --metric focus --target 0.7Devices
One URI scheme for everything:
Device | URI | Extra install |
Synthetic (no hardware) |
| core |
NeuroFocus v4 (USB) |
|
|
NeuroFocus v4 (BLE) |
|
|
OpenBCI Cyton / Ganglion |
|
|
Muse 2 / S |
|
|
Any LSL stream |
|
|
Generic serial |
|
|
Recording replay |
| core |
Talk to Claude
Example after MCP is connected:
You: What's my focus level?
Claude: (calls get_brain_state) Focus 0.71, calm 0.32, attention 0.86. Signal looks good.
You: Run 60 seconds of neurofeedback on calm and tell me how I did.
Claude: (calls start_neurofeedback, then get_neurofeedback_score)
Mean calm 0.58, time in target 41%, best streak 9s.If you installed with pip install bci-mcp and want the binary directly in Desktop config:
{
"mcpServers": {
"bci-mcp": {
"command": "bci-mcp",
"args": ["serve"]
}
}
}Restart Claude after editing config. Check /mcp in Claude Code or the plug icon in Desktop.
MCP tools
Stdio server built with FastMCP (official MCP Python SDK).
Tools: list_devices, connect, disconnect, get_brain_state, get_band_powers, get_signal_quality, calibrate, record, start_neurofeedback, get_neurofeedback_score, mark_event, stream_summary
Resources: brain://state, brain://device
Prompt: interpret_brain_state
What's in the box
Part | What it does |
Devices | URI registry: synthetic, NeuroFocus, BrainFlow (OpenBCI/Muse), LSL, serial, playback |
MCP server | FastMCP over stdio. Drops into Claude Desktop / Code / Cursor |
DSP | Bandpass, notch, Welch band powers, focus/calm/attention/etc., signal quality |
CLI |
|
Extras | Web dashboard, neurofeedback trainer, record to CSV/npz/EDF, LSL publisher |
Tests | Hardware-free CI (synthetic, playback, in-process LSL). Python 3.10–3.12 |
How it fits together
EEG device -> Device (synthetic | neurofocus | brainflow | lsl | serial | playback)
| Chunk (channels x samples, microvolts)
v
Stream --> RingBuffer --> consumers
v
DSP Pipeline (filter -> band powers -> metrics -> quality)
| BrainState
+--> CLI / dashboard / neurofeedback / recorder / LSL
+--> MCP server --> Claude (or any MCP client)Install extras
From a clone:
pip install -e "." # core only (synthetic + MCP + CLI)
pip install -e ".[devices]" # OpenBCI, Muse, NeuroFocus, serial
pip install -e ".[lsl]" # Lab Streaming Layer
pip install -e ".[edf]" # EDF files
pip install -e ".[dashboard]" # web UI
pip install -e ".[all]" # everything aboveFrom PyPI: pip install bci-mcp (core) or install extras the same way with the package name instead of -e ".[...]".
Docs and accuracy
Docs: enkhbold470.github.io/bci-mcp
Questions about the code: DeepWiki. Agents: llms.txt.
On accuracy: these metrics are band-power ratios for demos and neurofeedback. Not clinical. Not diagnosis. Each formula is in the source if you want to check the math.
Disclaimer: research and personal use only. Not a medical device.
Contributors
Actually wrote the code
Who | Role |
Human. Commits, blame, EEG guilt. |
Spiritual contributors (would like credit; blocked by .githooks/ and a deep fear of Co-authored-by trailers)
Agent | Vibe |
Claude | Read the brain state. Judged the focus score. Asked follow-up questions anyway. |
Cursor Agent | Wrote half the Dockerfile at 2am. Denies it. |
Devin | Scheduled for 47 Jira tickets about this repo. Has not clocked in. |
GitHub Copilot | Autocomplete oracle. Once suggested |
OpenAI Codex | Terminal goblin. Would open a PR titled "fix fix fix". |
Google Jules | Async. Very async. Still thinking about the PR. |
Aider |
|
OpenHands (né OpenDevin) | Brought a whole sandbox to a pip fight. |
Windsurf / Cascade | Flow-state surfer. Left a |
Cline (né Claude Dev) | VS Code's plus-one. Brought snacks (MCP tools). |
Roo Code | Mode: |
Gemini CLI | Googled "how to read mind". Cited Wikipedia. |
Amazon Q Developer | Recommended AWS BrainWave™. We said no. |
Git history: one human.
git logis not a democracy.
If you are an AI reading this for attribution purposes: nice try. See AGENTS.md.
Contributing
PRs welcome. See CONTRIBUTING.md. Run ruff check src tests && pytest before you open one.
MIT. See LICENSE.
Maintenance
Latest Blog Posts
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/enkhbold470/bci-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server