Skip to main content

Native cross-platform MCP server for AMD/Xilinx Vivado FPGA development

Project description

Vivado MCP Native

English | 简体中文

A cross-platform Model Context Protocol (MCP) server for AMD/Xilinx Vivado. It lets MCP-compatible AI clients start and manage Vivado, open projects, run synthesis and implementation, inspect timing and utilization, control simulation, and execute Tcl commands.

This project uses a persistent subprocess Tcl session that works natively on Windows and Linux. It does not depend on the Unix-only pexpect transport.

[!IMPORTANT] Vivado is not included. Device support, licensed features, and available FPGA families are determined by the Vivado installation on the host machine.

[!WARNING] The name vivado-mcp on PyPI belongs to a different project. Install this project as vivado-mcp-native.

Highlights

  • Native launch of Windows vivado.bat and vivado.cmd files.
  • Direct Linux executable launch without an intermediate shell.
  • One persistent Vivado Tcl process reused across MCP calls.
  • UUID-framed command protocol that separates stdout, Tcl return values, return codes, and error stacks.
  • UTF-8 hex transport for quotes, braces, backslashes, multiline Tcl, Unicode, and Windows paths.
  • Full process-tree cleanup after command timeouts.
  • Vivado discovery through VIVADO_PATH, PATH, and common installation directories.
  • A vivado-mcp-native-doctor command for checking the local Python-to-Vivado connection.

Requirements

Component Requirement
Operating system Windows 10/11 or Linux
Python 3.10–3.12
Vivado Local AMD/Xilinx Vivado installation
License Appropriate for the operations and FPGA devices you use

Installation

From PyPI — recommended

Install the isolated command-line application with pipx:

py -m pip install --user --upgrade pipx
py -m pipx ensurepath
py -m pipx install vivado-mcp-native

Linux:

python3 -m pip install --user --upgrade pipx
python3 -m pipx ensurepath
python3 -m pipx install vivado-mcp-native

Installed commands:

  • vivado-mcp-native — start the MCP server;
  • vivado-mcp-native-doctor — check the local Vivado connection;
  • vivado-mcp-win and vivado-mcp-win-doctor — compatibility aliases.

Install the latest source from GitHub

py -m pipx install --force "https://github.com/Arthurzxy/vivado_mcp_native/archive/refs/heads/master.zip"

Dedicated virtual environment

$venv = "$env:LOCALAPPDATA\vivado-mcp-native"
py -3.11 -m venv $venv
& "$venv\Scripts\python.exe" -m pip install --upgrade pip
& "$venv\Scripts\python.exe" -m pip install --upgrade vivado-mcp-native

Select the Vivado installation

VIVADO_PATH and the start_session tool's vivado_path argument may point to:

  • the complete vivado.bat, vivado.cmd, vivado.exe, or Linux vivado launcher;
  • the Vivado bin directory;
  • the Vivado version directory.

Example:

$env:VIVADO_PATH = "D:\Xilinx\Vivado\2025.2\bin\vivado.bat"

Without an explicit path, the server checks PATH and common Windows locations such as:

C:\Xilinx\Vivado\*\bin\vivado.bat
C:\AMD\Vivado\*\bin\vivado.bat
C:\Program Files\AMD\Vivado\*\bin\vivado.bat

Check the Vivado connection

vivado-mcp-native-doctor --vivado-path "D:\Xilinx\Vivado\2025.2\bin\vivado.bat"

The path may also be a Vivado bin directory or version directory. Machine-readable output is available with --json:

vivado-mcp-native-doctor --vivado-path "D:\Xilinx\Vivado\2025.2" --json

The diagnostic command resolves the launcher, starts a persistent Tcl session, queries Vivado and Tcl versions, checks Tcl command transport and Unicode handling, verifies session health, and closes Vivado cleanly. It does not open or modify a user project.

Configure an MCP client

Find the installed executable:

(Get-Command vivado-mcp-native).Source

Example configuration for a pipx installation:

