Skip to content

Use RVBuilder with AI Agents

RVBuilder provides Model Context Protocol (MCP) servers that enable AI agents to streamline Andes RISC-V project setup, improve configuration accuracy, automate development workflows, and assist in resolving development issues.

These MCP servers expose a set of resource primitives, as shown below, that supply domain-specific reference knowledge for AI-assisted RVBuilder workflows. When handling requests or queries related to compiler options, linker scripts, debugger commands, or general RVBuilder project configuration, these resources provide the necessary context to generate accurate and relevant responses.

Resource Domain Knowledge / Reference
rvbuilder-json Target and connection settings
rvbuilder-examples Practical workflow examples
gcc-riscv GCC/G++ compiler options for RISC-V and Andes extensions
clang-riscv LLVM Clang compiler options for RISC-V
gnu-ld-riscv GNU Linker (ld) options, linker scripts, relaxation
binutils-riscv GNU Binutils (as, ar, objdump, objcopy, readelf, nm, size)
gdb-riscv GDB debugger commands
openocd-riscv OpenOCD/ICEman debug server setup and JTAG configuration

The level of control available to AI agents depends on how the MCP servers are integrated. As shown below, AI agents such as GitHub Copilot, which directly interact with the MCP server integrated in RVBuilder, provides a higher level of automation across development workflow. In contrast, AI agents that communicate with the MCP server via standard input/output (STDIO), such as Codex or Claude Code, offer comparatively limited automation and primarily assist with project configuration and development queries.

AI Agent MCP Integration Mode Capabilities for RVBuilder Projects Requires VS Code
GitHub Copilot Chat Integrated (in RVBuilder extension) Assistance with project creation/import, configuration, building, debugging, and development queries Yes
Codex Desktop/CLI Standalone (STDIO via MCP server) Assistance with project configuration and development queries No
Claude Code Desktop/CLI Standalone (STDIO via MCP server) Assistance with project configuration and development queries No

This section outlines the requirements, installation, configuration, and usage of GitHub Copilot, Codex Desktop/CLI, and Claude Code Desktop/CLI for RVBuilder project development. Note that while RVBuilder workflows support both Linux and Windows environments, the instructions for Codex/Claude Code-assisted workflows below primarily use a Windows environment with PowerShell and AI CLI as examples.

GitHub Copilot Chat

Requirements

  • Visual Studio Code (version 1.116 or later) with the RVBuilder extension installed. For installation instructions of the RVBuilder extension, see Install RVBuilder.
  • GitHub Copilot Chat extension (version 0.41 or later)
  • A GitHub account with an active Copilot subscription or a Copilot Free plan.

Installation and Setup

  1. In VS Code, click Extension in the Activity Bar.
  2. Search for the GitHub Copilot Chat extension and install it. Restart VS Code after the installation.
    GitHub Copilot Chat extension
  3. Open the Chat view (pressing Ctrl+Alt+I or clicking the Toggle Chat icon Toggle chat near the search bar). Follow the prompts to sign in with your GitHub account and authorize VS Code in the browser.

RVBuilder Development with GitHub Copilot Chat

  1. Open the Chat view in the VS Code with the RVBuilder extension installed.
  2. Call @rvbuilder followed by your request or question for RVbuilder project development. GitHub Copilot supports automation for project creation/import, configuration, building, and debugging. For example,

    • Request to import a project
      @rvbuilder Import a demo from the RVbuilder package to the workspace

    • Query about project configuration
      @rvbuilder Read the build settings of the project

    • Request to modify project settings
      @rvbuilder Configure the project to improve performance

    • Request to build and debug the project
      @rvbuilder Start debugging and show CPU register values after the program suspends

Codex

Requirements

  • Codex Desktop (version 26.421.11020 or later) or Codex CLI (version 0.122.0 or later)
  • Node.js (version 18 or later)
  • Existing RVBuilder project(s)

