# RepoRelay

A self-hosted code context engine that indexes Git repositories with tree-sitter and exposes them as MCP tools so AI coding assistants in any editor can search versioned, symbol-aware code context.

RepoRelay is a self-hosted code context engine for the Model Context Protocol, currently in an alpha state. A user registers repositories from GitHub, GitLab, Bitbucket, on-premise Git hosts, or local disk, chooses which branches and tags to index, each getting its own versioned snapshot, and every indexed repository then becomes available as MCP tools in Claude Desktop, Cursor, Windsurf, OpenCode, or any other MCP-capable client, managed through a REST API or an admin dashboard.

It parses source files with tree-sitter across 9 languages, extracting symbols, imports, signatures, and doc comments with symbol-aware chunking that respects function boundaries, and stores everything in a hybrid search index combining BM25 full-text search and pgvector similarity search, fused with reciprocal rank fusion. Every indexed ref is fully indexed using `git ls-tree`, with SHA-256 content addressing to skip unchanged files.

It runs entirely on the user's own infrastructure, with PostgreSQL as its only runtime dependency, a Fastify REST API, and an Angular admin dashboard; code only leaves the network through explicitly configured providers, such as the LLM connected over MCP or the embedding provider used during indexing, and a local Ollama setup keeps embeddings on-box as well.

Website: https://chwoerz.github.io/reporelay/
