Astro Docs MCP Server
Servidor MCP de Astro Docs
Un servidor MCP para proporcionar acceso a la documentación de Astro a los agentes de IA. Este servidor permite a los asistentes de IA consultar y consultar la documentación de Astro al ayudar a los usuarios con tareas relacionadas con Astro.
Este servidor MCP basado en TypeScript implementa un sistema de recuperación de documentación para Astro. Demuestra los conceptos básicos de MCP al proporcionar:
Recursos que representan secciones de la documentación de Astro con URI y metadatos
Herramientas para buscar documentación de Astro
Indicaciones para preguntas y tareas comunes de Astro
Características
Recursos
Enumere y acceda a la documentación de Astro mediante las URI
astro-docs://Cada sección del documento tiene un título, contenido y categoría.
Tipo MIME de texto simple para acceso simple al contenido
Herramientas
search_docs- Buscar documentación de AstroToma una consulta de búsqueda como parámetro obligatorio
Devuelve las secciones de documentación coincidentes
Indicaciones
explain_astro_islands- Obtenga explicaciones detalladas de la arquitectura de las Islas Astroastro_project_setup- Guía para configurar un nuevo proyecto Astroastro_vs_other_frameworks- Compara Astro con otros frameworks web
Related MCP server: Dedalus MCP Documentation Server
Estructura del proyecto
src/- Código fuente del servidor MCPindex.ts- Implementación del servidor MCP principalscripts/- Scripts de ayuda para compilar y probarbuild.js: script de compilación que transpila TypeScript y crea scripts de iniciotest-client.js: cliente de prueba para verificar la funcionalidad del servidor
bin/- Scripts ejecutables generadosastro-docs-mcp- Script de inicio principal para el servidor MCP
build/- Archivos JavaScript compilados (generados)
Requisitos
Se requiere Node.js v16 o posterior
Se recomienda Node.js v20+ para una mejor compatibilidad
El servidor utiliza la sintaxis de los módulos ES
gestor de paquetes pnpm (preferible a npm)
Instalación
Instalación de dependencias
Instalar dependencias:
pnpm installConstruir el servidor:
pnpm run buildPara desarrollo con reconstrucción automática:
pnpm run watchEjecución del servidor
pnpm start
# OR directly
./bin/astro-docs-mcpConfiguración con Claude Desktop
Para utilizar con Claude Desktop, agregue la configuración del servidor:
En MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json En Windows: %APPDATA%/Claude/claude_desktop_config.json
Importante: La configuración debe utilizar la ruta absoluta al script:
{
"mcp_servers": [
{
"id": "astro-docs-mcp",
"name": "Astro Docs",
"command": "/full/absolute/path/to/astro-mcp/bin/astro-docs-mcp",
"type": "built-in"
}
]
}Reemplace /full/absolute/path/to/astro-mcp/ con la ruta absoluta real a su directorio de instalación.
Por ejemplo, si el repositorio está en /Users/username/projects/astro-mcp , el comando sería:
"/Users/username/projects/astro-mcp/bin/astro-docs-mcp"Depuración
Dado que los servidores MCP se comunican a través de stdio, la depuración puede ser complicada. Recomendamos usar el Inspector MCP , disponible como script de paquete:
pnpm run inspectorEl Inspector proporcionará una URL para acceder a las herramientas de depuración en su navegador.
Pruebas
Se proporciona un cliente de prueba para verificar que el servidor funciona correctamente:
pnpm test
# OR directly
node src/scripts/test-client.jsEsto enviará varios comandos al servidor y mostrará las respuestas.
Solución de problemas
Si encuentra problemas con el servidor:
Problemas de ruta : El problema más común son las rutas incorrectas en la configuración. Asegúrese de lo siguiente:
Estás utilizando una ruta absoluta al script en claude_desktop_config.json
La ruta apunta a
bin/astro-docs-mcp(no al script raíz)El directorio de compilación existe y contiene index.js (
ls -la build/)Todos los scripts tienen permisos de ejecución.
Errores de "Módulo no encontrado" : si ve errores como
Cannot find module '/build/index.js', verifique:Que has ejecutado el paso de compilación (
pnpm run build)Que el script se esté ejecutando desde el directorio correcto
Que se estén utilizando rutas absolutas para la ejecución del script
Versión de Node.js : Asegúrate de usar Node.js v16 o posterior. Para obtener mejores resultados, usa la versión 20 o superior.
node --versionPermisos de script : asegúrese de que los scripts tengan permisos de ejecución:
chmod +x bin/astro-docs-mcp src/scripts/build.js src/scripts/test-client.jsProblemas con la salida JSON : Los mensajes de depuración enviados a la salida estándar (stdout) confunden a Claude Desktop, ya que solo espera JSON válido. Nuestros scripts redirigen correctamente toda la salida de depuración a la salida estándar (stderr).
Uso con Claude Desktop
Instale el servidor siguiendo los pasos de instalación anteriores.
Configure Claude Desktop editando el archivo de configuración para incluir la ruta absoluta al script:
{ "mcp_servers": [ { "id": "astro-docs-mcp", "name": "Astro Docs", "command": "/full/absolute/path/to/astro-mcp/bin/astro-docs-mcp", "type": "built-in" } ] }Reinicie Claude Desktop.
Ahora puedes interactuar con la documentación de Astro usando los siguientes comandos:
list- Lista de las secciones de documentación de Astro disponiblessearch <query>- Buscar en la documentación de Astroread astro-docs:///<id>- Leer una sección específica de la documentación
Mejoras futuras
Obtenga documentación en tiempo real del sitio web de Astro
Añadir secciones de documentación más completas
Implementar soporte para control de versiones de documentación
Agregue ejemplos de código y fragmentos para patrones comunes de Astro
Available Tools
1 toolsearch_docsC
Search Astro documentation
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search term to find in Astro documentation |
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 action but reveals nothing about how the search works (e.g., scope, ranking, pagination), what the output looks like, or any constraints like rate limits or authentication needs. This leaves significant gaps for a tool with undocumented 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 extremely concise at just three words, front-loading the essential action and resource without any wasted text. Every word earns its place, making it efficient and straightforward for an agent to parse.
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 lack of annotations and output schema, the description is incomplete for a search tool. It doesn't explain what the search returns, how results are structured, or any behavioral nuances, leaving the agent with insufficient context to use the tool effectively beyond the basic parameter.
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 single parameter 'query' clearly documented as 'Search term to find in Astro documentation'. The description adds no additional parameter details beyond what the schema provides, so it meets the baseline for high schema coverage without compensating value.
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 with a specific verb ('Search') and resource ('Astro documentation'), making it immediately understandable. However, with no sibling tools mentioned, there's no opportunity to demonstrate differentiation from alternatives, which prevents a perfect score.
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 no guidance on when to use this tool versus alternatives, prerequisites, or contextual limitations. While the absence of sibling tools reduces the need for differentiation, it still lacks any usage instructions or exclusions, leaving the agent with minimal operational context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
search_docs
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion or overlap between tools. The single tool 'search_docs' has a clearly distinct and unambiguous purpose.
The single tool name 'search_docs' follows a clear verb_noun pattern, and with only one tool, consistency is inherently perfect as there are no other names to compare against.
A single tool for an 'Astro Docs MCP Server' feels too thin for the apparent scope. While search is a core function, documentation servers typically benefit from additional tools like browsing, filtering, or retrieving specific pages, making this count borderline inadequate.
The tool surface is severely incomplete for a documentation server. It only provides search functionality, lacking obvious gaps such as retrieving documentation pages, listing categories, or navigating content, which are essential for comprehensive agent interaction with documentation.
Maintenance
Related MCP Connectors
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
An MCP server that integrates with Discord to provide AI-powered features.
An MCP server that gives your AI access to the source code and docs of all public github repos
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to access up-to-date documentation for Python libraries like LangChain, LlamaIndex, and OpenAI through dynamic fetching from official sources.1MIT
- AlicenseAqualityDmaintenanceAn MCP server that serves documentation and enables AI-powered search, Q\&A, and document analysis for developer tools and guides.54MIT
- AlicenseNot gradedqualityAmaintenanceAn MCP server that provides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation context.32 npmMIT
- AlicenseNot gradedqualityBmaintenanceMCP server for Astro/Starlight docs sites, providing search, get, and list tools for documentation content.91 npm13MIT