| name | ref-mcp |
| description | Ref.tools MCP server for SOTA documentation search (60-95% fewer tokens than alternatives). |
| allowed-tools | mcp__ref__* |
| token-budget | 500 |
ref-mcp
Overview
Ref.tools MCP Server
State-of-the-art documentation search with 60-95% fewer tokens than context7/fetch alternatives.
Key benefits:
- Context-aware deduplication (doesn't repeat docs in same session)
- Focused snippets instead of full pages
- 8,500+ libraries indexed with version-specific docs
When to Use
- Effect-TS: APIs change frequently, training data outdated
- Any library where unsure of current API
- Before writing code with external imports
- When user asks "how do I use X?"
- Verifying function signatures and parameters
Trigger Phrase
use ref - how do I create an Effect Layer?
Tools
mcp__ref__search
Search for documentation on any library or topic.
mcp__ref__search({
query: "Effect Layer composition",
library: "effect-ts" // optional: focus on specific library
})
Returns focused documentation snippets with:
- Code examples
- API signatures
- Best practices
Usage Patterns
Before Implementing New Feature
1. Search for library-specific patterns
2. Review returned snippets
3. Implement following documented patterns
Effect-TS (Critical)
The Effect API changes frequently. Training data is outdated.
Always query ref before writing Effect code:
mcp__ref__search({
query: "Effect.gen usage patterns",
library: "effect-ts"
})
Token Efficiency
| Approach | Tokens | Notes |
|---|---|---|
| WebFetch full page | 5-20k | Includes nav, footer, unrelated content |
| context7 | 2-5k | Better but still verbose |
| ref | 0.5-2k | Focused snippets, session deduplication |
Ref automatically deduplicates within a session - repeated queries for same docs return minimal tokens.