Skip to content

Astro Docs MCP Server

Documentation No Auth Required

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.

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

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
Search Astro Documentation
// Example usage
const 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"
}
]
}

Search for component-related documentation:

Component Documentation
// Find information about Astro components
await searchAstroDocs({ query: "astro components props" })
// Search for specific component features
await searchAstroDocs({ query: "component slots" })
// Learn about component styling
await searchAstroDocs({ query: "component css modules" })
  • 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
Search Query Examples
// Good: Specific and contextual
await searchAstroDocs({ query: "server-side rendering SSR" })
// Better: Even more specific
await searchAstroDocs({ query: "getServerSideProps SSR data fetching" })
// Best: Include use case context
await searchAstroDocs({ query: "SSR authentication protected routes" })

Use Astro docs searches during development workflows:

Development Workflow Integration
// When implementing a feature
const authDocs = await searchAstroDocs({
query: "middleware authentication"
})
// When troubleshooting
const errorDocs = await searchAstroDocs({
query: "build errors typescript"
})
// When learning new concepts
const conceptDocs = await searchAstroDocs({
query: "islands architecture hydration"
})
  1. Feature Implementation: Research how to implement specific Astro features
  2. Configuration Help: Find correct configuration syntax and options
  3. Integration Guides: Learn how to integrate third-party libraries
  4. Performance Optimization: Discover performance best practices
  5. Migration Assistance: Get help upgrading between Astro versions
  6. Troubleshooting: Find solutions to build or runtime errors
  • 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

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