pyslang-mcp — Claude Code MCP server for HDL analysis
This server uses the pyslang compiler frontend to inspect Verilog and SystemVerilog projects. Ask an agent about diagnostics, symbols, design units, or instance hierarchy without giving it write access.
claude mcp add pyslang-mcp -- uvx pyslang-mcpWhat pyslang-mcp does
pyslang-mcp gives an MCP client compiler-derived context for existing Verilog and SystemVerilog code. It can report frontend diagnostics, list modules, interfaces, and packages, inspect an instance tree, and locate symbol declarations and references. Other tools expose port bindings and structural connectivity.
Each request needs a project_root that the local MCP client can access. Provide source files directly or pass a .f filelist; the supported subset includes nested lists, include directories, and defines. Unsupported filelist entries can affect whether project sources are resolved. The server uses stdio and reads the checkout without modifying RTL.
This is a semantic analysis service, not a simulator, synthesizer, or linter replacement. Connectivity results describe structural frontend evidence; they do not establish circuit behavior or replace signoff checks. That boundary matters when using the results to review or debug a design.
What it helps with
- inspect compiler diagnostics for an RTL project
- check which sources and includes a
.ffilelist resolves - locate a symbol's declarations and references
- review the elaborated instance hierarchy
- trace structural signal connections
Example prompts for the agent
- Analyze
compile/project.fand summarize the compiler frontend diagnostics. - Find declarations and references for
payloadin the project rooted atrtl-project. - Show the instance hierarchy below
topand inspect its port connections.
How to install pyslang-mcp
Platform CLI
claude mcp add pyslang-mcp -- uvx pyslang-mcpuvx runs the command named after the package; if the README names another one, use uvx --from pyslang-mcp <command>
Platform CLI
codex mcp add pyslang-mcp -- uvx pyslang-mcpuvx runs the command named after the package; if the README names another one, use uvx --from pyslang-mcp <command>
Config file
{
"mcpServers": {
"pyslang-mcp": {
"command": "uvx",
"args": [
"pyslang-mcp"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from pyslang-mcp <command>
Config file
{
"servers": {
"pyslang-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"pyslang-mcp"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from pyslang-mcp <command>
Platform CLI
gemini mcp add pyslang-mcp uvx pyslang-mcpuvx runs the command named after the package; if the README names another one, use uvx --from pyslang-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about pyslang-mcp
How do I install pyslang-mcp in Claude Code?
Run claude mcp add pyslang-mcp -- uvx pyslang-mcp. Claude Code launches the local server over stdio.
What does pyslang-mcp do?
It uses pyslang to inspect Verilog and SystemVerilog projects, exposing compiler diagnostics and structural information to an MCP client. It is read-only.
Which filelist syntax does pyslang-mcp support?
Its supported subset covers source entries, nested lists using -f and -F, include directories, and defines in the listed forms. The tool reports unsupported filelist tokens.