Skip to main content
Glama
dreyfus92

Astro Docs MCP Server

by dreyfus92

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

Related MCP server: Dedalus MCP Documentation Server

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

Available Tools

1 tool
search_docsC

Search Astro documentation

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term to find in Astro documentation

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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. Dates show when Glama detected each change.

  1. 1 tool updatev1.0.0
    • First observedsearch_docs

TDQS

B3.1/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count2/5

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.

Completeness2/5

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

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

Latest Blog Posts

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/dreyfus92/astro-docs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server