← All projects

Vector MCP Server — Go

Deterministic MCP server in Go following the Fat Tool pattern — local ONNX embeddings, deep LSP integration, zero generative-AI dependencies.

vector-mcp-go is a Model Context Protocol server in Go that hands coding agents precise answers about a codebase: semantic search, symbol graphs, and LSP-backed navigation. It predates the Rust rewrite and set the contract both servers still honour — the model reasons, the server only retrieves.

Why Go

  • Local embeddings. ONNX Runtime produces vectors in-process from bge-m3 or bge-small-en-v1.5. There are zero generative-AI dependencies, and no embedding request ever leaves the machine.
  • A deterministic core. The server is 100% deterministic — same query in, same bytes out. All reasoning is delegated to the client LLM, which keeps retrieval reproducible instead of improvised.
  • The Fat Tool Pattern. Exactly five consolidated tools cover the entire surface. New features land as action enums on existing tools rather than fresh registrations, so an agent’s tool menu stays short and its choices unambiguous.

Capabilities

  • search_workspace exposes four unified actions behind one call shape: vector for semantic lookup, regex for literal patterns, graph for symbol relationships, and index_status for index health.
  • lsp_query resolves definitions, references, type hierarchies, diagnostics, and blast-radius analysis — an agent can size a change’s reach before it writes a line.

Safety model

Panic-proofing is explicit. Strings are converted to []rune before any truncation slice, ruling out UTF-8 boundary panics on multibyte input; numeric request parameters are clamped before array operations, closing the other common out-of-range path. Long sessions against mixed-script repositories stay stable because neither failure mode can occur.

Stack: Go · ONNX Runtime · bge-m3 · LSP

More projects