vhdl-rag-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@vhdl-rag-mcpFind all VHDL processes and C code that reference fifo_write"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
vhdl-rag-mcp
An MCP (Model Context Protocol) server that gives coding agents high-quality semantic search over an organization's VHDL code, VHDL-related documentation, and general source code (C/C++, Python, ...) — all cross-referenced, all with exact source attribution.
Runs as uvx vhdl-rag-mcp over stdio. No external services required:
Qdrant runs embedded and the embedding models run locally (ONNX via
FastEmbed).
Capabilities
Three indexed domains, one server. VHDL source, documentation (Markdown/reST/text), and general code (C/C++, Python, ...) live in three Qdrant collections, each with a dense (jina v2) and a sparse (BM25) vector per chunk.
Hybrid search. Every query runs Qdrant's native hybrid (dense + sparse, RRF-fused) query: semantic similarity and exact identifier matching in one call. Ask about
rst_nand you get it.VHDL-aware chunking. VHDL files are chunked per construct (entity, architecture, process, package, function, component) using the vhdl_ls language server (
documentSymbolwith exact line ranges), with a structural line-scanner fallback for files with syntax errors — and a whole-file last resort so no VHDL is ever lost.Structure-aware chunking elsewhere. Documentation is chunked per heading section; general code is chunked per top-level function/class by tree-sitter (any language with a grammar), with file-scope gap chunks for uncovered top-level code.
Cross-referencing. Every chunk payload stores the identifiers it defines or references (
symbols). Search tools accept asymbolsfilter that matches chunks referencing the given identifiers — bridging docs ↔ VHDL ↔ test code (e.g. find every VHDL process and C function that touchfifo_write).Priority-aware ranking. Repositories carry a category (
golden>approved>project>legacy, or an explicitpriority0–100) that applies a bounded bonus to the fused score: reference repositories win relevance ties without drowning out true similarity.Exact source attribution. Every result names repository, file, line range, and commit;
get_sourcereturns the exact current file (or a line range) from the synced working tree.Incremental, self-maintaining index. Repositories are synced from Git (clone/fetch/diff): only changed files are re-chunked and re-embedded. A background task syncs every
sync_intervalseconds; the tools can force a sync or a full reindex at any time.Graceful degradation. Failures are contained per repository and recorded in state; a broken repository never blocks the others or the server.
Stdout is protocol-clean. All logging goes to stderr and a rotating log file, so the server is safe to run from any MCP host.
Related MCP server: PAMPA
Installation
Requirements:
uv (for
uvx), Python ≥ 3.12Git (with your normal credentials/SSH setup for private repos)
The
vhdl_lsbinary (only needed for repositories that contain VHDL): install a release from https://vhdl-lang.org/ sovhdl_lsis on yourPATH, or pointvhdl_ls_pathat the binary. Thevhdl_librariesdirectory shipped next to the binary is auto-detected.
$ uvx vhdl-rag-mcp --help
# (the server speaks MCP over stdio; --help is not a flag — see "Usage")On first start the server creates its data directory, downloads the
embedding models (jina v2 base-code + base-en, ~tens of MB each,
once), and performs an initial sync of all configured repositories.
Configuration
Config file: ~/.config/vhdl-rag/config.toml (created with a
commented template on first run if absent).
data_dir = "~/.local/share/vhdl-rag" # all state lives here
sync_interval = 300 # seconds between periodic syncs
vhdl_ls_path = "vhdl_ls" # binary on PATH or full path
log_level = "INFO"
[embeddings]
vhdl_model = "jinaai/jina-embeddings-v2-base-code" # per-collection dense models
docs_model = "jinaai/jina-embeddings-v2-base-en"
code_model = "jinaai/jina-embeddings-v2-base-code"
sparse_model = "Qdrant/bm25" # one shared sparse model
[qdrant]
mode = "local" # embedded (default) — or "server" with url
# url = "http://qdrant:6333"
[[repositories]]
name = "company-standards" # unique, [A-Za-z0-9._-]
url = "git@github.com:company/vhdl-standards.git"
ref = "main" # branch (tracked on every sync),
# tag, or commit SHA (pinned)
category = "golden" # golden | approved | project | legacy
priority = 100 # optional 0-100 (defaults by category:
# golden=100, approved=90, project=70, legacy=20)
# domains = ["vhdl", "docs", "code"] # which domains to index (default: all)
# exclude = ["sim", "build/*", "*.log"]# glob path excludes ('*' crosses '/');
# wildcard-free patterns exclude the subtreeNotes:
ref: a branch name is fetched and tracked on every sync. A tag or commit SHA pins the repository (a full 40-hex SHA skips the network fetch entirely).Per-repository domains/excludes: index only what a repository should contribute — e.g.
domains = ["vhdl"]for a pure IP repository,exclude = ["sim"]to skip simulation-only files.Changing embedding models changes the dense vector dimension; the server fails loudly with an actionable message instead of corrupting the index (delete the collection or
data_dirand reindex).
Usage
Run the server
$ uvx vhdl-rag-mcpIt serves MCP over stdio until the host closes the connection; a
background task syncs all repositories every sync_interval seconds.
A single-instance lock (data_dir/server.lock) prevents two servers
from sharing one data directory.
Register with an MCP client
Claude Code:
$ claude mcp add vhdl-rag-mcp -- uvx vhdl-rag-mcpMaki (TOML config — verify the exact table names against your Maki version's docs):
[mcp_servers.vhdl_rag_mcp]
command = "uvx"
args = ["vhdl-rag-mcp"]Tools
Tool | What it does |
| Hybrid search over VHDL source (entities, architectures, processes, packages, functions). |
| Same over documentation sections. |
| Same over general code units (functions/classes). |
| All three domains at once, RRF-fused. |
| Exact current file content (or a slice) with commit attribution. |
| Per repository: category, ref, domains, last indexed commit, last sync, last error. |
| Incremental sync (default: all). Failures contained per repository. |
| Drop and rebuild one repository's index. |
All search tools take optional repository (name) and category
(golden/approved/project/legacy) filters, plus symbols: list[str] —
restrict results to chunks referencing any of the given identifiers.
Results are rendered as markdown with source attribution, score, and
referenced identifiers; content is fenced by domain.
Example agent flow:
search_knowledge("asynchronous reset conventions")→ a docs section plus VHDL processes that implement resets.search_vhdl("reset", symbols=["rst_n"])→ every VHDL chunk touchingrst_n.get_source("company-standards", "rtl/reset_ctrl.vhd", 12, 40)→ the exact lines to copy.
Operations
Data directory (
data_dir): Qdrant collections, the per-repo Git working trees (<name>/), sync state (state/repositories.json), the log file (logs/vhdl-rag-mcp.log), and the lock file. Deleting it resets the index.State & retries: a repository's
indexed_commitadvances only after its index update fully succeeded; a failed sync keeps the previous commit and the next sync retries the same diff.last_sync_erroris visible viarepository_status.Removing a repository from the config: on the next start the server detects it in the state file and automatically drops all of its chunks and state.
Logs:
stderr+logs/vhdl-rag-mcp.log(rotating, 3×5 MB).log_level = "DEBUG"for LSP/git/embedding detail.
Development
$ uv sync
$ uv run ruff format -q . && uv run ruff check . # format + lint
$ uv run mypy src # strict types
$ uv run pytest -q # offline test suiteThe test suite runs fully offline: local file:// git remotes, a fake
LSP server script, and fake embedding providers (one real-binary test
is gated on the VHDL_LS_TEST_BIN environment variable).
Layout:
src/vhdl_rag_mcp/
config.py typed config (pydantic) + default template
state.py atomic repository sync state
git_manager.py async clone/fetch/checkout + incremental SyncPlan
routing.py extension -> domain classification (+domains/excludes)
lsp/client.py vhdl_ls LSP client (handshake, quiet-wait, symbols)
embeddings/ FastEmbed dense/sparse providers (per-collection + shared)
vector_store.py Qdrant wrapper: hybrid RRF query, payload filters
indexing/ vhdl (LSP-primary), docs (sections), code (tree-sitter),
pipeline (incremental sync driver)
retrieval.py search service: fusion, priority bonus, source access
server.py FastMCP tools + startup + periodic sync + lockMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables semantic code search across multiple repositories using natural language queries. Provides intelligent code discovery, symbol lookups, and cross-repo dependency analysis for AI coding agents.MIT
- AlicenseNot gradedqualityCmaintenanceProvides semantic code search and retrieval capabilities for AI agents, enabling them to query codebases using natural language with automatic learning, hybrid search, and intelligent chunking of functions and classes.429ISC
- FlicenseNot gradedqualityBmaintenanceEnables AI agents and IDEs to ingest and search code repositories using hybrid retrieval (dense + sparse) with exact line-level citations for precise code analysis.1
- FlicenseAqualityBmaintenanceGives coding agents a memory of codebases by searching repositories using semantic similarity and structural call/import graphs, enabling reuse of proven patterns and reducing token usage.6
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Token-efficient search for coding agents over public and private documentation.
Page-cited retrieval for embedded docs, datasheets, MISRA, CMSIS, and RTOS references.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ru551n/vhdl-rag-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server