Skip to main content
Glama
Helistana
by Helistana

mcp-e2studio-server

Renesas e2studio(RA / RX MCU)嵌入式开发的 MCP (Model Context Protocol) Server, 让 Claude Code / opencode 等 AI 工具能够自主完成:

接线 → 提需求 → AI 写代码 → 编译 → 烧录 → 调试 → 故障诊断 的完整闭环。

所有工具返回结构化 JSONstructuredContent),失败时 isError=true 并携带 error/error_type 等字段,便于 AI 精确处理错误。

English docs: README_EN.md


功能一览(15 个工具 + 2 个资源)

类别

工具

说明

环境

discover_tools

扫描 e2studio CLI / GCC / GDB / objcopy / make / RFP / J-Link,报告 FOUND/MISSING

工程

get_project_info

解析工程名、MCU 型号、FSP 版本、源文件数、构建配置目录

构建

build_project

用 e2studio-cli 增量构建;返回解析后的错误列表(file/line/column/message)

构建

clean_project

真清理(仅删 .o/.d/.elf/.map/.bin/.hex 等产物,不重建

构建

get_build_output

读取最近一次构建的原始输出/错误清单

烧录

flash_firmware

用 Renesas Flash Programmer CLI 烧录(自动定位工程名/ELF/RFP 设备)

烧录

flash_jlink

用 J-Link Commander 烧录(需安装 SEGGER J-Link 软件)

调试

debug_flash

启动 J-Link GDB Server 并烧录 ELF 到目标

调试

debug_run

通过 GDB 运行固件指定秒数,超时自动触发 HardFault 寄存器抓取

调试

debug_halt / debug_resume

挂起 / 恢复 CPU

调试

debug_memory_read

读取内存(hex dump + ASCII)

调试

debug_registers_read

读取核心寄存器 + 自动解析 CFSR/HFSR/BFAR 故障寄存器与含义

调试

debug_status / debug_stop

查看 / 停止 J-Link GDB Server 后台进程

资源:

  • e2studio://tools — 工具发现结果(JSON)

  • e2studio://workspace — 工作区目录与工程列表


Related MCP server: EmbedForge

安装 / 注册

依赖:Python 3.10+,mcp>=1.0.0(实测 1.28.1)

pip install "mcp>=1.0.0"

Claude Code — .mcp.json

{
  "mcpServers": {
    "e2studio": {
      "command": "C:\\Users\\<you>\\AppData\\Local\\Programs\\Python\\Python312\\python.exe",
      "args": ["D:\\path\\to\\mcp-e2studio-server\\server.py"]
    }
  }
}

opencode — opencode.json

{
  "mcp": {
    "e2studio": {
      "type": "local",
      "command": ["python", "D:\\path\\to\\mcp-e2studio-server\\server.py"],
      "enabled": true
    }
  }
}

建议 command 使用 Python 绝对路径(避免 PATH 里混入其他版本)。 本机已知:PATH 中的 python 为 3.12.10;C:\...\Python314 环境损坏不可用。


配置 config.json

config.example.json 复制为 config.json 并修改路径(config.json 已被 .gitignore 忽略,不会提交到仓库):

说明

默认

e2studio_install

e2studio 安装目录(含 e2studio-cli.exe

C:\Renesas\RA\e2studio_v2025-12_fsp_v6.4.0\eclipse

e2studio_toolchains

e2studio 自带 GCC 工具链根目录

同上目录下的 toolchains

rfp_base

Renesas Flash Programmer 根目录

C:\Program Files (x86)\Renesas Electronics\Programming Tools

workspace

工作区目录(资源 e2studio://workspace 展示)

D:\e2_ws_mcp

jlink_port

J-Link GDB Server 端口

2331

default_mcu

默认 MCU(找不到时兜底)

""

gcc_extra_roots

额外扫描 arm-none-eabi-gcc 的根目录列表

见 config.json

segger_roots

SEGGER J-Link 安装根目录列表

C:\Program Files\SEGGER

gcc_version_prefs

GCC 版本优先级(前缀匹配)

["13.2.rel1", ...]

环境变量(优先于 config.json)

E2STUDIO_CLI_PATHARM_GCC_PATHARM_GDB_PATHARM_OBJCOPY_PATHGNU_MAKE_PATHJLINK_GDB_PATHJLINK_PATHRFP_CLI_PATHE2STUDIO_WORKSPACERFP_DEVICERFP_TOOL_TYPE


前提条件

  • e2studio + FSP:构建/烧录必需。

  • Renesas Flash Programmerflash_firmware 必需。

  • SEGGER J-Link 软件debug_*flash_jlink 必需(discover_tools 会 报告 jlink_gdb/jlink MISSING)。本机当前未安装,安装后即可启用调试功能。


测试

# 单元测试(纯函数,无需硬件/工具链)
python -m unittest test_server -v

# 协议自测(启动 server 做 initialize / tools/list / tools/call / resources/read)
python "C:\Users\32725\AppData\Local\Temp\opencode\mcp_e2studio_handshake_test.py"

备注

  • 日志写入 stderr(stdout 是 MCP 传输通道,不得污染)。

  • 构建/烧录/调试通过全局互斥锁串行化,避免并发冲突。

  • J-Link GDB Server 作为后台进程常驻主事件循环,调试结束后用 debug_stop 释放。

  • Windows 控制台中文乱码仅为 GBK 显示问题,协议传输为 UTF-8。

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    A
    quality
    C
    maintenance
    Stateful MCP server for driving debug probes (J-Link) to flash, debug, and inspect embedded targets. Enables AI agents to perform flash, memory, breakpoint, and ELF/SVD-aware operations conversationally.
    41
    11
    MIT
  • F
    license
    -
    quality
    C
    maintenance
    Enables AI agents to read and modify Mendix application models through MCP tools for creating modules, entities, pages, microflows, deploying, and querying runtime data.
    1
  • F
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to flash firmware, program memory, modify option bytes, erase chips, reset boards, and capture SWO printf traces for STM32 microcontrollers via STM32CubeCLT.
    12

View all related MCP servers

Related MCP Connectors

  • Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.

  • Project management MCP for AI agents with safe task reads and writes.

  • Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).

View all MCP Connectors

Latest Blog Posts

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/Helistana/mcp-e2studio-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server