mcu-docs-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcu-docs-mcp
Line-Level MCU PDF Manual Locator + Interactive MCP App Viewer + CMSIS-SVD / Pin AF / Silicon Calculators + CubeMX .ioc & Keil .uvprojx Semantic Diff & Hardware Auditor
简体中文文档 · Changelog · Contributing
Why mcu-docs-mcp?
Firmware bugs don't just crash a web tab—a misconfigured TIM1_BDTR.DTG[7:0] dead-time bit or silent APB1 clock divider shift can destroy power MOSFETs or take a CAN bus offline.
Yet existing embedded AI tools suffer from three structural gaps:
Register & Math Hallucinations: LLMs frequently guess wrong register offsets or miscalculate STM32's 4-range nonlinear dead-time formula.
Unverifiable PDF Answers: Chunked vector RAG shreds multi-column register tables and strips out timing diagrams—forcing engineers to manually
Ctrl+F2,000-page PDFs anyway.Unreadable
.ioc&.uvprojxDiffs: Regenerating CubeMX reshuffles keys, silently shifts peripheral clocks, or drops hand-added Keil.cfiles with zero PR visibility.
mcu-docs-mcp fixes all three in one zero-bloat local package:
Left Hand: Reads your project (
.ioc,.uvprojx, CMSIS-SVD,STM32_open_pin_dataXML) and computes exact silicon timing deterministically.Right Hand: Opens the original PDF manual page inside your AI client (
ui://mcu-docs/viewer.html) with glowing yellow SVG bounding-box highlights down to exact Chapter, Page, and Line ([RM0090 §17.4.18, P.3, L.10]).
Related MCP server: stm32-rag-mcp
30-Second Quick Start
Option A: Zero-Install Run via uvx (Recommended)
uvx --from git+https://github.com/rar-zip/mcu-docs-mcp mcu-docs-mcpOption B: Local Install (pip)
pip install git+https://github.com/rar-zip/mcu-docs-mcp.gitOr clone and run against the included STM32F407 Motor Drive showcase immediately:
git clone https://github.com/rar-zip/mcu-docs-mcp.git
cd mcu-docs-mcp
pip install -e ".[dev]"
# 1. Semantic diff between v1 & v2 CubeMX + Keil configs
mcu-docs diff \
--ioc-before examples/stm32f407_motor_drive/motor_ctrl_v1.ioc \
--ioc-after examples/stm32f407_motor_drive/motor_ctrl_v2.ioc \
--uvprojx-before examples/stm32f407_motor_drive/motor_ctrl_v1.uvprojx \
--uvprojx-after examples/stm32f407_motor_drive/motor_ctrl_v2.uvprojx
# 2. Cross-audit hardware config against clock limits, SVD, pins & Errata PDFs
mcu-docs audit examples/stm32f407_motor_drive/motor_ctrl_v2.ioc \
--uvprojx examples/stm32f407_motor_drive/motor_ctrl_v2.uvprojx
# 3. Deterministic TIM1_BDTR.DTG[7:0] dead-time solver (200 ns @ 168 MHz)
mcu-docs calc tim_deadtime --clk-mhz 168 --target-ns 200
# 4. Line-level manual search
mcu-docs search "TIMx_BDTR DTG"Connect to Your AI Client
claude mcp add mcu-docs --scope user -- uvx --from git+https://github.com/rar-zip/mcu-docs-mcp mcu-docs-mcp --workspace .{
"mcpServers": {
"mcu_docs_mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/rar-zip/mcu-docs-mcp",
"mcu-docs-mcp",
"--workspace",
"/path/to/your/firmware-repo"
]
}
}
}Architecture
flowchart LR
A["Firmware Repo<br/>.ioc / .uvprojx / .svd / PDFs"] --> B["mcu-docs-mcp Server<br/>(Python + PyMuPDF + SQLite FTS5)"]
B --> C["Deterministic Engines<br/>SVD Decoder · Pin AF · 4x Timing Calcs<br/>Multi-Family Profiles (F0..H7/U5)"]
B --> D["Line-BBox Manual Index<br/>(section, page, line_no, x0..y1)"]
D --> E["MCP App Viewer<br/>ui://mcu-docs/viewer.html<br/>Yellow Highlight + L# Ruler + Ask AI"]
A --> F["CI PR Bot & git textconv<br/>mcu-docs diff / git-install"]MCP Tools Reference
Tool | Purpose | Interactive Viewer? |
| Opens the MCP App PDF viewer ( | Yes |
| FTS5 hardware-token search returning | Yes |
| Indexes any vendor PDF (STM32, GD32, CH32V, ESP32, TI, sensors) by SHA-256 into SQLite FTS5 | — |
| Queries CMSIS-SVD (supports | Yes |
| Queries | — |
| Solves | — |
| Semantic | — |
| Full hardware audit against silicon family bus limits ( | Yes |
| Downloads & loads official | — |
GitHub PR Diff Bot & Local git diff
Tired of unreadable 800-line .ioc key-shuffling diffs on Pull Requests?
Pull Request Bot: Copy
.github/workflows/mcu-config-diff.ymlinto your repo to automatically post/update sticky semantic diff reports on every.iocor.uvprojxPR.Local
git diffDriver: Run once inside any firmware repo to make plaingit diffhuman-readable:mcu-docs git-install
Supported Silicon Families & Vendor Manuals
Built-in Family Profiles (
silicon_profiles.py):STM32F0,STM32F1,STM32F3,STM32F401/411/405/407/429/446,STM32F7,STM32G0,STM32G4,STM32L4,STM32H7,STM32U5.PDF Locator & Viewer: Works out-of-the-box with any vector PDF manual — STM32, GD32, WCH CH32V, ESP32, NXP, TI, Nordic, plus external ICs/sensors (MPU6050, ADS1256, W25Q128, TMC2209).
Bundled Agent Skills (skills/)
cubemx-pr-audit— Semantic PR review for.ioc&.uvprojxregister-timing-calc— GroundedDTG[7:0], PWM,BRR&CAN_BTRmathhardfault-silicon-triage— Hex register dump decoding & Errata triagemanual-deep-locator— Line-level PDF citation & interactive viewer workflow
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Turn datasheets into source-backed JSON contracts, pinout matrices, and KiCad CAD for AI agents.
Run, build, and validate firmware on virtual hardware from your AI agent. Hardware knowledge corpus.
Page-cited retrieval for embedded docs, datasheets, MISRA, CMSIS, and RTOS references.
Design circuits, simulate and verify embedded firmware, and lay out PCBs with AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceServes verified register data extracted from chip datasheets to AI coding agents, enabling register lookup, bit-field decode/encode, errata checks, document search, and init sequence retrieval.MIT
- FlicenseAqualityCmaintenanceProvides read-only retrieval of STM32 datasheet and reference manual content with exact citations, page numbers, register details, and source hashes so Claude can answer questions or generate code from verified evidence.31-
- AlicenseAqualityBmaintenanceEnables AI coding assistants to perform complete headless STM32 embedded firmware development, including project creation, pin configuration, code generation, building, and flashing, by driving the official STM32 command-line toolchain.49MIT
- AlicenseAqualityBmaintenanceEnables AI agents to directly inspect and debug embedded hardware: reading/writing serial ports and bus devices, auto-detecting baud rates, parsing Modbus/NMEA/custom binary frames, plus diagnosing failures through a 45-rule fault-pattern library, error-code tables, and compile/flash error translation. Also provides pin-conflict checking, register and Cortex-M fault decoding, pre-validated driver and component selection libraries, board knowledge, and guarded flashing with post-flash byte-level verification.59MIT