Installation and Setup

  1. Download the RVBuilder MCP package rvbuilder-mcp.zip from the RVBuilder MCP release page and extract it to a desired directory (e.g. D:/rvbuilder-mcp). The package contains the following components required for Codex to serve as an RVBuilder AI assistant:

    rvbuilder-mcp/
     ├── dist/
     │      └── mcp-server.js # Standalone RVBuilder MCP server 
     ├── AGENTS.md            # System prompt for Codex 
     └── resource/
            └── mcp/          # Folder of prompt and resource skills 
    

  2. Install Node.js from the official Node.js Download page. Ensure that the installed version is 18 or later, and verify that both Node.js and npm are successfully installed and accessible:

    node -v
    npm -v

  3. Install the Codex CLI using:
    npm install -g @openai/codex

  4. Set up the RVBuilder system prompt for Codex.

    • If a global AGENTS.md does not exist in $HOME/.codex/, copy AGENTS.md from the extracted RVBuilder MCP package to the user Codex directory.

      # Powershell
      Copy-Item D:/rvbuilder-mcp/AGENTS.md -Destination $HOME/.codex/AGENTS.md 
      
    • If a global AGENTS.md already exists in $HOME/.codex/, append the RVBuilder system prompt to the existing file.

      # Powershell
      Get-Content D:/rvbuilder-mcp/AGENTS.md | Add-Content $HOME/.codex/AGENTS.md 
      
  5. Edit the user configuration file $HOME/.codex/config.toml and add a section as follows to configure Codex to use the standalone MCP server from the extracted RVBuilderMCP package:

    [mcp_servers.rvbuilder]
    command = "node"
    args = ["D:/rvbuilder-mcp/dist/mcp-server.js"]
    

    Restart the Codex CLI after the configuration.

RVBuilder Development with Codex CLI

  1. Change the working directory to the desired RVBuilder project (e.g., D:/my-project).

    # Powershell
    cd D:/my-project
    
  2. Run codex followed by your request or question. Codex primarily supports project configuration tasks and provides guidance for development queries. For example,
    - codex List the current compiler and linker options for the project.
    - codex Change the compiler from GCC to Clang.

Claude Code

Requirements

  • Claude Code Desktop (version 1.3883.0 or later) or Claude Code CLI (version 2.1.112 or later)
  • Node.js (version 18 or later)
  • Existing RVBuilder project(s)

Installation and Setup

  1. Download the RVBuilder MCP package rvbuilder-mcp.zip from the RVBuilder MCP release page and extract it to a desired directory (e.g., D:/rvbuilder-mcp). The package contains the following components required for Claude Code to serve as an RVBuilder AI assistant:

    rvbuilder-mcp/
     ├── dist/
     │      └── mcp-server.js # Standalone RVBuilder MCP server 
     ├── CLAUDE.md            # System prompt for Claude Code 
     └── resource/
            └── mcp/          # Folder of prompt and resource skills 
    

  2. Install Node.js from the official Node.js Download page. Ensure that the installed version is 18 or later, and verify that both Node.js and npm are successfully installed and accessible:

    node -v
    npm -v

  3. Install the Claude Code globally.

    npm install -g @anthropic-ai/claude-code

  4. Set up the RVBuilder system prompt for Claude Code.

    • If a global CLAUDE.md does not exist, copy CLAUDE.md from the extracted RVBuilder MCP package to the user Claude directory.
      # Powershell
      Copy-Item D:/rvbuilder-mcp/CLAUDE.md -Destination $HOME/.claude/CLAUDE.md 
      
    • If a global CLAUDE.md exists in $HOME/.claude/, append the RVBuilder system prompt to the existing file.
      # Powershell
      Get-Content D:/rvbuilder-mcp/CLAUDE.md | Add-Content $HOME/.claude/CLAUDE.md 
      

RVBuilder Development with Claude Code CLI

  1. Change the working directory to the desired RVBuilder project (e.g., D:/my-project).

    # Powershell
    cd D:/my-project
    
  2. Register the standalone MCP server in the extracted RVBuilder MCP package for the project.

    # Powershell
    claude mcp add -s local rvbuilder node "D:/rvbuilder-mcp/dist/mcp-server.js"
    

  3. Run claude followed by your request or question. Claude Code primarily supports project configuration tasks and provides guidance for development queries. For example,
    - claude Change the project target to ADP-AE350-A45 and update build settings
    - claude Enable DSP for my project
    - claude What are the issues that might cause build failures?