Skip to main content

SystemVerilog Navigation MCP service for AI agents

Project description

sv-nav

SystemVerilog navigation MCP service for AI agents.

Wraps slang-server LSP capabilities into an MCP (Model Context Protocol) service, providing semantic APIs — AI agents can query by signal name and hierarchy path instead of file URI + line/column, and get structured, deduplicated results without dealing with LSP protocol details.

Installation

pip install sv-nav-mcp

Requirements

Configuration

Add to your project's .claude/settings.json or global ~/.claude/settings.json:

{
  "mcpServers": {
    "sv-nav": {
      "command": "sv-nav-mcp"
    }
  }
}

With verbose logging (output to stderr):

{
  "mcpServers": {
    "sv-nav": {
      "command": "sv-nav-mcp",
      "args": ["--verbose"]
    }
  }
}

Tools

Lifecycle

Tool Description
sv_init Initialize with top_module and build_file (.f). Required first call.
sv_refresh Refresh file content after external changes. Optional file to refresh a single file.
sv_reinit Full server restart. Expensive, use sparingly.

Navigation

Tool Description
sv_search Search symbols by regex. Global or scoped to a module/hierarchy path.
sv_definition Get symbol definition with hover content. For modules/instances, also returns ports and params.
sv_refs Find all references to a symbol or module.
sv_hierarchy Browse instance hierarchy tree (Build mode).

Tracing

Tool Description
sv_cone Trace signal driver/load cone, automatically merging duplicate nodes (Build mode).

Diagnostics

Tool Description
sv_diagnostics Get compilation errors and warnings. Supports context filtering and auto-refresh.

sv_definition: Elaborated vs Declaration Data

The data level depends on the context parameter:

  • Hierarchy path context (e.g. "top.cpu"): Returns elaborated data — instance-specific parameter values, resolved types (e.g. logic[7:0] instead of logic[W-1:0]). elaborated=True.
  • Module name context (e.g. "cpu"): Returns declaration data — source-level defaults, no type/value enrichment. elaborated=False.
  • No context: Global module search, declaration data.

Build File Format (.f)

sv_init requires a build file listing source files:

// One source file path per line
// Lines starting with // are comments
// Environment variables ($VAR, ${VAR}) are expanded
// +incdir+ directives and lines with unresolvable vars are skipped
rtl/module_a.sv
rtl/module_b.sv
$SHARED_DIR/util.sv
  • Relative paths resolve from the .f file's directory
  • No dependency ordering required

Typical Workflow

  1. sv_init(top_module="ibex_core", build_file="rtl/ibex_core.f")
  2. sv_search to find symbols of interest
  3. sv_definition to get definition details and internal structure
  4. sv_refs to find all usages
  5. sv_cone to trace signal drivers/loads
  6. sv_diagnostics to check for errors

License

MIT

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

sv_nav_mcp-0.1.0.tar.gz (38.2 kB view details)

Uploaded Source

Built Distribution

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

sv_nav_mcp-0.1.0-py3-none-any.whl (35.2 kB view details)

Uploaded Python 3

File details

Details for the file sv_nav_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: sv_nav_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 38.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for sv_nav_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e45db51e40df96c1c23b99709b0a61f0c869c6f34fc921fd2c4db75a5b2e09ff
MD5 8a86b43df95e5a092d3cea08efb04e02
BLAKE2b-256 514602da7461202e0d440c071b09cf64c6b9a8792655d5b3fc658ef301bcbf18

See more details on using hashes here.

File details

Details for the file sv_nav_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sv_nav_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 35.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for sv_nav_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a882cd0caf436a6fb41c410facaf3b568e442760d318b0a7d4a58fd462dedc88
MD5 84d58d68718af32afd56731a55c1b7e8
BLAKE2b-256 e096440f2dba2cafdb31d52d6d28e3332dcc3de78e104c2563131c770d5a3942

See more details on using hashes here.

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