AI 코딩 에이전트가 컨텍스트 오염과 API 비용을 최소화하면서 효율적으로 문서를 검색하고 읽을 수 있는 기능을 제공합니다.
다른 이름 ref-tools/ref-tools-mcp, ref-tools-mcp-e40f3e
- 스타
- 1,186
- Tools
- 2
- 다운로드, 30일
- —
- 최신 버전
- 3.0.1
- 마지막 커밋
- 2026년 11월 6일
- 라이선스
- MIT
Ref MCP란?
Ref은(는) MCP server입니다. AI 코딩 에이전트가 컨텍스트 오염과 API 비용을 최소화하면서 효율적으로 문서를 검색하고 읽을 수 있는 기능을 제공합니다. 2개 도구를 제공합니다. 예: query, url.
프로젝트 README에서 생성된 요약
Ref MCP server 정보
Ref MCP는 AI 코딩 에이전트가 API, 라이브러리 및 서비스의 기술 문서에 효율적으로 접근할 수 있도록 설계된 특화된 Model Context Protocol server입니다. 모델이 가장 관련성 높은 정보만 수신하도록 보장함으로써 컨텍스트 오염과 높은 API 비용 문제를 해결하는 것을 목표로 합니다. 토큰을 낭비하는 방대한 문서 페이지를 통째로 가져오는 대신, 이 서버는 검색 기록을 사용하여 관련 없는 섹션을 필터링하고 요약된 콘텐츠를 반환합니다.
개발자는 권장 방식인 streamable HTTP 설정 또는 로컬 stdio server를 통해 이 서버를 통합할 수 있습니다. HTTP 구성을 사용하려면 ref.tools의 API key가 필요합니다. 서버는 두 가지 주요 도구를 제공합니다. 웹, GitHub 또는 비공개 PDF에서 사실 관계나 코드 스니펫을 찾는 ref_search_documentation과 웹페이지 콘텐츠를 markdown으로 변환하는 ref_read_url입니다. 또한 OpenAI deep research 기능을 지원하기 위한 특정 도구 매핑도 포함되어 있습니다.
활용 사례
- 1문서 토큰 사용량 최소화AI 에이전트가 특정 API 엔드포인트를 검색하고 페이지의 필요한 부분만 읽음으로써 관련 없는 텍스트에 토큰을 낭비하는 것을 방지할 수 있습니다.
- 2비공개 기술 리소스 검색개발자가 에이전트에게 비공개 저장소나 PDF 파일 내에서 특정 정보를 찾도록 지시할 수 있습니다.
- 3OpenAI deep research 지원서버를 OpenAI 클라이언트에 통합하여 deep research 작업을 위한 호환 가능한 검색 및 가져오기 도구를 제공합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
Ref MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 Ref MCP 설치
$ claude mcp add --env 'REF_API_KEY=<YOUR_REF_API_KEY>' ref-tools-mcp-e40f3e -- npx -y ref-tools-mcpCursor에 Ref MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"ref-tools-mcp-e40f3e": {
"command": "npx",
"args": [
"-y",
"ref-tools-mcp"
],
"env": {
"REF_API_KEY": "<YOUR_REF_API_KEY>"
}
}
}
}VS Code에 Ref MCP 설치
.vscode/mcp.json
{
"servers": {
"ref-tools-mcp-e40f3e": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"ref-tools-mcp"
],
"env": {
"REF_API_KEY": "<YOUR_REF_API_KEY>"
}
}
}
}VS Code CLI에 Ref MCP 설치
$ code --add-mcp '{"name":"ref-tools-mcp-e40f3e","type":"stdio","command":"npx","args":["-y","ref-tools-mcp"],"env":{"REF_API_KEY":"<YOUR_REF_API_KEY>"}}'Claude Desktop에 Ref MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"ref-tools-mcp-e40f3e": {
"command": "npx",
"args": [
"-y",
"ref-tools-mcp"
],
"env": {
"REF_API_KEY": "<YOUR_REF_API_KEY>"
}
}
}
}Codex에 Ref MCP 설치
$ codex mcp add ref-tools-mcp-e40f3e --env 'REF_API_KEY=<YOUR_REF_API_KEY>' -- npx -y ref-tools-mcpCodex config.toml에 Ref MCP 설치
~/.codex/config.toml
[mcp_servers.ref-tools-mcp-e40f3e] command = "npx" args = ["-y", "ref-tools-mcp"] [mcp_servers.ref-tools-mcp-e40f3e.env] REF_API_KEY = "<YOUR_REF_API_KEY>"
Gemini CLI에 Ref MCP 설치
$ gemini mcp add -s user -e 'REF_API_KEY=<YOUR_REF_API_KEY>' ref-tools-mcp-e40f3e npx -- -y ref-tools-mcpGemini settings.json에 Ref MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"ref-tools-mcp-e40f3e": {
"command": "npx",
"args": [
"-y",
"ref-tools-mcp"
],
"env": {
"REF_API_KEY": "<YOUR_REF_API_KEY>"
}
}
}
}Ref MCP 도구 2
README에서 감지됨queryurl
| query | — | |
| url | — |
구성
REF_API_KEY필수비밀Your API key for Ref
| 이름 | 설명 | 유형 |
|---|---|---|
| REF_API_KEY | Your API key for Ref | 필수비밀 |
자동 검사
2026년 11월 12일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능통과
- 오픈 소스 라이선스 (OSI)통과
- 최근 1년 내 커밋 또는 릴리스통과
- 패키지 이름이 인기 패키지와 유사하지 않음통과
- 원격 엔드포인트가 HTTPS 사용검사되지 않음
- 파괴적인 도구에 라벨 표시됨통과
- 모델에 대한 숨겨진 지침 없음통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음통과
README
GitHub에서 보기Ref MCP
A ModelContextProtocol 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
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. 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/api#post-comments-endpoint (385 tokens)
For more complex situations, the LLM will try to refine it's prompt as it reads results. For example:
SEARCH 'n8n merge node vs Code node multiple inputs best practices' (126)
READ https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.merge/#merge (4961)
READ https://docs.n8n.io/flow-logic/merging/#merge-data-from-multiple-node-executions (138)
SEARCH 'n8n Code node multiple inputs best practices when to use' (107)
READ https://docs.n8n.io/code/code-node/#usage (80)
SEARCH 'n8n Code node access multiple inputs from different nodes' (370)
SEARCH 'n8n Code node $input access multiple node inputs' (372)
READ https://docs.n8n.io/code/builtin/output-other-nodes/#output-of-other-nodes (2310)
Ref takes advantage of MCP sessions to track search trajectory and minimize context usage. There's a lot more ideas cooking but here's what we've implemented so far.
1. Filtering search results
For repeated similar searches in a session, Ref will never return repeated results. Traditionally, you dig farther in to search results by paging to the next result but this approach allows the agent to page AND adjust the prompt at the same time.
2. Fetching the part of the page that matters
When reading a page of documentation, Ref will use the agent's session search history to dropout less relevant sections and return the most relevant 5k tokens. This helps Ref avoid a big problem with standard fetch() web scraping which is when it hits a large documentation page you can easily end up pull in 20k+ tokens into context, most of which are irrelevant.
Why does minimizing tokens from documentation context matter?
1. More context makes models dumber
It's well documented that as of July 2025 that models get dumber as you put in more tokens. You might have heard about how models are great with long context now and that's kind of true but not the whole picture. For a quick primer on some research, checkout this video from the team at Chroma.
2. Tokens cost $$$
Imagine you are using Claude Opus as a background agent and you start by having the agent pull in documentation context and suppose it pulls in 10000 tokens of context with 4000 being relevant and 6000 being extra noise. At API pricing, that 6k tokens cost about $0.09 PER STEP. If one prompt ends up taking 11 steps with Opus, you've spent $1 for no reason.
Setup
There are two options for setting up Ref as an MCP server, either via the streamable-http server (recommended) or local stdio server (legacy).
This repo contains the legacy stdio server.
Streamable HTTP (recommended)
"Ref": {
"type": "http",
"url": "https://api.ref.tools/mcp?apiKey=YOUR_API_KEY"
}
stdio
"Ref": {
"command": "npx",
"args": ["ref-tools-mcp@latest"],
"env": {
"REF_API_KEY": <sign up to get an api key>
}
}
Tools
Ref MCP server provides all the documentation related tools for your agent needs.
ref_search_documentation
A powerful search tool to check technical documentation. Great for finding facts or code snippets. Can be used to search for public documentation on the web or github as well from private resources like repos and pdfs.
Parameters:
query(required): Query to search for relevant documentation. This should be a full sentence or question.
ref_read_url
A tool that fetches content from a URL and converts it to markdown for easy reading with Ref. This is powerful when used in conjunction with the ref_search_documentation tool that returns urls of relevant content.
Parameters:
url(required): The URL of the webpage to read.
OpenAI deep research support
Ref can be used as a source for deep research. OpenAI requires specific tool definitions so when used with an OpenAI client, Ref will provide the same tools with slightly different naming.
ref_search_documentation(query) -> search(query)
ref_read_url(url) -> fetch(id)
Development
npm install
npm run dev
Running with Inspector
For development and debugging purposes, you can use the MCP Inspector tool. The Inspector provides a visual interface for testing and monitoring MCP server interactions.
Visit the Inspector documentation for detailed setup instructions.
To test locally with Inspector:
npm run inspect
Or run both the watcher and inspector:
npm run dev
Local Development
- Clone the repository
- Install dependencies:
npm install
- Build the project:
npm run build
- For development with auto-rebuilding:
npm run watch
License
MIT
Ref MCP 질문
Ref MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add --env 'REF_API_KEY=<YOUR_REF_API_KEY>' ref-tools-mcp-e40f3e -- npx -y ref-tools-mcp를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
Ref MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
Ref MCP는 어떤 도구를 제공하나요?
2개 도구를 제공합니다. 예: query, url.
Ref는 어떻게 토큰 사용량을 줄이나요?
Ref는 에이전트의 세션 기록을 사용하여 페이지에서 관련성이 낮은 섹션을 필터링하며, 페이지 전체 대신 가장 관련성이 높은 5k 토큰만 반환합니다.
비공개 문서를 검색할 수 있나요?
네, 검색 도구를 사용하여 저장소나 PDF와 같은 비공개 리소스의 문서를 검색할 수 있습니다.
Ref MCP server에서 사용할 수 있는 도구는 무엇인가요?
이 서버는 기술 문서 검색을 위한 ref_search_documentation과 웹페이지 콘텐츠를 가져와 markdown으로 변환하는 ref_read_url을 제공합니다.
Ref가 OpenAI deep research를 지원하나요?
네, Ref는 도구를 검색 및 가져오기 기능으로 매핑하여 OpenAI의 요구 사항과 호환되는 도구 정의를 제공합니다.
