eeg-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_boardsA | List every board BrainFlow can acquire from, with ids and sampling rates. Start here when you do not know what hardware is available. Two entries need
no hardware at all: Returns: Board names, numeric ids, sampling rates and EEG channel counts. |
| start_streamA | Open a board and begin buffering EEG in the background. Data flows into a ring buffer from a background thread as soon as this returns, so a subsequent read_window will have samples waiting. The session keeps running until stop_stream is called. |
| stop_streamA | Stop a stream and release the board, serial ports, and LSL outlets. Always call this when finished. A board left prepared can block the next process from acquiring the device. |
| list_sessionsA | List all active stream and replay sessions with a one-line summary each. Returns: Session ids with their source kind, running state, and buffer fill. |
| stream_statusA | Health and timing report for a session. The fields that matter for closed-loop work:
|
| read_windowA | Read the most recent samples from the buffer. Returns filtered signal when a filter chain is set (see set_filters),
otherwise raw. Long windows are decimated to |
| get_channelsB | List the channels a session is producing, with their buffer index. |
| inspect_recordingA | Open a recording and describe it without starting playback. Use this before start_replay to see how long the file is, what channels it has, and which annotations will be re-emitted as events during replay. |
| start_replayA | Replay a recording against a wall clock, re-emitting its events. This is the safe way to build a real-time pipeline: the session behaves exactly like a live stream -- same buffering, same chunked delivery, same tools -- so code developed here runs unchanged against hardware. The recording's annotations arrive in the event log at their original timings. |
| replay_controlA | Pause, resume, seek, or change the speed of a replay session. |
| list_recording_eventsA | List all events present in a replay session's source file. Distinct from get_events: this is the complete event list from the file, including events that have not been reached yet. get_events returns only what has actually been emitted so far. |
| set_filtersA | Install a stateful online filter chain on a running stream. The chain filters continuously in the background as samples arrive, carrying filter state across chunk boundaries. This matters: filtering each query window independently would inject a transient at every boundary and corrupt any phase-sensitive measure. Filtered output goes to a second buffer, so raw signal remains available via read_window(filtered=False). These are causal filters -- there is no zero-phase option, because that needs
future samples. Check |
| clear_filtersA | Remove the filter chain; reads return raw signal again. |
| get_band_powerA | Band power over the most recent window, per channel and averaged. The workhorse feature for neurofeedback and closed-loop triggering. Prefer
the |
| get_psdA | Power spectral density over the most recent window. Use when band power is too coarse -- to find a peak alpha frequency, confirm a stimulation artifact, or check whether a notch actually removed the mains. |
| check_signal_qualityA | Per-channel health check: amplitude, flat/railed detection, line noise. Call this before trusting any real-time feature, and definitely before driving stimulation from one. A flat or railed electrode poisons an average reference and a band-power threshold without changing anything you would notice in the feature value itself. |
| log_eventA | Record an event against the stream's clock. For anything the server did not generate itself: a task onset, a subject report, an experimenter note. Stimulation commands are logged automatically by send_stim_event, so do not log those by hand. |
| get_eventsA | Read the session's event log. Everything lands here on one clock: board markers, annotations re-emitted by a replay, stimulation commands we dispatched, and manual notes. That is what makes a closed-loop run reconstructible afterwards without joining clocks. |
| get_epoch_around_eventA | Extract the signal window around an event that already occurred. Online epoching: use it to inspect the response to the most recent stimulus, or to verify that a stimulation artifact lands where you expect. The event must still be inside the ring buffer -- for a default 60 s buffer, that means within the last minute. |
| clear_eventsA | Empty the session's event log without stopping the stream. Useful between blocks of an experiment. The signal buffer is untouched. |
| list_stim_backendsA | List stimulation targets, their options, and which ones drive hardware. Software backends ('log', 'lsl', 'brainflow_marker') are always available. Hardware backends ('serial_ttl', 'tms', 'tes', 'template_serial') require the server to have been started with EEG_MCP_ALLOW_HARDWARE_STIM=1, and must be armed before each session of use. Returns: The backend catalogue and the currently configured safety ceilings. |
| attach_stim_backendA | Bind a stimulation target to a session and open its transport. Start with backend='log' to rehearse a protocol with no output at all, then switch once the timing looks right. |
| detach_stim_backendC | Close and remove a stimulation backend from a session. |
| arm_stimA | Permit hardware stimulation for a bounded window. Arming expires deliberately: an agent that stalls mid-protocol should not be able to resume and fire a stimulator minutes later without a fresh, explicit decision. Re-arm as needed, or disarm the moment a block ends. |
| disarm_stimC | Revoke permission to stimulate. Takes effect immediately. |
| send_stim_eventA | Deliver one stimulation command, and log it against the EEG clock. The event is written to the session log whether the transport succeeds or fails -- a failed stimulation attempt matters just as much to the record. When the acquisition source supports markers, the same event is also punched into the stream itself so the recording is self-describing. |
| send_stim_trainA | Deliver a regular train of pulses, blocking until it completes. For rTMS bursts and repeated cues. The call holds until the train finishes, so it is capped at 1000 pulses and 60 seconds total; build longer protocols from several calls so there are decision points in between. Every pulse is logged individually, so the event log reconstructs the exact delivered timing rather than the intended timing. |
| stim_statusA | Report attached stimulation backends, arming state, and dispatch counts. |
| start_monitorA | Open a live browser view of a running session and return its URL. Serves a rolling traces view with event markers, band power and per-channel quality, refreshing continuously. This is the tool for "let me watch the recording" -- a static plot cannot answer whether the signal is good now. With The page is bound to 127.0.0.1 only and requires a random per-monitor token, so it is not reachable from the network. It is still unencrypted: do not expose it through a tunnel or reverse proxy. |
| stop_monitorB | Close a session's live monitor and free its port. |
| list_monitorsA | List live monitors currently serving, with their URLs. Returns: Active monitors and the URL for each. |
| plot_streamA | Render the recent signal as a standalone HTML file and return its path. A frozen snapshot, unlike start_monitor -- use it to keep a record, attach to a note, or share. The file inlines everything and needs no internet. |
| plot_spectrumC | Render the power spectrum and band composition as a standalone HTML file. |
| export_reportA | Write a full review page: traces, spectrum, quality, and the event log. The one artefact to keep from a session. Everything is inlined, so it opens on any machine, needs no internet, and still renders years from now. |
| start_recordingA | Begin writing the live signal to disk, continuously. Call this as soon as the session starts if you intend to keep the data. The ring buffer only holds the last minute or so, so anything not recorded is gone -- a session streamed for an hour without recording leaves nothing but whatever reports you exported. The raw, unfiltered signal is written. Filter settings are stored alongside it so a filtered view is reproducible; the amplifier's actual output is not reconstructible from anything else. |
| stop_recordingA | Finish the recording, write the The event log becomes annotations inside the file, and -- unless you pass
|
| recording_statusB | Report whether a session is recording, and how much has been written. |
| list_recordingsB | List recordings in eeg-mcp's own metadata store, newest first. This store belongs to eeg-mcp alone. Analysis tools read from it -- the schema is compatible with neuro-mcp's, so it can open this database and understand every row -- but nothing else writes to it. |
| recover_recordingA | Finish a recording whose process died before it could be closed. Samples are appended to disk as they arrive and the header is written up
front, precisely so an interrupted session is not lost. Point this at the
orphaned Events are not recoverable -- they lived in memory -- so the resulting file carries signal without annotations. |
| list_processorsA | List real-time processors available to attach, and where they came from. Built-ins are always present. Your own appear here once the server
environment points at them -- via the Returns: Available processors with their parameters, plus any plugin that failed to load, so a typo is visible instead of silently missing. |
| attach_processorA | Attach a processor to a session. A Non-streaming processors do nothing until you call |
| detach_processorB | Remove a processor from a session and release its state. |
| processor_statusA | Report attached processors, their health, and their cost.
|
| get_processor_outputC | Read a streaming processor's recent outputs. |
| run_processorA | Run a processor once on the most recent window, on demand. Works for both modes: for a non-streaming processor this is the only way to execute it, and for a streaming one it is a way to get an answer right now rather than waiting for its next scheduled output. |
| reset_processorsA | Clear accumulated processor state and outputs, without detaching them. Useful between experimental blocks, and after a replay seek, so a rolling window does not straddle the discontinuity. |
| get_tokensA | Read discrete tokens from a tokenizing processor. For feeding EEG into sequence models. Returns both the grouped tokens (one group per window) and a flat sequence, plus the vocabulary size and the channel/band layout each position corresponds to. Works with any attached processor exposing |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- 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/AImplifier/eeg-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server