
Astro Mcp
io.github.morinokami由 GitHub 帳號 morinokami 發布v0.4.2更新於 Oct 24, 2026
MCP server to support Astro project development
概覽
讓助理取得 Astro 專案的執行期與文件脈絡,包括設定、路由、伺服器位址、整合資訊與文件搜尋。
- 可以做什麼
- astro-mcp 是一個 Astro 整合,會提供一個用於 Astro 專案開發的 MCP 伺服器。它的工具可以讀取 Astro 設定,列出路由及其進入點檔案、動態參數與預先算繪狀態,回報執行中的開發伺服器位址與連接埠,列出並描述 Astro 整合,搜尋 Astro 文件,以及取得 Astro 相關套件的更新紀錄。它也提供 Vite 工具,用來讀取 Vite 設定以及某個模組的匯入圖與編譯結果。
- 適用情境
- 適合在 Astro 專案內工作時使用,讓助理根據即時專案狀態而非僅磁碟上的檔案來判斷,例如檢查路由、查看開發伺服器位址,或查詢 Astro 文件與整合資訊。
- 執行需求
- 需要本機 Astro 專案並安裝 astro-mcp 整合(npx astro add astro-mcp,或手動 npm install 並在設定中加入)。MCP 伺服器由執行中的 Astro 開發伺服器在本機 SSE 端點提供,並會建立編輯器或工具的設定檔用於連線。需要 Node.js 與 npm。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Astro Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
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:
Manual installation
First, install the astro-mcp package:
Then, add the astro-mcp integration to your Astro config:
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:
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.
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:
來源:README.md,提交 ba9592f
工具
0版本歷史
1- v0.4.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分