Astro Docs MCP Server

Astro Docs MCP Server

An MCP server that provides AI assistants with access to Astro documentation, enabling them to search and reference Astro docs when helping users with Astro-related tasks.

Category
Visit Server

README

Astro Docs MCP Server

An MCP server for providing Astro documentation access to AI agents. This server allows AI assistants to look up and reference Astro documentation when helping users with Astro-related tasks.

This TypeScript-based MCP server implements a documentation retrieval system for Astro. It demonstrates core MCP concepts by providing:

  • Resources representing Astro documentation sections with URIs and metadata
  • Tools for searching Astro documentation
  • Prompts for common Astro questions and tasks

Features

Resources

  • List and access Astro documentation via astro-docs:// URIs
  • Each doc section has a title, content, and category
  • Plain text mime type for simple content access

Tools

  • search_docs - Search Astro documentation
    • Takes a search query as required parameter
    • Returns matching documentation sections

Prompts

  • explain_astro_islands - Get detailed explanations of Astro Islands architecture
  • astro_project_setup - Guide for setting up a new Astro project
  • astro_vs_other_frameworks - Compare Astro with other web frameworks

Project Structure

  • src/ - Source code for the MCP server
    • index.ts - Main MCP server implementation
    • scripts/ - Helper scripts for building and testing
      • build.js - Build script that transpiles TypeScript and creates launcher scripts
      • test-client.js - Test client for verifying server functionality
  • bin/ - Generated executable scripts
    • astro-docs-mcp - Main launcher script for the MCP server
  • build/ - Compiled JavaScript files (generated)

Requirements

  • Node.js v16 or later is required
  • Node.js v20+ is recommended for best compatibility
  • The server uses ES modules syntax
  • pnpm package manager (preferred over npm)

Installation

Installing Dependencies

Install dependencies:

pnpm install

Build the server:

pnpm run build

For development with auto-rebuild:

pnpm run watch

Running the Server

pnpm start
# OR directly
./bin/astro-docs-mcp

Configuration with Claude Desktop

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

Important: The configuration must use the absolute path to the script:

{
  "mcp_servers": [
    {
      "id": "astro-docs-mcp",
      "name": "Astro Docs",
      "command": "/full/absolute/path/to/astro-mcp/bin/astro-docs-mcp",
      "type": "built-in"
    }
  ]
}

Replace /full/absolute/path/to/astro-mcp/ with the actual absolute path to your installation directory.

For example, if the repository is at /Users/username/projects/astro-mcp, the command would be:

"/Users/username/projects/astro-mcp/bin/astro-docs-mcp"

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

pnpm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Testing

A test client is provided to verify the server is working correctly:

pnpm test
# OR directly
node src/scripts/test-client.js

This will send several commands to the server and display the responses.

Troubleshooting

If you encounter issues with the server:

  1. Path Issues: The most common problem is incorrect paths in the configuration. Make sure:

    • You're using an absolute path to the script in claude_desktop_config.json
    • The path points to bin/astro-docs-mcp (not the root script)
    • The build directory exists and contains index.js (ls -la build/)
    • All scripts have executable permissions
  2. "Module not found" errors: If you see errors like Cannot find module '/build/index.js', check:

    • That you've run the build step (pnpm run build)
    • That the script is being run from the correct directory
    • That absolute paths are being used for the script execution
  3. Node.js Version: Make sure you're using Node.js v16 or later. For best results, use v20+.

    node --version
    
  4. Script Permissions: Ensure the scripts have executable permissions:

    chmod +x bin/astro-docs-mcp src/scripts/build.js src/scripts/test-client.js
    
  5. JSON Output Issues: Debug messages being sent to stdout will confuse Claude Desktop because it expects only valid JSON. Our scripts properly redirect all debug output to stderr.

Usage with Claude Desktop

  1. Install the server by following the installation steps above.

  2. Configure Claude Desktop by editing the configuration file to include the absolute path to the script:

    {
      "mcp_servers": [
        {
          "id": "astro-docs-mcp",
          "name": "Astro Docs",
          "command": "/full/absolute/path/to/astro-mcp/bin/astro-docs-mcp",
          "type": "built-in"
        }
      ]
    }
    
  3. Restart Claude Desktop.

  4. You can now interact with the Astro documentation using the following commands:

    • list - List available Astro documentation sections
    • search <query> - Search the Astro documentation
    • read astro-docs:///<id> - Read a specific documentation section

Future Enhancements

  • Fetch real-time documentation from Astro's website
  • Add more comprehensive documentation sections
  • Implement documentation versioning support
  • Add code examples and snippets for common Astro patterns

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured