PluginBench
MCP Server
Maintained
MIT

io.github.morinokami/astro-mcp MCP Server

io.github.morinokami/astro-mcp

MCP server providing runtime info, docs, and integration details for Astro projects

What is the io.github.morinokami/astro-mcp MCP server?

The astro-mcp MCP server helps AI models understand and develop Astro projects by exposing runtime information, up-to-date documentation, and integration metadata. It integrates directly into your Astro project and provides tools to query project configuration, routes, server details, and Astro ecosystem information.

astro-mcp bridges the gap between AI models and Astro project context by providing access to runtime data that isn't easily discoverable from files alone. It exposes Astro configuration, routing information, development server details, integration metadata, and searchable documentation—enabling AI assistants to give more accurate guidance during development.

How to install io.github.morinokami/astro-mcp

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "astro-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "astro-mcp"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • get-astro-config — Retrieve the complete Astro configuration object including file paths, site URL, build options, integrations, markdown settings, and experimental features
  • list-astro-routes — List all routes in your Astro project with file entrypoints, URL patterns, dynamic parameters, and pre-rendering status; optionally filter by route type
  • get-astro-server-address — Get the current network address, IP protocol family, and port of the running Astro development server
  • list-astro-integrations — List all available Astro integrations in the ecosystem
  • get-astro-integration — Retrieve detailed metadata about a specific Astro integration including description, categories, repository, npm info, and download statistics
  • search-astro-docs — Search the Astro documentation for topics, concepts, or features and return relevant snippets
  • get-astro-changes — Get the changelog for Astro-related packages
  • get-vite-config — Retrieve the Vite configuration digest including root, resolve, plugins, and environment names
  • get-vite-module-info — Get graph information for a module including importers, imported modules, and compiled result

Use cases

  • Get AI assistance understanding your Astro project structure and configuration during development
  • Query available Astro integrations and their details to decide which to add to your project
  • Search Astro documentation directly from your editor to answer framework questions
  • Inspect routing information to debug or optimize page and endpoint configurations
  • Retrieve Astro changelog information to understand package updates and breaking changes

io.github.morinokami/astro-mcp MCP server FAQ

What is astro-mcp?

astro-mcp is an MCP server that integrates with Astro projects to provide AI models with runtime information, documentation, and integration metadata that cannot be easily discovered from project files alone.

Is astro-mcp free?

Yes, astro-mcp is open-source and free to use. It is installed via npm in your Astro project.

How do I install astro-mcp in Cursor or Claude?

Install the integration in your Astro project with `npx astro add astro-mcp`, then create a `.cursor/mcp.json` file (Cursor) or `.vscode/mcp.json` file (VSCode). The server automatically updates the config when the Astro dev server starts.

Does astro-mcp require authentication?

No, astro-mcp does not require authentication. It runs locally on your Astro development server at http://localhost:4321/__mcp/sse.

Is astro-mcp stable?

No, astro-mcp is marked as experimental and unstable. Use it with caution and expect potential breaking changes.

Can I extend astro-mcp with custom tools?

Yes, other Astro integrations can extend astro-mcp using the `mcp:setup` hook to add custom tools.

README (reference)

Source of truth, from the repository.

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:

npx astro add astro-mcp

Manual installation

First, install the astro-mcp package:

npm install astro-mcp

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

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.

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

Related MCP servers

FLFlameox logo

Flameox

Active

Bounded local runtime evidence for coding agents—profile, benchmark, and analyze artifacts without workspace setup.

34
Python
MIT
View repository →

Local-first GitHub contribution research workbench

3
Go
MIT
View repository →
JAJacobian logo

Jacobian

Active

Executable mathematical vocabulary for AI agents: discover, run, and compose typed operations.

54
Python
MIT
View repository →
LELeanToken logo

LeanToken

Active

Token-bounded code retrieval for AI agents: find relevant code and keep context windows lean.

19
Rust
Apache-2.0
View repository →
REREA logo

REA

Active

Reverse engineer apps and binaries with AI agents—understand features without source code.

357
TypeScript
MIT
View repository →
CACAN-TAP Verified logo

Free dofollow backlinks for Canadian businesses. Claim, verify, and track NFC tap analytics.

0
JavaScript
MIT
View repository →