← Back to directory
A

Astro MCP

Community
MCP server to support Astro project development
GitHub source repository ↗
★ 60 Stars Category · Dev Tools Popular Source revision ba9592f4d3cd
61FMRS · C
Reliability
9/20
Security and permissions
11/20
Maintenance
14/20
Documentation
13/20
Setup experience
14/20

Astro MCP is an experimental MCP server designed to provide AI assistants with runtime information and documentation support for Astro projects. It is suitable for Astro developers but should be used with caution due to its experimental nature.

Read the FMRS scoring method →

Astro MCP server aims to help models understand your Astro project better by providing information that cannot be easily accessed just by looking at the project files, such as runtime information about the Astro server, up-to-date Astro docs content, and information about the Astro integrations you are using.

Tools

get-astro-config
Get the Astro config object containing comprehensive project settings including file paths, site URL, build options, server settings, enabled integrations, markdown processing configuration, image handling, Vite plugins, security settings, and experimental features.
list-astro-routes
List detailed routing information from your Astro project, including all routes with their file entrypoints, URL patterns, dynamic parameters, pre-rendering status, and route types. Optionally filter by type.
get-astro-server-address
Get the current network address, IP protocol family, and port number of the running Astro development server.
list-astro-integrations
List all Astro integrations available in the ecosystem.
get-astro-integration
Get detailed metadata about a specific Astro integration, including its name, description, categories, repository links, npm information, related website links, official status, and download statistics.
search-astro-docs
Search the Astro documentation for specific topics, concepts, or features. Returns relevant documentation snippets that match your query.
get-astro-changes
Get the changelog of the Astro-related packages.
get-vite-config
Get the Vite config digest, including the root, resolve, plugins, and environment names.
get-vite-module-info
Get graph information of a module, including importers, imported modules, and compiled result.

Setup

Run npx astro add astro-mcp in your Astro project directory, or manually install: npm install astro-mcp, then add the integration to your Astro config: integrations: [mcp()]. After installation, the MCP server will be available at http://localhost:4321/__mcp/sse.

claude_desktop_config.json
{
  "mcpServers": {
    "astro-mcp": {
      "url": "http://localhost:4321/__mcp/sse"
    }
  }
}

Fit and risk

Best for

  • Developers using the Astro framework
  • Developers who want to enhance their AI coding assistant's understanding of their project

Not for

  • Projects not using Astro
  • Scenarios requiring a stable production server

Required permissions

  • Read Astro configuration files
  • Read project routing information
  • Access development server information
  • Access network to fetch documentation and integration data

Risks and side effects

  • Experimental package, may be unstable
  • May expose project configuration details
  • Depends on local development server, not available in production

Troubleshooting

  1. Ensure the Astro development server is running
  2. Check if port 4321 is occupied
  3. Verify that the MCP configuration file is created in the correct location

Use cases

Help AI assistants understand the configuration and routing structure of an Astro project.
Provide up-to-date Astro documentation search capability to aid development.
Get detailed information and changelogs for Astro integrations.

Supported clients

VSCodeFull support
CursorFull support
WindsurfFull support
Claude CodeFull support