astro-mcp
by morinokami·★ 58·综合分 43
为 Astro 项目提供项目信息、运行时数据、文档搜索和集成数据的 MCP 服务器。
概述
astro-mcp 是一个专门设计的 MCP 服务器,通过提供运行时信息、最新文档访问权限和已安装集成数据,增强 AI 模型对 Astro 项目的理解。它提供检索 Astro 配置、列出路由和集成、搜索文档以及监控服务器状态的工具。该服务器通过其官方集成系统与 Astro 框架无缝集成。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
如果你正在开发 Astro 项目并希望 AI 助手能够更好地理解你的项目结构、配置并访问最新文档,应选择此工具。
什么时候不要选它
由于它被明确标记为实验性和不稳定,避免在生产环境中使用。如果您需要更成熟的解决方案,请考虑替代方案。
此 server 暴露的工具
从 README 抽取出 9 个工具get-astro-configGet the Astro config object containing comprehensive project settings
list-astro-routesList detailed routing information from your Astro project
get-astro-server-addressGet the current network address and port of the running Astro development server
list-astro-integrationsList all Astro integrations available in the ecosystem
get-astro-integrationGet detailed metadata about a specific Astro integration
search-astro-docsSearch the Astro documentation for specific topics
get-astro-changesGet the changelog of Astro-related packages
get-vite-configGet the Vite configuration digest including root, resolve, plugins, and environment names
get-vite-module-infoGet graph information of a module including importers and imported modules
可对比工具
安装
npx astro add astro-mcp手动安装:
npm install astro-mcp然后添加到您的 Astro 配置:
import { defineConfig } from "astro/config";
import mcp from "astro-mcp";
export default defineConfig({
integrations: [mcp()],
});MCP 服务器将在 http://localhost:4321/__mcp/sse 上可用。为您的编辑器创建一个空的配置文件:
- VSCode:
.vscode/mcp.json - Cursor:
.cursor/mcp.json - Windsurf:
~/.codeium/windsurf/mcp_config.json - Claude Code:
.mcp.json
FAQ
- 这个 MCP 服务器是否可以用于生产环境?
- README 明确指出这个包是'实验性和不稳定的。使用时请谨慎。'
- 我可以用自定义工具扩展 MCP 服务器吗?
- 是的,astro-mcp 提供了一个 'mcp:setup' 钩子,其他集成可以使用它向 MCP 服务器添加自定义工具。
astro-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。