Astro Docs MCP Server
Astro Docs MCP Server
Section titled “Astro Docs MCP Server”The Astro Docs MCP server provides direct access to the official Astro framework documentation, allowing you to search for features, examples, and API references without leaving your development context.
Overview
Section titled “Overview”This server enables real-time searches through Astro’s comprehensive documentation, including:
- Component APIs and usage patterns
- Framework features and configuration
- Integration guides and examples
- Troubleshooting and best practices
- Latest release notes and migration guides
Available Functions
Section titled “Available Functions”search_astro_docs
Section titled “search_astro_docs”Search the Astro documentation for specific topics or features.
Parameters:
query(string, required): Search terms for Astro documentation
Returns:
- Array of relevant documentation entries with titles, URLs, and content summaries
// Example usageconst results = await searchAstroDocs({query: "dynamic routing"})
// Results structure{"results": [ { "title": "Dynamic Routes", "url": "https://docs.astro.build/en/core-concepts/routing/#dynamic-routes", "summary": "Learn how to create dynamic routes using file-based routing...", "content": "Full content excerpt...", "category": "Core Concepts" }]}Usage Examples
Section titled “Usage Examples”Search for component-related documentation:
// Find information about Astro componentsawait searchAstroDocs({ query: "astro components props" })
// Search for specific component featuresawait searchAstroDocs({ query: "component slots" })
// Learn about component stylingawait searchAstroDocs({ query: "component css modules" })Find configuration and setup information:
// Search for configuration optionsawait searchAstroDocs({ query: "astro.config.mjs" })
// Find integration setup guidesawait searchAstroDocs({ query: "react integration" })
// Look up build configurationawait searchAstroDocs({ query: "build output" })Get help with common issues:
// Find solutions to common problemsawait searchAstroDocs({ query: "hydration client:load" })
// Search for error solutionsawait searchAstroDocs({ query: "typescript errors" })
// Get deployment helpawait searchAstroDocs({ query: "netlify deployment" })Best Practices
Section titled “Best Practices”Effective Search Queries
Section titled “Effective Search Queries”- Be specific: Use exact feature names when possible
- Include context: Add related terms for better results
- Try variations: Rephrase if initial results aren’t helpful
// Good: Specific and contextualawait searchAstroDocs({ query: "server-side rendering SSR" })
// Better: Even more specificawait searchAstroDocs({ query: "getServerSideProps SSR data fetching" })
// Best: Include use case contextawait searchAstroDocs({ query: "SSR authentication protected routes" })Integration with Development
Section titled “Integration with Development”Use Astro docs searches during development workflows:
// When implementing a featureconst authDocs = await searchAstroDocs({query: "middleware authentication"})
// When troubleshootingconst errorDocs = await searchAstroDocs({query: "build errors typescript"})
// When learning new conceptsconst conceptDocs = await searchAstroDocs({query: "islands architecture hydration"})Common Use Cases
Section titled “Common Use Cases”- Feature Implementation: Research how to implement specific Astro features
- Configuration Help: Find correct configuration syntax and options
- Integration Guides: Learn how to integrate third-party libraries
- Performance Optimization: Discover performance best practices
- Migration Assistance: Get help upgrading between Astro versions
- Troubleshooting: Find solutions to build or runtime errors
Tips for Better Results
Section titled “Tips for Better Results”Limitations
Section titled “Limitations”- Real-time Updates: Documentation reflects the latest Astro release
- Search Scope: Limited to official Astro documentation only
- Rate Limiting: Reasonable use expected, avoid rapid successive searches
- Language: Currently supports English documentation only
Related Resources
Section titled “Related Resources”- Context7 Server - For third-party library documentation
- Web Tools Server - For broader web searches
- MCP Examples - See real-world usage scenarios
Troubleshooting
Section titled “Troubleshooting”No results found:
- Check spelling and try alternative terms
- Use broader search terms initially, then narrow down
- Search for concept names rather than specific code snippets
Results not relevant:
- Include more context in your search query
- Try searching for the parent concept or feature category
- Use official Astro terminology from the documentation