convez.ai
MCP ServerAutomaçãoAvançado
rye00940094

CANoe MCP Debugger

rye00940094/canoe-mcp-debugger

Debug interativo de projetos Vector CANoe via MCP e COM

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP interativo que expõe o Vector CANoe como ferramentas para debug passo-a-passo de projetos através de COM. Mantém uma sessão PowerShell persistente permitindo controle contínuo: abrir configurações, compilar CAPL, gerenciar medições, ler variáveis e sinais, chamar funções CAPL e executar módulos de teste.

Instalação

$npx convez-ai rye00940094/canoe-mcp-debugger

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
2
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Debug passo-a-passo de projetos CAN/CANoe através de agentes IA
  • Automação de testes de módulos CANoe com controle fino de estado
  • Inspeção interativa de variáveis, sinais e mensagens CAN em tempo de execução

Veredito

Solução especializada e bem-estruturada para quem trabalha com Vector CANoe em automação. Requer Windows, CANoe instalado e conhecimento técnico de CAN/CAPL, mas resolve um problema real: transformar CANoe em debugger interativo controlável por agentes.

README

A tradução para o português deste README ainda está na fila.

CANoe MCP Debugger

Interactive MCP server for operating and debugging Vector CANoe projects through COM.

What it does

This server exposes CANoe as MCP tools so an agent can debug step-by-step instead of running one fixed script. It keeps CANoe controllable through repeated MCP calls:

  • open a CANoe configuration
  • compile CAPL
  • start/stop measurement
  • read the Write Window
  • read/write system variables
  • read bus signals
  • call CAPL functions
  • list and start test modules
  • wait for measurement and test module COM events
  • collect a compact debug snapshot

The MCP server keeps a persistent PowerShell COM session bridge alive for the lifetime of the MCP server. This is required for interactive debugging: canoe_open_configuration creates/attaches the CANoe COM object once, and later tools reuse the same CANoe instance instead of trying to recover it from another process.

Requirements

  • Windows with Vector CANoe installed and COM registered
  • Node.js 20+
  • PowerShell 5+
  • Hermes Agent or another MCP client

This project targets local Windows execution. On this machine Hermes terminal uses Git Bash/MSYS, but the MCP server itself calls powershell.exe directly.

Install

npm install
npm test

Run as a stdio MCP server

npm start

Hermes config example:

mcp_servers:
  canoe:
    command: "node"
    args: ["D:/BYD_AGC/canoe-mcp-debugger/src/server.js"]
    timeout: 180
    connect_timeout: 60

Restart Hermes after adding the config. Tools will appear with names similar to mcp_canoe_canoe_status.

Tools

ToolPurpose
canoe_statusCANoe COM/process/config/measurement status
canoe_open_configurationOpen .cfg / CANoe configuration
canoe_compile_caplCompile CAPL
canoe_start_measurementStart measurement
canoe_stop_measurementStop measurement
canoe_read_write_windowRead Write Window tail
canoe_get_system_variableRead system variable
canoe_set_system_variableWrite system variable
canoe_get_signalRead signal value
canoe_call_capl_functionCall exposed CAPL function
canoe_list_test_modulesEnumerate test modules
canoe_start_test_moduleStart selected test module and wait for TSTestModule.OnStart
canoe_wait_measurementWait for Measurement.OnStart / Measurement.OnStop
canoe_wait_test_moduleWait for TSTestModule.OnStop and return stop reason / verdict when available
canoe_snapshotStatus + Write Window + test module snapshot

Typical interactive flow

  1. canoe_open_configuration with the project .cfg path.
  2. canoe_compile_capl.
  3. canoe_start_measurement or canoe_wait_measurement to synchronize with measurement state.
  4. canoe_read_write_window to inspect startup errors.
  5. canoe_set_system_variable / canoe_call_capl_function to drive the setup.
  6. canoe_start_test_module to run one module.
  7. canoe_wait_test_module to wait for completion and collect stop reason / verdict.
  8. canoe_snapshot after failures to decide the next action.

CANoe notes

  • COM controls external CANoe automation; arbitrary CAN transmission should normally go through CAPL functions or signal/sysvar interaction.
  • The stdio MCP server is stateful by design. Restarting the MCP server loses the in-memory CANoe COM handle; call canoe_open_configuration again after a restart.
  • CAPL function handles must be valid in the loaded configuration; some workflows require preparation during Measurement.OnInit.
  • Measurement and test-module synchronization uses a VBScript helper with WScript.ConnectObject, matching CANoe COM examples for Measurement.OnStart, Measurement.OnStop, TSTestModule.OnStart, TSTestModule.OnStop, and TSTestModule.OnVerdictFail.
  • .NET modules execute in RuntimeKernel.exe; attach there for managed-code breakpoints.
  • If multiple CANoe versions are installed, register/launch the intended CANoe version before using COM.

Environment variables

  • CANOE_MCP_POWERSHELL: override PowerShell executable path. Defaults to powershell.exe.

Smoke test

npm test starts the MCP server through the SDK stdio client and verifies tool discovery. It does not require CANoe to be installed.

Ver o original no GitHub

Bom para

Relacionados