astro-mcp
Provides tools for Astro project development, including retrieving config, routes, server address, integration info, documentation search, and changelog.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@astro-mcplist my Astro project routes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
astro-mcp
MCP server to support Astro project development, inspired by antfu's nuxt-mcp.
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-mcpManual installation
First, install the astro-mcp package:
npm install astro-mcpThen, add the astro-mcp integration to your Astro config:
import { defineConfig } from "astro/config";
import mcp from "astro-mcp";
export default defineConfig({
integrations: [mcp()],
});Related MCP server: MkDocs MCP Server
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 |
|
Cursor |
|
Windsurf |
|
Claude Code |
|
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 featuresParameters: 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 categoriesParameters:
type(string, optional):redirect,page,endpoint, orfallback
get-astro-server-address: Get the current network address, IP protocol family, and port number of the running Astro development serverParameters: None
list-astro-integrations: List all Astro integrations available in the ecosystemParameters: 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 statisticsParameters:
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 queryParameters:
query(string): The query to search for
get-astro-changes: Get the changelog of the Astro-related packagesParameters:
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 namesParameters: None
get-vite-module-info: Get graph information of a module, including importers, imported modules, and compiled resultParameters:
filepath(string): The absolute filepath of the module
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
Flicense-qualityFmaintenanceAllows AI tools like Cursor, VS Code, Claude, ChatGPT, and Windsurf to access the latest Astro documentation in a structured way, enabling accurate answers about Astro's features, APIs, and best practices.66- Alicense-qualityDmaintenanceEnables AI assistants to access and search MkDocs documentation through tools for full-text search, page navigation, and code block extraction. It serves documentation pages as readable resources and provides structural outlines to help LLMs navigate documentation content.MIT
- Flicense-qualityDmaintenanceProvides AI assistants with up-to-date Vue ecosystem documentation through the Model Context Protocol, enabling semantic search, API lookup, and cross-framework references.11
- AlicenseAqualityDmaintenanceProvides AI agents with accurate, version-aware documentation for React Native, Expo, React Navigation, and Ignite by automatically detecting project dependencies and fetching matching documentation.12MIT
Related MCP Connectors
Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Search your knowledge bases from any AI assistant using hybrid RAG.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/morinokami/astro-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server