h7tools-mcp
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., "@h7tools-mcpcheck H7-TOOL health status"
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.
H7-TOOL MCP Assistant
This project provides a local MCP server for H7-TOOL. After it is enabled in an AI client, the AI can call H7-TOOL-related tools to inspect the connected programmer, search the local device library, identify a target board, and read development diagnostics.
The public documentation only covers installation and usage. Product-internal communication details are intentionally not documented here.
What It Does
Lists available H7-TOOL USB interfaces and local bridge settings.
Reads H7-TOOL status and health information.
Searches the local H7-TOOL device Lua library by vendor, series, or chip name.
Searches bundled H7-TOOL Lua examples and bus helper scripts so the AI can inspect original peripheral usage.
Provides public safety and style rules for AI-authored H7-TOOL Lua helper scripts.
Provides bounded Lua debugging templates and an AI workflow for UART, Modbus RTU, I2C, SPI, and CAN experiments.
Provides an offline Lua draft workspace to create, list, read, and validate drafts without executing them.
Reviews Lua drafts statically and can run validated drafts only after explicit execution confirmation.
Provides a dangerous-action policy gate for future programming, erase, unlock, protection, power, persistent-storage, and register-state changes.
Provides programming preflight checks for firmware file hash, size, start address, target profile, flash metadata, and dangerous-action policy. It does not program hardware.
Generates redacted Markdown diagnostic reports for forum posts, issues, handoff, or session archiving.
Parses device profiles for interface type, expected ID, UID location, memory ranges, included libraries, and algorithm entries.
Summarizes profile capabilities so the AI can understand what a chip profile appears to support.
Probes a connected STM32H7 target and combines live results with the selected local profile.
Reads bounded target memory ranges for diagnostics.
Reads option-byte values described by a selected local profile.
Summarizes protection status when the selected profile provides the required rules.
Sends and receives short data through H7-TOOL UART channels for loopback tests, AT commands, and simple serial debugging.
Sends bounded CAN/CAN-FD frames through H7-TOOL.
Scans I2C addresses or performs one bounded I2C write/read transaction.
Performs one bounded SPI write/read transaction with CS0 or CS1.
Attempts to read SEGGER RTT up-buffer logs from target firmware.
Related MCP server: Obsidian Readonly MCP
Directory Layout
Recommended layout:
h7toolPC_release/
EMMC/
H7-TOOL/
Programmer/
Device/
mcp/
h7tool_mcp.py
README.md
requirements.txt
config.jsonIn other words, place or clone this repository as the mcp directory under the H7-TOOL PC software package root, beside EMMC.
Example:
cd D:\Tools\h7toolPC_release
git clone https://github.com/zhe0523/h7tools-mcp.git mcpThis layout lets the MCP server find the H7-TOOL device library automatically.
Install
Use Python 3.11 or newer.
cd D:\Tools\h7toolPC_release\mcp
python -m pip install -r requirements.txt
python h7tool_mcp.py --self-testIf the self-test prints Self-test passed, the Python side is working.
Configure H7-TOOL Access
Create a local config.json from the example that matches your connection method. The most common current path is USB HID:
copy config.usb-hid.example.json config.json
python h7tool_mcp.py --list-hid-devicesIf more than one matching H7-TOOL interface is found, copy the correct serial_number into config.json.
Useful local checks:
python h7tool_mcp.py --device-vendors
python h7tool_mcp.py --device-search STM32H743 --device-vendor ST
python h7tool_mcp.py --lua-example-search BH1750 --lua-example-interface i2c
python h7tool_mcp.py --lua-authoring-rules
python h7tool_mcp.py --lua-template-library
python h7tool_mcp.py --lua-template-library spi_jedec_id
python h7tool_mcp.py --lua-debug-workflow "read SPI Flash JEDEC ID" --lua-debug-interface spi
python h7tool_mcp.py --lua-draft-list
python h7tool_mcp.py --lua-draft-review example.lua
python h7tool_mcp.py --dangerous-action-policy
python h7tool_mcp.py --dangerous-action-plan "program firmware" --dangerous-action-level program
python h7tool_mcp.py --device-profile ST/STM32H7xx/STM32H7x_2M.lua
python h7tool_mcp.py --programming-preflight firmware.bin --device-profile ST/STM32H7xx/STM32H7x_2M.lua --programming-address 0x08000000
python h7tool_mcp.py --diagnostic-report session-summary --device-profile ST/STM32H7xx/STM32H7x_2M.lua
python h7tool_mcp.py --lua-health
python h7tool_mcp.py --target-identity ST/STM32H7xx/STM32H7x_2M.lua
python h7tool_mcp.py --target-summary ST/STM32H7xx/STM32H7x_2M.lua
python h7tool_mcp.py --target-flash-info ST/STM32H7xx/STM32H7x_2M.luaconfig.json is intentionally ignored by git because it contains local device settings.
Routine debugging actions are available by default, including device queries, target reads, bus transactions, RTT reads, and non-destructive Lua drafts. Dangerous actions are disabled by default. Programming, erase, unlock, protection changes, power-control, persistent storage changes, and register-state changes must check dangerous_actions in config.json and require the matching confirmation phrase on each request.
Start The MCP Server
The MCP server uses stdio. Usually you do not start it manually; your AI client starts it.
On Windows, prefer the launcher script:
D:\Tools\h7toolPC_release\mcp\h7tool_mcp.cmdReplace the path with the absolute path on your machine. The launcher avoids many client-specific differences around Python launchers, argument splitting, non-ASCII paths, and paths containing spaces.
For manual command-line checks, use one of the flags shown by:
python h7tool_mcp.py --helpWhen no flag is provided, the program waits for MCP JSON-RPC messages on stdin/stdout, which is what MCP clients expect.
Connect From AI Tools
Configure this repository's h7tool_mcp.cmd as a local stdio MCP server.
Before connecting an AI client, verify the server from a terminal:
cd D:\Tools\h7toolPC_release\mcp
.\h7tool_mcp.cmd --self-test
.\h7tool_mcp.cmd --lua-healthThen verify any hardware workflow you plan to expose to the AI:
.\h7tool_mcp.cmd --target-summary ST/STM32H7xx/STM32H7x_2M.lua --include-protection-status
.\h7tool_mcp.cmd --uart-transact --uart-channel 1 --uart-baud 115200 --uart-send-hex "48 37 0D 0A" --uart-rx-length 64
.\h7tool_mcp.cmd --i2c-transact --i2c-clock 100000 --i2c-scan
.\h7tool_mcp.cmd --spi-transact --spi-freq-id 0 --spi-cs 0 --spi-write-hex "9F" --spi-read-length 3Most AI clients need the same fields:
Name:
h7toolType:
stdioCommand:
D:\Tools\h7toolPC_release\mcp\h7tool_mcp.cmdArguments: empty
If a client cannot launch .cmd directly, use cmd as the command and /c D:\Tools\h7toolPC_release\mcp\h7tool_mcp.cmd as the arguments.
Codex / ChatGPT Desktop / Codex IDE
Open the Codex MCP settings and add a stdio server, or edit ~/.codex/config.toml:
[mcp_servers.h7tool]
command = 'D:\Tools\h7toolPC_release\mcp\h7tool_mcp.cmd'
args = []
enabled = true
startup_timeout_sec = 20
tool_timeout_sec = 60You can also add it with Codex CLI:
codex mcp add h7tool -- D:\Tools\h7toolPC_release\mcp\h7tool_mcp.cmd
codex mcp listAfter adding the server, restart or reload the AI client if it does not appear immediately. Ask the AI to call bridge_status to confirm the connection.
Cherry Studio
In Cherry Studio, open Settings -> MCP Server -> Add server, choose STDIO, then set:
Name: h7tool
Command: D:\Tools\h7toolPC_release\mcp\h7tool_mcp.cmd
Arguments: emptyChinese step-by-step guide: Cherry Studio 配置 H7-TOOL MCP 教程.
Claude Code / Claude Desktop / opencode
These clients use the same local stdio MCP idea. Chinese multi-client guide: AI 客户端接入 H7-TOOL MCP 指南.
Lua helper authoring rules are documented in Chinese here: AI 编写 H7-TOOL Lua 辅助脚本规则.
How To Ask The AI To Use It
Once the MCP server is connected, ask the AI to use the H7-TOOL tools directly. Example prompts:
Use the h7tool MCP server to list available H7-TOOL interfaces.Use h7tool to search the local device library for STM32H743.Use h7tool lua_example_search to find bundled I2C BH1750 examples and summarize how they are called.Use h7tool lua_authoring_rules before drafting a custom H7-TOOL Lua helper script.Use h7tool lua_draft_create to draft an I2C register-read Lua helper, then validate it with lua_draft_validate without executing it.Use h7tool lua_draft_review to classify a Lua draft as non-destructive or dangerous before running it.Use h7tool dangerous_action_policy to check whether programming, erase, unlock, protection, and similar dangerous actions are currently allowed.Use h7tool target_identity with ST/STM32H7xx/STM32H7x_2M.lua and summarize the connected target.Use h7tool target_summary with ST/STM32H7xx/STM32H7x_2M.lua and recommend the next diagnostic step.Use h7tool protection_status for the selected STM32H7 profile and explain the result.Use h7tool uart_transact on channel 1, 115200 8N1, send hex: 48 37 0D 0A, and read up to 64 response bytes.Use h7tool can_transact at 500K bitrate to send standard frame ID 0x321 with data 01 02 03 04.Use h7tool i2c_transact to scan I2C addresses at 100K clock.Use h7tool spi_transact with freq_id 0, phase 0, polarity 0, CS0, send hex 9F, and read 3 bytes.Use h7tool rtt_read to try reading target RTT channel 0 logs.Good workflow:
Ask the AI to check
bridge_status.Ask it to search or inspect the target device profile.
When Lua-assisted debugging is useful, ask it to call
lua_debug_workflowandlua_template_libraryto create a small draft.Ask it to call
lua_draft_review; non-destructive debugging drafts can be run withlua_draft_runandexecute=true.Ask it to run
lua_health,health_summary, ortarget_summaryfor hardware state checks.Ask for focused memory, option-byte, RTT, or peripheral transactions only after the target profile is selected.
Before programming, erase, protection, or other dangerous actions, ask it to call
programming_preflightordangerous_action_plan.At the end of a session, ask it to call
diagnostic_reportfor a redacted Markdown summary.
Available MCP Tools
bridge_statusdevice_vendorsdevice_searchlua_example_searchlua_authoring_ruleslua_template_librarylua_debug_workflowlua_draft_createlua_draft_listlua_draft_readlua_draft_validatelua_draft_reviewlua_draft_rundangerous_action_policydangerous_action_explaindangerous_action_planprogramming_preflightdiagnostic_reportdevice_profiledevice_capabilitiestool_statushealth_summarylua_healthtarget_probetarget_identitytarget_summarytarget_flash_infotool_registersread_option_bytesprotection_statusuart_transactcan_transacti2c_transactspi_transactrtt_readlog_tailread_memory
Notes
Device scripts in the H7-TOOL package often describe whole chip families rather than one exact part number. For example, searching for STM32H743 may return a generic STM32H7 profile. Use live target data, profile metadata, and chip-specific registers together when exact identification matters.
Only one program should actively control the same H7-TOOL operation path at a time. If an AI call times out or returns an unexpected result, close conflicting operations in the PC tool and try again.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceRead-only Modbus TCP monitoring server that exposes safe MCP tools for AI agents to read holding/input registers, coils, and device identity from industrial devices without write access.4Apache 2.0
- AlicenseCqualityCmaintenanceRead-only MCP server for querying a running Obsidian vault from agentic runtimes, exposing safe Obsidian CLI commands.551MIT

canforge-mcpofficial
AlicenseAqualityBmaintenanceLocal, read-only MCP server for inspecting DBC files and decoding CAN capture logs, with bounded and composable tools.13MIT- Alicense-qualityBmaintenanceAn MCP server that exposes Hex's public API as deterministic, snake_case MCP tools, supporting read-only and full operation modes.MIT
Related MCP Connectors
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
Read-only MCP server for the WebAssembly spec: instructions, types, sections, search, proposals.
Read-only MCP server for wafergraph.com's semiconductor & AI supply-chain data: 30 tools, no auth.
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/zhe0523/h7tools-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server