Ref
Ref is an MCP server for providing context to coding agents.
Core trick
Builds a local vector index, graph index, and text-search index over a codebase, served to coding agents over MCP.
Description
Ref is an MCP server for providing context to coding agents. For this project I explored adding code base indexing.
GPT5 wrote a vectordb, graphdb and text-search index for code that run in a local MCP server. It then wrote a benchmark to evaluate performance and optimized for it. Then, of course, rewrote to Rust.
I also explored GPT5's UI generation using Goose + mcp-ui to have GPT5 generate UI on the fly to visualize the codebase.
README excerpt
[](https://ref.tools) [](https://smithery.ai/server/@ref-tools/ref-tools-mcp) [](https://ref.tools) [](LICENSE) [](https://www.npmjs.com/package/ref-tools-mcp) # Ref MCP A [ModelContextProtocol](https://modelcontextprotocol.io) server that gives your AI coding tool or agent access to documentation for APIs, services, libraries etc. It's your one-stop-shop to keep your agent up-to-date on documentation in a fast and token-efficient way. For more see info [ref.tools](https://ref.tools) ## Agentic search for exactly the right context Ref's tools are designed to match how models search while using as little context as possible to reduce [context rot](https://research.trychroma.com/context-rot). The goal is to find exactly the context your coding agent needs to be successful while using minimum tokens. Depending on the complexity of the prompt, LLM coding agents like Claude Code will typically do one or more searches and then choose a few resources to read in more depth. For a simple query about Figma's Comment REST API it will make a couple calls to get exactly what it needs: ``` SEARCH 'Figma API post comment endpoint documentation' (54 tokens) READ https://www.figma.com/developers/