- Home
- MCP servers
- astro-mcp
astro-mcp
- typescript
55
GitHub Stars
typescript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can use the astro-mcp server to share Astro project runtime information, up-to-date docs content, and integration details with editors and tooling. This enables editors and tools to obtain context about your Astro project that isn’t readily visible from files alone, helping you work more efficiently and accurately.
How to use
To connect a client, ensure the MCP server is reachable at the dedicated endpoint and provide the client with an empty MCP configuration file in the appropriate location for your editor or tool. The server emits updates over a streaming endpoint that clients can subscribe to, so your tooling can react to changes in your Astro project as you work.
Connection steps you can follow include:
- Start your Astro project with the MCP server available at the default streaming URL.
- Create a configuration file for your editor or tool in the expected path (for example, .vscode/mcp.json for VSCode).
- Ensure the client loads the MCP stream and listens for updates to project configuration, routes, integrations, and related data.
- Use the provided tools to inspect Astro configuration, routes, integrations, and server details as you develop.
How to install
Prerequisites: Node.js and npm installed on your system. You may also need a compatible editor or tool that supports MCP configuration files.
Install the integration in your Astro project using the recommended command:
npx astro add astro-mcp
Manual installation
If you prefer a manual setup, install the astro-mcp package and register the integration in your Astro config like this:
npm install astro-mcp
import { defineConfig } from "astro/config";
import mcp from "astro-mcp";
export default defineConfig({
integrations: [mcp()],
});
Available tools
get-astro-config
Retrieve the Astro configuration object with full project settings including paths, site, build options, server settings, and enabled integrations.
list-astro-routes
List all routing information in your Astro project, including routes, entrypoints, URL patterns, dynamic parameters, pre-render status, and route types.
get-astro-server-address
Provide the current network address, IP family, and port of the running Astro development server.
list-astro-integrations
Show all Astro integrations available in the ecosystem.
get-astro-integration
Fetch detailed metadata about a specific Astro integration, including name, description, categories, repositories, and download stats.
search-astro-docs
Search the Astro documentation for topics or features and return relevant snippets.
get-astro-changes
Retrieve the changelog for Astro-related packages.
get-vite-config
Return the Vite config digest including root, resolve, plugins, and environment names.
get-vite-module-info
Inspect module graph information including importers, imported modules, and compiled results.