IC

iarsystems/cspy-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

5 stars 5 forks Качество 84 Тренд 33MIT

MCP Connector to use with IAR C-SPY Debugger

Обзор

An MCP server, iar-cspy-mcp, that exposes the IAR C-SPY debugger, and the Embedded Workbench project and option services, to AI assistants (Claude Code, Claude Desktop, VS Code Copilot, ...) as tools. It drives the backend over its Thrift interfaces, on a simulator or real hardware. The server is a thin layer over the iar-cspy Python API: each tool parses its arguments, calls the API, and returns plain JSON. For scripts and pytest hardware-in-the-loop tests, use that API directly. Install the server (it brings the iar-cspy API along) and point it at your IAR installation, the directory with common/bin under it: To pin a version, add @ after the repository URL. Normally your MCP client starts the server for you; see below. All examples use managed mode: the server starts the backend itself from an IAR installation or build stage (the directory with common/bin under it). Adjust the path to your machine. See Backend modes for what managed and standalone mode do. : .mcp.

README

Показан фрагмент оригинального README. Открыть оригинал.

cspy-mcp: MCP server for IAR C-SPY

An MCP server, iar-cspy-mcp, that exposes the IAR C-SPY debugger, and the Embedded Workbench project and option services, to AI assistants (Claude Code, Claude Desktop, VS Code Copilot, …) as tools. It drives the backend over its Thrift interfaces, on a simulator or real hardware.

The server is a thin layer over the iar-cspy Python API: each tool parses its arguments, calls the API, and returns plain JSON. For scripts and pytest hardware-in-the-loop tests, use that API directly.

Licensed under the MIT License.

Getting started

Install the server (it brings the iar-cspy API along) and point it at your IAR installation, the directory with common/bin under it:

pip install "iar-cspy-mcp @ git+https://github.com/iarsystems/cspy-mcp"
iar-cspy-mcp --iar-path /opt/iar/ewarm       # or: python -m iar_cspy_mcp

To pin a version, add @ after the repository URL. Normally your MCP client starts the server for you; see below.

Add it to your MCP client

All examples use managed mode: the server starts the backend itself from an IAR installation or build stage (the directory with common/bin under it). Adjust the path to your machine. See Backend modes for what managed and standalone mode do.

Claude Code: .mcp.json in your project (or ~/.claude.json), or claude mcp add cspy-debugger -- iar-cspy-mcp --iar-path /opt/iar/ewarm:

{
  "mcpServers": {
    "cspy-debugger": {
      "command": "iar-cspy-mcp",
      "args": ["--iar-path", "/opt/iar/ewarm"]
    }
  }
}

Claude Desktop: the same mcpServers block in claude_desktop_config.json (Settings > Developer > Edit Config).

VS Code Copilot: .vscode/mcp.json (or MCP: Add Server):

{
  "servers": {
    "cspy-debugger": {
      "type": "stdio",
      "command": "iar-cspy-mcp",
      "args": ["--iar-path", "C:\\iar\\ewarm-9.60"]
    }
  }
}

If iar-cspy-mcp is not on the client’s PATH, use the virtualenv’s Python: "command": "/abs/path/.venv/bin/python", "args": ["-m", "iar_cspy_mcp", ...]. From a checkout without installing, run_headless.sh does the same over stdio (see Helper scripts).

An already-running backend (standalone mode): replace --iar-path with its service registry:

"args": ["--registry-host", "127.0.0.1", "--registry-port", "51926"]

Requirements

Python 3.10+ on Linux or Windows, and either an IAR installation or an already-running backend to connect to. The installation is the directory with common/bin under it (for example IAR Embedded Workbench for Arm), and it needs to ship CSpyServer2; the backend is then started for you. The project

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "cspy-debugger": { "command": "iar-cspy-mcp", "args": ["--iar-path", "/opt/iar/ewarm"] } } }