# pyslang-mcp

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 21
- Author: ariklapid
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ariklapid/pyslang-mcp
- Updated: 2026-06-14
- HTML: https://affpapa.org/en/nevibecode/mcp/pyslang-mcp

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add pyslang-mcp -- uvx pyslang-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyslang-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add pyslang-mcp -- uvx pyslang-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyslang-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add pyslang-mcp uvx pyslang-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from pyslang-mcp <command>

## When to use it
- inspect compiler diagnostics for an RTL project
- check which sources and includes a `.f` filelist resolves
- locate a symbol's declarations and references
- review the elaborated instance hierarchy
- trace structural signal connections

## Example prompts
- Analyze `compile/project.f` and summarize the compiler frontend diagnostics.
- Find declarations and references for `payload` in the project rooted at `rtl-project`.
- Show the instance hierarchy below `top` and inspect its port connections.

## Similar
- [systemverilog](https://affpapa.org/en/nevibecode/skills/systemverilog.md) — skill · 1100 installs
- [fpga](https://affpapa.org/en/nevibecode/skills/fpga.md) — skill · 1100 installs
- [Silica](https://affpapa.org/en/nevibecode/mcp/silica.md) — MCP server · ★ 13
- [rust-best-practices](https://affpapa.org/en/nevibecode/skills/rust-best-practices.md) — skill · 21200 installs
- [m15-anti-pattern](https://affpapa.org/en/nevibecode/skills/m15-anti-pattern.md) — skill · 8600 installs
- [platform-apex-generate](https://affpapa.org/en/nevibecode/skills/platform-apex-generate.md) — skill · 7100 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
