io.github.morinokami/astro-mcp
MCP server to support Astro project development
What can you do with io.github.morinokami/astro-mcp?
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 ...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 c...get-astro-server-address: Get the current network address, IP protocol family, and port number of the running Astro development serverlist-astro-integrations: List all Astro integrations available in the ecosystemget-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 statisticssearch-astro-docs: Search the Astro documentation for specific topics, concepts, or features. Returns relevant documentation snippets that match your queryget-astro-changes: Get the changelog of the Astro-related packages
Install
Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).
astro-mcpclaude mcp add astro-mcp -- npx -y astro-mcp@0.4.2
{
"mcpServers": {
"astro-mcp": {
"command": "npx",
"args": [
"-y",
"astro-mcp@0.4.2"
]
}
}
}
Documentation
From the project's README on GitHub, refreshed weekly. Links open on GitHub.
Contents
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/Tool | Configuration 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, orfallback
- Parameters:
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
- Parameters:
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
- Parameters:
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
- Parameters:
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
- Parameters:
Frequently asked questions
What is io.github.morinokami/astro-mcp?
MCP server to support Astro project development
How do I install io.github.morinokami/astro-mcp?
It runs on your machine. In Claude Code: claude mcp add astro-mcp -- npx -y astro-mcp@0.4.2. For other clients, paste the JSON configuration from this page into their MCP settings.
Does io.github.morinokami/astro-mcp need an API key?
Its registry entry lists no required key or secret. Some features may still need an account with the service it connects to.
Is io.github.morinokami/astro-mcp open source?
Yes. Its code is on GitHub under the MIT license.
Who maintains io.github.morinokami/astro-mcp?
It is published by morinokami. AI.tn lists it but does not maintain or endorse it.
From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.