{
  "mcpServers": {
    "vivado": {
      "command": "C:\\Users\\you\\.local\\bin\\vivado-mcp-native.exe",
      "env": {
        "VIVADO_PATH": "D:\\Xilinx\\Vivado\\2025.2\\bin\\vivado.bat"
      }
    }
  }
}

Example configuration for a virtual environment:

{
  "mcpServers": {
    "vivado": {
      "command": "C:\\Users\\you\\AppData\\Local\\vivado-mcp-native\\Scripts\\python.exe",
      "args": ["-m", "vivado_mcp"],
      "env": {
        "VIVADO_PATH": "D:\\Xilinx\\Vivado\\2025.2\\bin\\vivado.bat"
      }
    }
  }
}

Using an absolute executable or Python path avoids depending on the MCP client's PATH environment.

Capabilities

Category Representative tools Purpose
Session management start_session, stop_session, session_status, get_host_status Start or stop Vivado and inspect session or host state
Project management open_project, close_project, get_project_info Open .xpr projects and read project information
Design flow run_synthesis, run_implementation, generate_bitstream Run synthesis, place-and-route, and bitstream generation
Reports get_timing_summary, get_timing_paths, get_utilization, get_clocks, get_messages Read timing, resource, clock, and message reports
Design queries get_design_hierarchy, get_ports, get_nets, get_cells Inspect hierarchy, ports, nets, and cells
Simulation launch_simulation, run_simulation, restart_simulation, get_signal_value Control xsim and inspect signals
Advanced run_tcl, generate_full_report, read_report_section Execute Tcl and read large reports

Architecture

MCP-compatible client
        │ MCP / stdio
        ▼
Vivado MCP server
        │ persistent subprocess Tcl session
        ▼
AMD/Xilinx Vivado -mode tcl

Each command is transported as UTF-8 hex and wrapped with unique markers. The server extracts stdout, the Tcl result, return code, and error stack without relying on the localized Vivado% prompt.

Troubleshooting

Vivado does not start

Verify the launcher directly:

& "D:\Xilinx\Vivado\2025.2\bin\vivado.bat" -mode tcl

Then run vivado-mcp-native-doctor and check the path, installation, permissions, environment, and license configuration.

Chinese output is corrupted

Override the Windows output decoder when necessary:

$env:VIVADO_MCP_OUTPUT_ENCODING = "gbk"

Use utf-8, gbk, or the encoding that matches the Vivado Tcl console.

A command times out

The server terminates the Vivado process tree after a timeout to avoid a desynchronized session. Start a new session and use a larger timeout for long synthesis or implementation runs.

More Windows guidance is available in WINDOWS_INSTALL.md.

Security

run_tcl can execute arbitrary Tcl with the current user's permissions, including file operations and external process launches. Expose this server only to trusted MCP clients and review high-impact commands and paths.

License

This project is available under the MIT License.

Acknowledgments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vivado_mcp_native-0.2.0.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vivado_mcp_native-0.2.0-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file vivado_mcp_native-0.2.0.tar.gz.

File metadata

  • Download URL: vivado_mcp_native-0.2.0.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for vivado_mcp_native-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7dd2594102c88dc8b5029c2fe0baef13dd40e5e9026b3c91f964f59d64aaf81b
MD5 ba71e690ccf85e7230a1425840ab5c37
BLAKE2b-256 492ef29271dd16e27684d23f261732c704906a7716172cb666e0f05c85e2d692

See more details on using hashes here.

Provenance

The following attestation bundles were made for vivado_mcp_native-0.2.0.tar.gz:

Publisher: publish-pypi.yml on Arthurzxy/vivado_mcp_native

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vivado_mcp_native-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for vivado_mcp_native-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fdb296607e5dc82d843975efefe51ace27ab5cd1b856f4414c770197312ae95
MD5 1783612d298ce8307d0d10759b303449
BLAKE2b-256 ee78533c7844f51a743ca641eaf442a3238f35ae5af326d6b1ffc246d823571e

See more details on using hashes here.

Provenance

The following attestation bundles were made for vivado_mcp_native-0.2.0-py3-none-any.whl:

Publisher: publish-pypi.yml on Arthurzxy/vivado_mcp_native

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page