EmbiMind MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| EMBIMIND_APP_DIR | No | Override per-user app/data/toolchain directory. Default: %LOCALAPPDATA%\EmbiMind (Windows) / ~/.local/share/EmbiMind (Linux). | |
| EMBIMIND_OPENOCD_PORT | No | Override OpenOCD Tcl RPC port. Default: 6666. | |
| EMBIMIND_TOOLCHAIN_DIR | No | Use a local ARM GNU + OpenOCD directory for offline/air-gapped setup. Default: <EMBIMIND_APP_DIR>/toolchain. | |
| EMBIMIND_TOOLCHAIN_URL | No | Override toolchain archive download URL (HTTPS only). Default: GitHub Release v1.0.0 asset. | |
| EMBIMIND_TOOLCHAIN_SHA256 | No | Expected SHA-256 checksum for custom toolchain archive. Default: pinned release SHA-256. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
EmbiMind MCP connects AI assistants to ARM GNU build tools, OpenOCD, and ARM GDB. Key operating rules:
Build preference: Prefer having the user build firmware in their IDE (e.g., STM32CubeIDE). Only call build_project(..., user_approved=true) after explicit user approval.
Bare-metal linking: Never use -Wl,--defsym,_init=0; always link with a .ld script and startup .s file.
Flashing: Always run flash_preflight first to obtain an approval_token, then call flash_and_verify(..., user_approved=true, approval_token=...) or flash_elf(..., user_approved=true, approval_token=...).
Diagnostics: Use triage_cortex_m() and read_memory_batch() for fast single-call target inspection.
Session recovery: Call get_session_state() after compaction or reconnect; use stop_all_sessions() to clean up processes.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| check_toolchainB | Check that the configured OpenOCD, scripts directory and ARM GDB exist and run. |
| register_target_configurationC | Register a board using paths relative to the OpenOCD scripts directory. Example interface_config: interface/stlink.cfg Example target_config: target/stm32f4x.cfg |
| search_openocd_configsC | Search bundled interface, target and board OpenOCD .cfg files. |
| get_target_configurationC | Validate and return a previously registered target configuration. |
| list_registered_targetsB | List board names registered in targets.json. |
| start_openocdA | Start OpenOCD for a registered board and connect to its Tcl RPC port. |
| get_openocd_statusB | Return OpenOCD process and Tcl RPC connection status. |
| stop_openocdB | Stop the active OpenOCD process. |
| search_openocd_commandsB | Search the bundled OpenOCD command catalogue by name, syntax or description. |
| get_openocd_command_modeC | Ask the running OpenOCD instance whether a command is config or runtime mode. |
| execute_openocd_commandB | Execute one allowlisted OpenOCD Tcl command. Set user_approved=true only after the user has explicitly approved a potentially destructive operation such as flash erase/programming. |
| start_gdbB | Start the persistent ARM GDB process in MI2 mode. |
| get_gdb_statusB | Return the GDB process status. |
| stop_gdbB | Gracefully stop the GDB process. |
| load_elf_symbolsA | Load symbols from an ELF file into GDB; this does not flash the target. |
| connect_gdbC | Connect GDB to the OpenOCD GDB server. |
| disconnect_gdbA | Disconnect GDB from the target without stopping OpenOCD. |
| flash_elfB | Program the target via the protected flash_and_verify workflow. Requires running flash_preflight first, obtaining explicit user approval, and supplying both user_approved=true and the preflight approval_token. |
| verify_flashB | Compare the target's programmed sections against the loaded ELF. |
| halt_targetB | Halt target execution. |
| resume_targetC | Resume target execution. |
| step_targetC | Execute one source-level step. |
| next_targetB | Execute one source-level next operation. |
| finish_target_functionB | Run until the current function returns. |
| reset_targetB | Reset the target, optionally leaving it halted; requires user approval. |
| wait_for_target_stopC | Wait for an asynchronous GDB target-stop event. |
| add_breakpointC | Set a breakpoint at a function, file:line or address. |
| remove_breakpointB | Remove a breakpoint by its GDB breakpoint number. |
| list_breakpointsB | List GDB breakpoints and watchpoints. |
| add_watchpointC | Set a write, read or access watchpoint. |
| get_register_valuesC | Read register values in hexadecimal, octal, binary, decimal or raw format. |
| get_gdb_infoC | Run a GDB info command for the requested topic. |
| get_registersB | Read target CPU registers. |
| read_memoryC | Read target memory using GDB. |
| write_memoryC | Write target memory. Requires explicit user approval. |
| evaluate_expressionB | Evaluate a C expression or symbol in the current GDB context. |
| get_local_variablesA | Read local variables in the selected stack frame. |
| get_backtraceB | Read the current call stack. |
| get_stack_argumentsC | Read arguments for stack frames. |
| get_source_listingB | List source around the current execution location. |
| disassembleC | Disassemble code at the supplied address, symbol, or register location. |
| get_threadsB | List threads known to GDB. |
| get_target_stateB | Return GDB's current target execution state. |
| get_gdb_eventC | Read one queued GDB asynchronous event, if available. |
| execute_gdb_commandA | Execute one allowlisted GDB CLI command through GDB/MI. Potentially destructive or state-changing commands require user_approved=true after explicit user approval. Host shell escapes and scripting are blocked. |
| execute_gdb_mi_commandC | Execute a GDB/MI command, for advanced GDB integration. |
| check_arm_toolchainB | Detect and validate the configured ARM GNU toolchain. |
| list_arm_toolsA | List ARM GNU toolchain executables detected in the configured bin directory. |
| compile_cC | Compile one C source file into an object file. |
| compile_cppC | Compile one C++ source file into an object file. |
| compile_assemblyC | Compile a .s or preprocessed .S assembly source file into an object file. |
| preprocess_sourceC | Run the C/C++ preprocessor on a source file. |
| link_elfC | Link object files into an ELF firmware image. |
| create_static_libraryC | Create a static library archive from object files. |
| elf_to_binC | Convert an ELF firmware image into a raw binary. |
| elf_to_hexC | Convert an ELF firmware image into Intel HEX format. |
| convert_elfC | Convert an ELF image to a supported objcopy output format. |
| inspect_elf_headerC | Inspect ELF file header information. |
| inspect_elf_sectionsC | List sections in an ELF firmware image. |
| inspect_elf_segmentsC | Inspect ELF program segments and load information. |
| inspect_elf_symbolsC | Inspect symbols in an ELF firmware image with filtering and pagination. |
| inspect_disassemblyC | Disassemble an ELF image with optional symbol/address filtering and pagination. |
| inspect_memory_usageC | Report ELF section memory usage using the ARM size utility. |
| inspect_all_elf_headersC | Inspect all ELF header and metadata information. |
| address_to_sourceC | Map firmware addresses to source files and line numbers. |
| inspect_file_formatB | Identify the file format and architecture of an object or firmware file. |
| get_session_stateA | Return compact OpenOCD + GDB session state for fast recovery after compaction. |
| recover_sessionC | Inspect persisted session metadata, clean up stale PIDs, and report live state. |
| detect_hardwareC | Identify the connected debug adapter and physical MCU target. |
| get_target_infoC | Return hardware profile and memory/capability metadata for a target or board. |
| get_memory_mapC | Return flash, RAM, sector layout, and reserved regions for a target MCU. |
| get_debug_adapter_infoA | Return active debug adapter, transport, and OpenOCD connection details. |
| flash_preflightC | Validate an ELF image against target memory boundaries and issue an approval token. |
| stop_all_sessionsB | Stop active GDB and OpenOCD sessions and clean up any orphaned PIDs. |
| inspect_projectB | Inspect a firmware project (.cproject/CMake/Makefile/bare-metal) in one call. |
| build_projectB | Build a firmware project using EmbiMind's bundled ARM toolchain. Prefer building in the user's firmware IDE (e.g., STM32CubeIDE). Only set user_approved=true after the user explicitly approves building via MCP. |
| flash_and_verifyC | Atomically program, verify, and optionally reset a target via OpenOCD. |
| read_memory_batchC | Read multiple target memory/register addresses in a single call. |
| triage_cortex_mB | Read Cortex-M CPUID, fault status registers (CFSR/HFSR/MMFAR/BFAR), and target state in one call. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| embimind_system_guidance | Core operating instructions for an AI assistant using EmbiMind. |
| firmware_build_workflow | Guide a firmware build using the ARM GNU toolchain. |
| connect_target_workflow | Guide the assistant through registering and connecting a target. |
| flash_firmware_workflow | Guide a safe firmware programming and verification workflow. |
| diagnose_target_workflow | Guide evidence-based diagnosis of an embedded target. |
| openocd_command_guidance | Explain OpenOCD commands using the bundled reference resources. |
| skill_baremetal_firmware_dev | Apply the bare-metal firmware development skill with validated context. |
| skill_firmware_code_review | Apply the firmware code review skill with validated context. |
| skill_hil_firmware_testing | Apply the HIL firmware testing (V&V) skill with validated context. |
| skill_embedded_system_architect | Apply the embedded system architect skill with validated context. |
| skill_cortex_m_fault_triage | Apply the Cortex-M fault triage skill with validated context. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| openocd_ai_system_guide | OpenOCD architecture and operational guidance for the AI assistant. |
| openocd_command_reference | Detailed OpenOCD command reference. |
| openocd_command_catalogue | Structured OpenOCD command and driver catalogue. |
| ARM Toolchain AI System Guide | Instructions for using EmbiMind's ARM GNU build tools. Covers build-stage order, tool selection, artifact checks and safe operation. |
| ARM GNU Toolchain Reference | Technical reference for ARM GCC, G++, linker, binutils, supported options, output formats and common firmware build operations. |
| ARM Toolchain MCP Catalogue | Structured catalogue mapping EmbiMind firmware build and ELF inspection MCP tools to their purpose, arguments and dependencies. |
| Bare-Metal Firmware Development Skill | Workflow for Cortex-M / STM32 bare-metal driver, startup, and linker-aligned firmware development. |
| Firmware Code Review Skill | Safety, concurrency, ISR, and ELF cross-verification checklist for embedded C/C++ firmware. |
| HIL Firmware Testing Skill | Gated HIL V&V workflow for OpenOCD, flash verification, conditional GPIO/LED checks, and fault injection. |
| Embedded System Architect Skill | Architecture workflow for MCU memory budgeting, pinmux/SWD protection, and bare-metal vs. RTOS design. |
| Cortex-M Fault Triage Skill | Live Cortex-M fault register triage and supported OpenOCD/GDB recovery workflow. |
TDQS
Scored across 79 tools
Several tools have overlapping or near-identical purposes: get_registers vs get_register_values, inspect_elf_header vs inspect_all_elf_headers, elf_to_bin/elf_to_hex vs convert_elf, flash_elf vs flash_and_verify, and stop_all_sessions vs stop_gdb/stop_openocd. Clusters like compile_*/inspect_elf_*/get_*_status are distinguishable, but an agent must read carefully to avoid misselection among the many near-duplicates.
The set overwhelmingly follows a snake_case verb_object pattern (get_threads, add_breakpoint, stop_openocd, read_memory), which is predictable. Deviations exist, such as the bare verb 'disassemble', conversion-style names (elf_to_bin, address_to_source), and inconsistent prefixing (inspect_elf_header vs inspect_all_elf_headers), but these remain readable.
At 79 tools the surface is far beyond what an agent can hold comfortably, and many capabilities are fragmented into single-purpose variants (compile_c/compile_cpp/compile_assembly, four separate ELF inspect tools). The domain is genuinely broad, but much of this should be consolidated into fewer parameterized tools.
Coverage is unusually thorough: toolchain checking, project build, link/convert, flash preflight and verification, GDB breakpoints/watchpoints, memory and register access, fault triage, and session recovery. Minor gaps remain around target console/semihosting or SWO trace capture and RTOS-aware inspection, but no core workflow is a dead end.