ref-tools-mcp  by ref-tools

Stop AI hallucinations with token-efficient documentation search

Created 9 months ago
938 stars

Top 39.2% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Ref MCP is a ModelContextProtocol server designed to provide AI coding tools and agents with efficient access to public and private documentation, aiming to reduce hallucinations and minimize token usage. It targets AI developers and agents that require up-to-date information on APIs, services, and libraries, offering a token-efficient search and retrieval mechanism.

How It Works

Ref MCP implements a session-based approach to track search trajectories and optimize context. It features intelligent filtering to avoid returning duplicate results across similar searches and a mechanism to extract only the most relevant 5k tokens from documentation pages, discarding irrelevant sections. This targeted retrieval is designed to combat the "context rot" and cognitive degradation observed in LLMs when presented with excessive or irrelevant information, thereby improving agent performance and reducing API costs.

Quick Start & Requirements

  • Installation: npx ref-tools-mcp@latest (for stdio server) or configure via HTTP.
  • Prerequisites: An API key is required, obtained by signing up at ref.tools.
  • Development: npm install, npm run dev.
  • Resources: The README provides links to Inspector documentation for local testing.

Highlighted Details

  • Provides ref_search_documentation and ref_read_url tools for agents.
  • Supports OpenAI tool definitions with slightly different naming conventions.
  • Offers filtering of search results to prevent duplicates within a session.
  • Extracts the most relevant 5k tokens from web pages to minimize context noise.

Maintenance & Community

The project is developed by ref-tools. Further community or roadmap information is not detailed in the README.

Licensing & Compatibility

The project is licensed under the MIT license, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

The README mentions a "legacy stdio server" and recommends the "streamable-http server," suggesting potential differences in features or support between the two. The effectiveness of token minimization relies on the accuracy of the relevance filtering.

Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
0
Star History
59 stars in the last 30 days

Explore Similar Projects

Starred by Michael Jackson Michael Jackson(Author of unpkg; Cofounder of Remix), Jared Palmer Jared Palmer(SVP at GitHub; Founder of Turborepo; Author of Formik, TSDX), and
4 more.

qmd by tobi

27.7%
3k
AI-powered local search for your documents
Created 1 month ago
Updated 2 days ago
Feedback? Help us improve.