Astro Mcp

io.github.morinokamiPublished by GitHub account morinokamiv0.4.2Updated Oct 24, 2026

MCP server to support Astro project development

VerifiedSTDIODesktop onlyKnowledge & MemoryDeveloper Tools

Overview

AI-generated overview

Gives an assistant runtime and documentation context about an Astro project, including config, routes, server address, integrations, and docs search.

What you can do
astro-mcp is an Astro integration that exposes an MCP server for Astro project development. Its tools read the Astro config, list routes with entrypoints and dynamic parameters, report the running dev server's address and port, list and describe Astro integrations, search Astro documentation, and fetch changelogs for Astro-related packages. It also exposes Vite tools for reading the Vite config and a module's import graph and compiled result.
When to use it
Useful when working inside an Astro project and you want the assistant to reason from live project state rather than only the files on disk, for example when inspecting routing, checking the dev server address, or looking up Astro docs and integration details.
Requirements
A local Astro project with the astro-mcp integration installed (npx astro add astro-mcp or manual npm install plus config entry). The MCP server is served by the running Astro dev server at a local SSE endpoint, and an editor or tool config file is created for connection. Node.js and npm are needed.
Before you install
The README states the package is experimental and unstable and advises caution. The integration writes or updates the editor or tool MCP configuration file automatically when the Astro server starts. Tools read project configuration, routing, and module graph data; no credentials or payments are declared.

Installation

In SourceWeft

  1. Open Astro Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

astro-mcp

MCP server to support Astro project development, inspired by antfu's nuxt-mcp.

[!IMPORTANT] This package is experimental and unstable. Proceed with caution when using it.

astro-mcp aims to help models understand your Astro project better, by providing them with 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
  • Information about the Astro integrations you are using

Installation

In your Astro project directory, run the following command:

sh
npx astro add astro-mcp

Manual installation

First, install the astro-mcp package:

sh
npm install astro-mcp

Then, add the astro-mcp integration to your Astro config:

ts
import { defineConfig } from "astro/config";
import mcp from "astro-mcp";
export default defineConfig({  integrations: [mcp()],});

Usage

After installing the integration, the MCP server will be available at http://localhost:4321/__mcp/sse. To connect, create an empty configuration file in the appropriate location for your editor or tool:

Editor/ToolConfiguration File
VSCode.vscode/mcp.json
Cursor.cursor/mcp.json
Windsurf~/.codeium/windsurf/mcp_config.json
Claude Code.mcp.json

astro-mcp will automatically update the file when the Astro server starts.

Extending the MCP server

astro-mcp provides a hook called mcp:setup that other integrations can use to extend the MCP server. This is useful if you want to add custom tools to the MCP server.

ts
export default function createExampleIntegration(): AstroIntegration {  return {    name: "example-integration",    hooks: {      "mcp:setup": async ({ mcp }) => {        mcp.tool("add", { a: z.number(), b: z.number() }, async ({ a, b }) => ({          content: [{ type: "text", text: String(a + b) }],        }));      },    },  };}

Tools

  • get-astro-config: Get the Astro config object containing comprehensive project settings including file paths (root, src, public, output directories), site URL, build options, server settings, enabled integrations, markdown processing configuration, image handling, Vite plugins, security settings, and experimental features
    • Parameters: None
  • 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 to focus on specific route categories
    • Parameters:
      • type (string, optional): redirect, page, endpoint, or fallback
  • get-astro-server-address: Get the current network address, IP protocol family, and port number of the running Astro development server
    • Parameters: None
  • list-astro-integrations: List all Astro integrations available in the ecosystem
    • Parameters: None
  • 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
    • Parameters:
      • name (string): The name of the Astro integration to get information about
  • search-astro-docs: Search the Astro documentation for specific topics, concepts, or features. Returns relevant documentation snippets that match your query
    • Parameters:
      • query (string): The query to search for
  • get-astro-changes: Get the changelog of the Astro-related packages
    • Parameters:
      • packageName (string): The name of the Astro-related package to get the changelog for

Tools from vite-plugin-mcp

  • get-vite-config: Get the Vite config digest, including the root, resolve, plugins, and environment names
    • Parameters: None
  • get-vite-module-info: Get graph information of a module, including importers, imported modules, and compiled result
    • Parameters:
      • filepath (string): The absolute filepath of the module

Source: README.md at commit ba9592f

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.4.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts