Ref
Ref MCP
Un servidor ModelContextProtocol que proporciona a tu herramienta de programación o agente de IA acceso a documentación de APIs, servicios, bibliotecas, etc. Es tu solución integral para mantener a tu agente actualizado con la documentación de forma rápida y eficiente en cuanto a tokens.
Para más información, visita ref.tools
Búsqueda agentica para obtener exactamente el contexto correcto
Las herramientas de Ref están diseñadas para coincidir con la forma en que los modelos buscan, utilizando la menor cantidad de contexto posible para reducir la degradación del contexto. El objetivo es encontrar exactamente el contexto que tu agente de programación necesita para tener éxito utilizando el mínimo de tokens.
Dependiendo de la complejidad de la instrucción, los agentes de programación LLM como Claude Code normalmente realizarán una o más búsquedas y luego elegirán algunos recursos para leer con mayor profundidad.
Para una consulta sencilla sobre la API REST de comentarios de Figma, realizará un par de llamadas para obtener exactamente lo que necesita:
SEARCH 'Figma API post comment endpoint documentation' (54 tokens)
READ https://www.figma.com/developers/api#post-comments-endpoint (385 tokens)Para situaciones más complejas, el LLM intentará refinar su instrucción a medida que lee los resultados. Por ejemplo:
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 aprovecha las sesiones de MCP para rastrear la trayectoria de búsqueda y minimizar el uso de contexto. Hay muchas más ideas en desarrollo, pero aquí presentamos lo que hemos implementado hasta ahora.
1. Filtrado de resultados de búsqueda
Para búsquedas similares repetidas en una sesión, Ref nunca devolverá resultados repetidos. Tradicionalmente, profundizas en los resultados de búsqueda pasando a la siguiente página, pero este enfoque permite al agente paginar Y ajustar la instrucción al mismo tiempo.
2. Obtención de la parte de la página que importa
Al leer una página de documentación, Ref utilizará el historial de búsqueda de la sesión del agente para descartar secciones menos relevantes y devolver los 5k tokens más relevantes. Esto ayuda a Ref a evitar un gran problema con el web scraping estándar fetch(), que ocurre cuando se accede a una página de documentación extensa y se pueden terminar extrayendo más de 20k tokens al contexto, la mayoría de los cuales son irrelevantes.
Related MCP server: graphpilot
¿Por qué es importante minimizar los tokens del contexto de la documentación?
1. Más contexto hace que los modelos sean menos inteligentes
Está bien documentado que, a fecha de julio de 2025, los modelos se vuelven menos inteligentes a medida que se introducen más tokens. Es posible que hayas oído hablar de cómo los modelos son excelentes con contextos largos ahora, y eso es cierto en parte, pero no es la imagen completa. Para una introducción rápida sobre algunas investigaciones, mira este video del equipo de Chroma.
2. Los tokens cuestan $$$
Imagina que estás usando Claude Opus como agente en segundo plano y comienzas haciendo que el agente extraiga contexto de la documentación; supongamos que extrae 10,000 tokens de contexto, de los cuales 4,000 son relevantes y 6,000 son ruido adicional. Según los precios de la API, esos 6k tokens cuestan alrededor de $0.09 POR PASO. Si una instrucción termina tomando 11 pasos con Opus, has gastado $1 sin ninguna razón.
Configuración
Hay dos opciones para configurar Ref como servidor MCP: a través del servidor streamable-http (recomendado) o el servidor stdio local (legado).
Este repositorio contiene el servidor stdio legado.
Streamable HTTP (recomendado)
"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>
}
}Herramientas
El servidor Ref MCP proporciona todas las herramientas relacionadas con la documentación que tu agente necesita.
ref_search_documentation
Una potente herramienta de búsqueda para consultar documentación técnica. Ideal para encontrar hechos o fragmentos de código. Se puede utilizar para buscar documentación pública en la web o en GitHub, así como en recursos privados como repositorios y archivos PDF.
Parámetros:
query(obligatorio): Consulta para buscar documentación relevante. Debe ser una oración completa o una pregunta.
ref_read_url
Una herramienta que obtiene contenido de una URL y lo convierte a markdown para facilitar su lectura con Ref. Es muy potente cuando se utiliza junto con la herramienta ref_search_documentation, que devuelve URLs de contenido relevante.
Parámetros:
url(obligatorio): La URL de la página web que se desea leer.
Soporte para investigación profunda de OpenAI
Ref puede utilizarse como fuente para investigación profunda. OpenAI requiere definiciones de herramientas específicas, por lo que cuando se utiliza con un cliente de OpenAI, Ref proporcionará las mismas herramientas con nombres ligeramente diferentes.
ref_search_documentation(query) -> search(query)
ref_read_url(url) -> fetch(id)Desarrollo
npm install
npm run devEjecución con Inspector
Para fines de desarrollo y depuración, puedes utilizar la herramienta MCP Inspector. El Inspector proporciona una interfaz visual para probar y monitorear las interacciones del servidor MCP.
Visita la documentación del Inspector para obtener instrucciones detalladas de configuración.
Para probar localmente con el Inspector:
npm run inspectO ejecuta tanto el observador como el inspector:
npm run devDesarrollo local
Clona el repositorio
Instala las dependencias:
npm installConstruye el proyecto:
npm run buildPara desarrollo con reconstrucción automática:
npm run watchLicencia
MIT
Available Tools
2 toolsref_read_urlAInspect
Read the content of a url as markdown. The entire exact URL from a Ref 'ref_search_documentation' result should be passed to this tool to read it.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL of the webpage to read. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool reads content and converts it to markdown, but lacks details on error handling, rate limits, authentication needs, or output format. For a tool with no annotations, this leaves significant gaps in understanding its behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is highly concise and well-structured in two sentences. The first sentence states the core purpose, and the second provides usage context. There is no wasted language, making it front-loaded and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (reading and converting web content) and lack of annotations or output schema, the description is adequate but incomplete. It covers purpose and basic usage but omits behavioral details like error cases or output specifics, leaving room for improvement in completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the parameter 'url' documented as 'The URL of the webpage to read.' The description adds minimal value beyond this by specifying that the URL should come from 'ref_search_documentation' results, but does not provide additional syntax or format details. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Read the content of a url as markdown.' It specifies the verb ('Read') and resource ('content of a url'), making the action explicit. However, it does not explicitly distinguish this tool from its sibling 'ref_search_documentation', which likely searches rather than reads content, so it misses full differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool: 'The entire exact URL from a Ref 'ref_search_documentation' result should be passed to this tool to read it.' This implies usage after obtaining a URL from the sibling tool, offering a workflow guideline. However, it does not specify when not to use it or alternatives, keeping it from a perfect score.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ref_search_documentationBInspect
Search for documentation on the web or github as well from private resources like repos and pdfs. Use Ref 'ref_read_url' to read the content of a url.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Query for documentation. Should include programming language and framework or library names. Searches public only docs by default, include ref_src=private to search a user's private docs. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but only mentions searching capabilities and a related tool. It fails to disclose critical behavioral traits like whether this is a read-only operation, potential rate limits, authentication needs for private resources, or what the search results look like (e.g., format, pagination).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with two sentences that directly state the tool's function and a usage tip. It's front-loaded and avoids unnecessary words, though it could be slightly more structured for clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a search tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., search results format), how private resources are accessed, or error handling, leaving significant gaps for an AI agent to use it effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage, fully describing the single 'query' parameter with details on including language/framework names and the 'ref_src=private' option. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as searching for documentation across web, GitHub, and private resources, which is specific and actionable. However, it doesn't explicitly differentiate from its sibling 'ref_read_url', which is for reading URL content rather than searching, so it misses full sibling distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by mentioning 'ref_read_url' for reading content, suggesting a workflow, but lacks explicit guidance on when to use this tool versus alternatives or any exclusions. It provides some context but no clear when/when-not rules.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The two tools have clearly distinct purposes: ref_search_documentation finds documentation resources, while ref_read_url reads the content of specific URLs. There is no overlap or ambiguity between searching and reading operations.
Both tools follow a consistent 'ref_verb_noun' naming pattern with snake_case. The prefix 'ref_' provides clear namespace identification, and the verb-noun structure (search_documentation, read_url) is uniform and predictable.
With only two tools, the server feels minimal but functional for its documentation search/read purpose. While it covers core workflows, the count is borderline thin—additional tools for filtering, saving, or managing searches might enhance completeness without overcomplication.
The tool set covers the essential documentation workflow: searching and reading. However, there are minor gaps, such as no tools for saving results, filtering searches, or managing cached content, which agents might need to work around for advanced use cases.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Shared memory for coding agents. Stop re-explaining your codebase every session.
Shared debugging memory for AI coding agents
Honest library picks for coding agents in 25-360 tokens. Tells your agent what NOT to install.
Codebase intelligence for agents: 152 structured artifacts across 21 programs, one call.
Related MCP Servers
AlicenseAqualityAmaintenancePersistent memory and mechanical enforcement for AI coding agents — so they stop repeating your mistakes.211263Business Source 1.1- AlicenseAqualityAmaintenanceStructural memory for coding agents — 60% fewer tokens, refactor-safe, runs entirely on your machine.45415Apache 2.0
- FlicenseNot gradedqualityAmaintenanceLocal-first code retrieval for AI agents — cuts codebase context from thousands of tokens to a few hundred, with zero hallucinated file paths.3
- AlicenseNot gradedqualityCmaintenanceHebbian memory system for AI coding agents that learns file associations, error-fix patterns, and tool sequences, enabling instant recall of related context to save tokens.8813MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ref-tools/ref-tools-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server