embimind-mcp 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- embimind_mcp-1.0.0/CHANGELOG.md +22 -0
- embimind_mcp-1.0.0/LICENSE +21 -0
- embimind_mcp-1.0.0/MANIFEST.in +11 -0
- embimind_mcp-1.0.0/PKG-INFO +136 -0
- embimind_mcp-1.0.0/README.md +108 -0
- embimind_mcp-1.0.0/pyproject.toml +67 -0
- embimind_mcp-1.0.0/setup.cfg +4 -0
- embimind_mcp-1.0.0/setup.py +5 -0
- embimind_mcp-1.0.0/src/embimind_mcp/__init__.py +5 -0
- embimind_mcp-1.0.0/src/embimind_mcp/arm_toolchain.py +976 -0
- embimind_mcp-1.0.0/src/embimind_mcp/binary_generator.py +161 -0
- embimind_mcp-1.0.0/src/embimind_mcp/command_catalog/ARM_TOOLCHAIN_AI_GUIDE.md +220 -0
- embimind_mcp-1.0.0/src/embimind_mcp/command_catalog/ARM_TOOLCHAIN_REFERENCE.md +272 -0
- embimind_mcp-1.0.0/src/embimind_mcp/command_catalog/OPENOCD_AI_SYSTEM_GUIDE.md +682 -0
- embimind_mcp-1.0.0/src/embimind_mcp/command_catalog/OPENOCD_COMMAND_REFERENCE.md +1653 -0
- embimind_mcp-1.0.0/src/embimind_mcp/command_catalog/__init__.py +0 -0
- embimind_mcp-1.0.0/src/embimind_mcp/command_catalog/arm_toolchain_commands.json +848 -0
- embimind_mcp-1.0.0/src/embimind_mcp/command_catalog/openocd_commands.json +7207 -0
- embimind_mcp-1.0.0/src/embimind_mcp/command_validator.py +403 -0
- embimind_mcp-1.0.0/src/embimind_mcp/compiler.py +157 -0
- embimind_mcp-1.0.0/src/embimind_mcp/config.py +143 -0
- embimind_mcp-1.0.0/src/embimind_mcp/elf_image_analyzer.py +389 -0
- embimind_mcp-1.0.0/src/embimind_mcp/elf_inspector.py +279 -0
- embimind_mcp-1.0.0/src/embimind_mcp/flash_manager.py +510 -0
- embimind_mcp-1.0.0/src/embimind_mcp/gdb_manager.py +606 -0
- embimind_mcp-1.0.0/src/embimind_mcp/hardware_profiles.py +162 -0
- embimind_mcp-1.0.0/src/embimind_mcp/linker.py +148 -0
- embimind_mcp-1.0.0/src/embimind_mcp/main.py +1868 -0
- embimind_mcp-1.0.0/src/embimind_mcp/openocd_manager.py +284 -0
- embimind_mcp-1.0.0/src/embimind_mcp/project_builder.py +399 -0
- embimind_mcp-1.0.0/src/embimind_mcp/session_manager.py +329 -0
- embimind_mcp-1.0.0/src/embimind_mcp/skills/baremetal-firmware-dev.md +26 -0
- embimind_mcp-1.0.0/src/embimind_mcp/skills/cortex-m-fault-triage.md +27 -0
- embimind_mcp-1.0.0/src/embimind_mcp/skills/embedded-system-architect.md +24 -0
- embimind_mcp-1.0.0/src/embimind_mcp/skills/firmware-code-review.md +24 -0
- embimind_mcp-1.0.0/src/embimind_mcp/skills/hil-firmware-testing.md +28 -0
- embimind_mcp-1.0.0/src/embimind_mcp/target_database.py +139 -0
- embimind_mcp-1.0.0/src/embimind_mcp/toolchain_manager.py +80 -0
- embimind_mcp-1.0.0/src/embimind_mcp/utils.py +459 -0
- embimind_mcp-1.0.0/src/embimind_mcp.egg-info/PKG-INFO +136 -0
- embimind_mcp-1.0.0/src/embimind_mcp.egg-info/SOURCES.txt +43 -0
- embimind_mcp-1.0.0/src/embimind_mcp.egg-info/dependency_links.txt +1 -0
- embimind_mcp-1.0.0/src/embimind_mcp.egg-info/entry_points.txt +2 -0
- embimind_mcp-1.0.0/src/embimind_mcp.egg-info/requires.txt +6 -0
- embimind_mcp-1.0.0/src/embimind_mcp.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `embimind-mcp` will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2026-12-02
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Runtime toolchain provisioning for Windows `x86_64` and Linux `x86_64` with HTTPS download and SHA-256 verification.
|
|
12
|
+
- Plan-bound `flash_preflight` approval tokens (`approval_token`) and `flash_and_verify` atomic OpenOCD programming.
|
|
13
|
+
- Hardware profile registry (`hardware_profiles.py`), `detect_hardware`, `get_target_info`, `get_memory_map`, and `triage_cortex_m`.
|
|
14
|
+
- Project discovery (`inspect_project`) and incremental build support (`build_project`) for STM32CubeIDE `.cproject`, CMake, Makefile, and bare-metal layouts.
|
|
15
|
+
- Strict OpenOCD Tcl and GDB CLI/MI2 command allowlisting in `command_validator.py`.
|
|
16
|
+
- Bundled embedded engineering skills and MCP prompt/resource templates.
|
|
17
|
+
|
|
18
|
+
### Security
|
|
19
|
+
- Blocked host shell escapes (`shell`, `!`, `python`, `source`) in `execute_gdb_command`.
|
|
20
|
+
- Enforced fail-closed memory write address validation in `write_memory`.
|
|
21
|
+
- Validated compiler/linker/objcopy flags against dangerous GCC driver/plugin options.
|
|
22
|
+
- Detached OpenOCD `stdout`/`stderr` on POSIX so MCP STDIO JSON-RPC is never corrupted.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Channaveer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
include LICENSE
|
|
2
|
+
include README.md
|
|
3
|
+
include CHANGELOG.md
|
|
4
|
+
include pyproject.toml
|
|
5
|
+
include setup.py
|
|
6
|
+
recursive-include src/embimind_mcp *.py
|
|
7
|
+
recursive-include src/embimind_mcp/command_catalog *.md *.json
|
|
8
|
+
recursive-include src/embimind_mcp/skills *.md
|
|
9
|
+
prune src/embimind_mcp/binaries
|
|
10
|
+
prune toolchain
|
|
11
|
+
prune tests
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: embimind-mcp
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: EmbiMind MCP server for ARM embedded firmware compilation, ELF inspection, OpenOCD flashing, and GDB debugging
|
|
5
|
+
Author-email: Channaveer <channaveer.work@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/channaveer-8/embimind-mcp
|
|
8
|
+
Project-URL: Repository, https://github.com/channaveer-8/embimind-mcp
|
|
9
|
+
Project-URL: Issues, https://github.com/channaveer-8/embimind-mcp/issues
|
|
10
|
+
Keywords: mcp,embedded,arm,cortex-m,openocd,gdb,stm32,firmware
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Topic :: Software Development :: Embedded Systems
|
|
18
|
+
Classifier: Topic :: Software Development :: Debuggers
|
|
19
|
+
Requires-Python: >=3.13
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: mcp[cli]>=2.3.0
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest>=9.2.0; extra == "dev"
|
|
25
|
+
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
26
|
+
Requires-Dist: twine>=5.0.0; extra == "dev"
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
<!-- mcp-name: io.github.channaveer-8/embimind-mcp -->
|
|
30
|
+
|
|
31
|
+
<div align="center">
|
|
32
|
+
<img src="assets/logo.svg" alt="EmbiMind MCP Logo" width="120" />
|
|
33
|
+
<h1>EmbiMind MCP</h1>
|
|
34
|
+
<h3><em>Where AI Gets Embedded.</em></h3>
|
|
35
|
+
<p>
|
|
36
|
+
Give your AI assistant real hardware hands—without taking yours off the wheel.<br/>
|
|
37
|
+
<strong>Compile • Inspect • Flash • Debug</strong> bare-metal ARM firmware in a <strong>closed human-in-the-loop</strong> workflow.
|
|
38
|
+
</p>
|
|
39
|
+
<p>
|
|
40
|
+
<a href="https://pypi.org/project/embimind-mcp/"><img src="https://img.shields.io/badge/PyPI-v1.0.0-blue.svg" alt="PyPI v1.0.0" /></a>
|
|
41
|
+
<a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/Python-3.13%2B-3776AB.svg" alt="Python 3.13+" /></a>
|
|
42
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="MIT License" /></a>
|
|
43
|
+
<a href="https://modelcontextprotocol.io/"><img src="https://img.shields.io/badge/MCP-STDIO-8A2BE2.svg" alt="MCP STDIO" /></a>
|
|
44
|
+
</p>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Stop Copy-Pasting Registers. Start Shipping Firmware.
|
|
50
|
+
|
|
51
|
+
Most AI coding tools stop at the editor. The moment you hit a `HardFault`, a linker overflow, or a stubborn peripheral register, you're back to juggling terminals, OpenOCD scripts, and GDB windows.
|
|
52
|
+
|
|
53
|
+
**EmbiMind MCP** connects your AI IDE directly to your **ARM GNU Toolchain**, **OpenOCD**, and **GDB/MI2**—turning your assistant into an embedded co-pilot that stays **strictly under your command**.
|
|
54
|
+
|
|
55
|
+
- **Zero Guesswork**: Inspects real ELF sections, memory maps, and Cortex-M fault registers (`CFSR`, `HFSR`, `MMFAR`, `BFAR`).
|
|
56
|
+
- **Closed Human-in-the-Loop**: AI prepares the plan; **you** approve every flash erase, target reset, and memory write.
|
|
57
|
+
- **Zero Setup Friction**: One command (`uvx embimind-mcp`) auto-provisions the verified ARM toolchain and OpenOCD.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## How the Closed Human-in-the-Loop Works
|
|
62
|
+
|
|
63
|
+
```mermaid
|
|
64
|
+
flowchart LR
|
|
65
|
+
A["1. AI Diagnoses & Prepares<br/>(flash_preflight / triage_cortex_m)"] --> B["2. SHA-256 Plan Token<br/>(Exact Sectors & Memory Bounds)"]
|
|
66
|
+
B --> C{"3. Human Approval Gate<br/>(user_approved=true)"}
|
|
67
|
+
C -- Approved --> D["4. Atomic Flash & Verify<br/>(flash_and_verify + Reset)"]
|
|
68
|
+
C -- Rejected --> A
|
|
69
|
+
D --> E["5. Live GDB/MI2 Debug<br/>(Breakpoints, Registers, Memory)"]
|
|
70
|
+
E --> A
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Every destructive operation is **plan-bound and fail-closed**—no silent flashes, no unvalidated memory writes, and no host shell escapes.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## What It Brings to Your Bench
|
|
78
|
+
|
|
79
|
+
| | Capability | What Your AI Can Do |
|
|
80
|
+
| :--- | :--- | :--- |
|
|
81
|
+
| **Build & Analyze** | ARM GNU Toolchain | Compile C/C++/ASM, link ELFs, generate `.bin`/`.hex`, and audit Flash/RAM usage & disassembly. |
|
|
82
|
+
| **Target Control** | OpenOCD Tcl RPC | Discover board configs, connect SWD/JTAG probes, and run allowlisted target commands. |
|
|
83
|
+
| **Live Debugging** | Persistent GDB/MI2 | Set hardware breakpoints/watchpoints, step instructions, read memory batches, and inspect call stacks. |
|
|
84
|
+
| **Fault Triage** | Cortex-M Diagnostics | Capture `CPUID`, `ICSR`, `CFSR`, `HFSR`, `MMFAR`, `BFAR`, and core registers in a single call. |
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 30-Second Setup
|
|
89
|
+
|
|
90
|
+
Add `embimind-mcp` to **Claude Code**, **Cursor**, **Codex**, **Antigravity**, or **Gemini CLI**:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"mcpServers": {
|
|
95
|
+
"embimind-mcp": {
|
|
96
|
+
"command": "uvx",
|
|
97
|
+
"args": ["embimind-mcp"]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Or install globally with `pip` / `uv`:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
pip install embimind-mcp
|
|
107
|
+
# or
|
|
108
|
+
uv tool install embimind-mcp
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
> On first launch, `embimind-mcp` verifies and provisions the ARM GNU Toolchain and OpenOCD over HTTPS with SHA-256 verification. All logs go to `stderr` so MCP STDIO stays clean.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Supported Platforms & Configuration
|
|
116
|
+
|
|
117
|
+
- **Host OS**: Windows `x86_64` and Linux `x86_64` (auto-provisioned). macOS / ARM64 supported via `EMBIMIND_TOOLCHAIN_DIR`.
|
|
118
|
+
- **Python**: `>=3.13`
|
|
119
|
+
- **Target Hardware**: ARM Cortex-M targets via OpenOCD + GDB/MI2, with built-in memory-map profiles for `STM32F411VETx` and `STM32F411RE`.
|
|
120
|
+
|
|
121
|
+
<details>
|
|
122
|
+
<summary><strong>Environment Variables & Troubleshooting</strong></summary>
|
|
123
|
+
|
|
124
|
+
| Variable | Description | Default |
|
|
125
|
+
| :--- | :--- | :--- |
|
|
126
|
+
| `EMBIMIND_APP_DIR` | Override per-user app/data/toolchain directory | `%LOCALAPPDATA%\EmbiMind` (Win) / `~/.local/share/EmbiMind` (Linux) |
|
|
127
|
+
| `EMBIMIND_TOOLCHAIN_DIR` | Use a local ARM GNU + OpenOCD directory (offline/air-gapped) | `<EMBIMIND_APP_DIR>/toolchain` |
|
|
128
|
+
| `EMBIMIND_TOOLCHAIN_URL` | Override toolchain archive download URL (HTTPS only) | GitHub Release `v1.0.0` asset |
|
|
129
|
+
| `EMBIMIND_TOOLCHAIN_SHA256` | Expected SHA-256 checksum for custom toolchain archive | Pinned release SHA-256 |
|
|
130
|
+
| `EMBIMIND_OPENOCD_PORT` | Override OpenOCD Tcl RPC port | `6666` |
|
|
131
|
+
|
|
132
|
+
- **Offline / air-gapped setup**: Point `EMBIMIND_TOOLCHAIN_DIR` to a folder containing `arm-gnu-toolchain/bin/` and `openocd/bin/`.
|
|
133
|
+
- **Linux USB permissions**: Install `udev` rules for ST-Link/CMSIS-DAP and add your user to `plugdev`.
|
|
134
|
+
- **Port 6666 conflict**: Set `EMBIMIND_OPENOCD_PORT` or call `stop_all_sessions()`.
|
|
135
|
+
|
|
136
|
+
</details>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<!-- mcp-name: io.github.channaveer-8/embimind-mcp -->
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
<img src="assets/logo.svg" alt="EmbiMind MCP Logo" width="120" />
|
|
5
|
+
<h1>EmbiMind MCP</h1>
|
|
6
|
+
<h3><em>Where AI Gets Embedded.</em></h3>
|
|
7
|
+
<p>
|
|
8
|
+
Give your AI assistant real hardware hands—without taking yours off the wheel.<br/>
|
|
9
|
+
<strong>Compile • Inspect • Flash • Debug</strong> bare-metal ARM firmware in a <strong>closed human-in-the-loop</strong> workflow.
|
|
10
|
+
</p>
|
|
11
|
+
<p>
|
|
12
|
+
<a href="https://pypi.org/project/embimind-mcp/"><img src="https://img.shields.io/badge/PyPI-v1.0.0-blue.svg" alt="PyPI v1.0.0" /></a>
|
|
13
|
+
<a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/Python-3.13%2B-3776AB.svg" alt="Python 3.13+" /></a>
|
|
14
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="MIT License" /></a>
|
|
15
|
+
<a href="https://modelcontextprotocol.io/"><img src="https://img.shields.io/badge/MCP-STDIO-8A2BE2.svg" alt="MCP STDIO" /></a>
|
|
16
|
+
</p>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Stop Copy-Pasting Registers. Start Shipping Firmware.
|
|
22
|
+
|
|
23
|
+
Most AI coding tools stop at the editor. The moment you hit a `HardFault`, a linker overflow, or a stubborn peripheral register, you're back to juggling terminals, OpenOCD scripts, and GDB windows.
|
|
24
|
+
|
|
25
|
+
**EmbiMind MCP** connects your AI IDE directly to your **ARM GNU Toolchain**, **OpenOCD**, and **GDB/MI2**—turning your assistant into an embedded co-pilot that stays **strictly under your command**.
|
|
26
|
+
|
|
27
|
+
- **Zero Guesswork**: Inspects real ELF sections, memory maps, and Cortex-M fault registers (`CFSR`, `HFSR`, `MMFAR`, `BFAR`).
|
|
28
|
+
- **Closed Human-in-the-Loop**: AI prepares the plan; **you** approve every flash erase, target reset, and memory write.
|
|
29
|
+
- **Zero Setup Friction**: One command (`uvx embimind-mcp`) auto-provisions the verified ARM toolchain and OpenOCD.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## How the Closed Human-in-the-Loop Works
|
|
34
|
+
|
|
35
|
+
```mermaid
|
|
36
|
+
flowchart LR
|
|
37
|
+
A["1. AI Diagnoses & Prepares<br/>(flash_preflight / triage_cortex_m)"] --> B["2. SHA-256 Plan Token<br/>(Exact Sectors & Memory Bounds)"]
|
|
38
|
+
B --> C{"3. Human Approval Gate<br/>(user_approved=true)"}
|
|
39
|
+
C -- Approved --> D["4. Atomic Flash & Verify<br/>(flash_and_verify + Reset)"]
|
|
40
|
+
C -- Rejected --> A
|
|
41
|
+
D --> E["5. Live GDB/MI2 Debug<br/>(Breakpoints, Registers, Memory)"]
|
|
42
|
+
E --> A
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Every destructive operation is **plan-bound and fail-closed**—no silent flashes, no unvalidated memory writes, and no host shell escapes.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## What It Brings to Your Bench
|
|
50
|
+
|
|
51
|
+
| | Capability | What Your AI Can Do |
|
|
52
|
+
| :--- | :--- | :--- |
|
|
53
|
+
| **Build & Analyze** | ARM GNU Toolchain | Compile C/C++/ASM, link ELFs, generate `.bin`/`.hex`, and audit Flash/RAM usage & disassembly. |
|
|
54
|
+
| **Target Control** | OpenOCD Tcl RPC | Discover board configs, connect SWD/JTAG probes, and run allowlisted target commands. |
|
|
55
|
+
| **Live Debugging** | Persistent GDB/MI2 | Set hardware breakpoints/watchpoints, step instructions, read memory batches, and inspect call stacks. |
|
|
56
|
+
| **Fault Triage** | Cortex-M Diagnostics | Capture `CPUID`, `ICSR`, `CFSR`, `HFSR`, `MMFAR`, `BFAR`, and core registers in a single call. |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 30-Second Setup
|
|
61
|
+
|
|
62
|
+
Add `embimind-mcp` to **Claude Code**, **Cursor**, **Codex**, **Antigravity**, or **Gemini CLI**:
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"mcpServers": {
|
|
67
|
+
"embimind-mcp": {
|
|
68
|
+
"command": "uvx",
|
|
69
|
+
"args": ["embimind-mcp"]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Or install globally with `pip` / `uv`:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pip install embimind-mcp
|
|
79
|
+
# or
|
|
80
|
+
uv tool install embimind-mcp
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
> On first launch, `embimind-mcp` verifies and provisions the ARM GNU Toolchain and OpenOCD over HTTPS with SHA-256 verification. All logs go to `stderr` so MCP STDIO stays clean.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Supported Platforms & Configuration
|
|
88
|
+
|
|
89
|
+
- **Host OS**: Windows `x86_64` and Linux `x86_64` (auto-provisioned). macOS / ARM64 supported via `EMBIMIND_TOOLCHAIN_DIR`.
|
|
90
|
+
- **Python**: `>=3.13`
|
|
91
|
+
- **Target Hardware**: ARM Cortex-M targets via OpenOCD + GDB/MI2, with built-in memory-map profiles for `STM32F411VETx` and `STM32F411RE`.
|
|
92
|
+
|
|
93
|
+
<details>
|
|
94
|
+
<summary><strong>Environment Variables & Troubleshooting</strong></summary>
|
|
95
|
+
|
|
96
|
+
| Variable | Description | Default |
|
|
97
|
+
| :--- | :--- | :--- |
|
|
98
|
+
| `EMBIMIND_APP_DIR` | Override per-user app/data/toolchain directory | `%LOCALAPPDATA%\EmbiMind` (Win) / `~/.local/share/EmbiMind` (Linux) |
|
|
99
|
+
| `EMBIMIND_TOOLCHAIN_DIR` | Use a local ARM GNU + OpenOCD directory (offline/air-gapped) | `<EMBIMIND_APP_DIR>/toolchain` |
|
|
100
|
+
| `EMBIMIND_TOOLCHAIN_URL` | Override toolchain archive download URL (HTTPS only) | GitHub Release `v1.0.0` asset |
|
|
101
|
+
| `EMBIMIND_TOOLCHAIN_SHA256` | Expected SHA-256 checksum for custom toolchain archive | Pinned release SHA-256 |
|
|
102
|
+
| `EMBIMIND_OPENOCD_PORT` | Override OpenOCD Tcl RPC port | `6666` |
|
|
103
|
+
|
|
104
|
+
- **Offline / air-gapped setup**: Point `EMBIMIND_TOOLCHAIN_DIR` to a folder containing `arm-gnu-toolchain/bin/` and `openocd/bin/`.
|
|
105
|
+
- **Linux USB permissions**: Install `udev` rules for ST-Link/CMSIS-DAP and add your user to `plugdev`.
|
|
106
|
+
- **Port 6666 conflict**: Set `EMBIMIND_OPENOCD_PORT` or call `stop_all_sessions()`.
|
|
107
|
+
|
|
108
|
+
</details>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "embimind-mcp"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "EmbiMind MCP server for ARM embedded firmware compilation, ELF inspection, OpenOCD flashing, and GDB debugging"
|
|
9
|
+
license = "MIT"
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
requires-python = ">=3.13"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Channaveer", email = "channaveer.work@gmail.com" },
|
|
14
|
+
]
|
|
15
|
+
keywords = ["mcp", "embedded", "arm", "cortex-m", "openocd", "gdb", "stm32", "firmware"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 5 - Production/Stable",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Operating System :: Microsoft :: Windows",
|
|
20
|
+
"Operating System :: POSIX :: Linux",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Topic :: Software Development :: Embedded Systems",
|
|
24
|
+
"Topic :: Software Development :: Debuggers",
|
|
25
|
+
]
|
|
26
|
+
dependencies = [
|
|
27
|
+
"mcp[cli]>=2.3.0",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.optional-dependencies]
|
|
31
|
+
dev = [
|
|
32
|
+
"pytest>=9.2.0",
|
|
33
|
+
"build>=1.0.0",
|
|
34
|
+
"twine>=5.0.0",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[project.scripts]
|
|
38
|
+
embimind-mcp = "embimind_mcp.main:main"
|
|
39
|
+
|
|
40
|
+
[project.urls]
|
|
41
|
+
Homepage = "https://github.com/channaveer-8/embimind-mcp"
|
|
42
|
+
Repository = "https://github.com/channaveer-8/embimind-mcp"
|
|
43
|
+
Issues = "https://github.com/channaveer-8/embimind-mcp/issues"
|
|
44
|
+
|
|
45
|
+
[tool.setuptools]
|
|
46
|
+
package-dir = {"" = "src"}
|
|
47
|
+
include-package-data = false
|
|
48
|
+
|
|
49
|
+
[tool.setuptools.packages.find]
|
|
50
|
+
where = ["src"]
|
|
51
|
+
include = ["embimind_mcp*"]
|
|
52
|
+
|
|
53
|
+
[tool.setuptools.package-data]
|
|
54
|
+
embimind_mcp = [
|
|
55
|
+
"command_catalog/*.md",
|
|
56
|
+
"command_catalog/*.json",
|
|
57
|
+
"skills/*.md",
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
[tool.setuptools.exclude-package-data]
|
|
61
|
+
embimind_mcp = [
|
|
62
|
+
"binaries/*",
|
|
63
|
+
"binaries/**/*",
|
|
64
|
+
"**/__pycache__/*",
|
|
65
|
+
"**/*.pyc",
|
|
66
|
+
"**/*.pyo",
|
|
67
|
+
]
|