What the vex MCP server does
The vex MCP server connects an AI agent to a locally indexed source tree. It is designed for repository exploration: finding symbols, extracting their bodies, locating references, following callers and callees, inspecting implementations, matching syntax patterns, and searching by meaning. Results are intended to be more compact than returning complete files, which can reduce the amount of code an agent needs to process.
Vex indexes source code with tree-sitter and supports 19 languages. Eight languages—Rust, TypeScript, Python, C#, C++, Go, Java, and Kotlin—support binder-aware strict usage queries. Other supported languages provide structural and semantic search, with varying levels of pattern and reference coverage.
How it works
The vex MCP server uses a pre-built local index rather than scanning the entire repository for every request. The index contains an FST for symbol names, BM25 data for body terms, a semantic HNSW index, call-graph data, type relationships, and a trigram skip index. Search combines structural, lexical, and semantic rankings with Reciprocal Rank Fusion.
Index creation is a one-time cost for a project, while later searches are intended to be fast. Callers and callees are read from persisted graph indexes. Module-level expressions can appear under synthetic module callers, and several decorator or attribute forms produce forward edges, but dynamic dispatch, reflection, string-based factories, and macro-expanded references are not resolved.
Use exact-oriented operations for exact questions. Symbol checks, body extraction, and strict usages are better suited to confirming a definition or reference than the general ranked search, which may return related callers or imports when no literal symbol match exists.
Setup and configuration
Install the vex command and the separate vex-mcp executable using the project’s install script, Homebrew, cargo-binstall, crates.io, or a Rust source build. The documented prebuilt install targets macOS arm64 and Linux x86_64; cargo and source installation cover additional platforms where the required Rust toolchain is available.
After installation, build an index with vex index before querying the repository. The project describes the binary as requiring no external database, Docker container, or LSP server, and lists no required environment variables in the provided setup material. The MCP executable is named vex-mcp.
Tools and capabilities
The vex MCP server is suitable for agent workflows requiring:
- Symbol existence checks and focused symbol-body extraction.
- Reference discovery, including strict binder-resolved usages where supported.
- Caller, callee, implementation, and type-hierarchy queries.
- Fuzzy and multi-word BM25 search combined with semantic search.
- AST pattern matching with language selection.
- Similar-symbol lookup and near-duplicate detection.
- Bundled context containing a symbol, related calls, and similar code.
Limitations and notes
Vex is a static-analysis index, not an LSP replacement. It does not provide dependency-aware go-to-definition, rename refactoring, type checking, or hover documentation. Usage accuracy is strongest in the eight binder-supported languages; identifier scanning in the remaining languages can produce more false positives.
The general search command is ranked rather than an exact-name lookup. Framework routing, reflection, dynamic dispatch, and macro expansion can remain invisible, so textual grep is the documented fallback for those cases. Class-level decorators are also not covered by the described call-graph behavior.