MA

morinokami/astro-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

61 stars 1 forks 품질 66 트렌드 13MIT

MCP 서버는 Astro 프로젝트 개발 지원

개요

MCP 서버는 antfu의 nuxt-mcp에 의해 영감을 Astro 프로젝트 개발을 지원한다. 이 패키지는 실험적이고 불안정합니다. 사용시 주의를 기울였습니다. astro-mcp는 모델이 Astro 프로젝트를 더 잘 이해할 수 있도록 돕는 것을 목표로합니다. 프로젝트 파일을보고하여 쉽게 접근 할 수없는 정보를 제공합니다. - Astro 서버에 대한 실행 시간 정보 - 최신 Astro docs 콘텐츠 - 사용중인 Astro 통합에 대한 정보 Astro 프로젝트 디렉토리에서 다음 명령을 실행하십시오. 그런 다음 Astro config에 astro-mcp 통합을 추가하십시오. 통합을 설치 한 후 MCP 서버는 http://localhost:4321/__mcp/sse.]에서 사용할 수 있습니다. 연결하려면 편집기 또는 도구에 적합한 위치에 빈 구성 파일을 만듭니다. astro-mcp는 Astro 서버가 시작할 때 파일을 자동으로 업데이트합니다.

개요(AI 번역)

MCP 서버는 antfu의 nuxt-mcp에 의해 영감을 Astro 프로젝트 개발을 지원한다.

[! 중요] 이 패키지는 실험적이고 불안정합니다. 사용시 주의를 기울였습니다.

astro-mcp]는 프로젝트 파일을 찾고 쉽게 접근 할 수없는 정보를 제공함으로써 Astro 프로젝트를 더 잘 이해할 수 있도록하는 것을 목표로합니다.

  • Astro 서버에 대한 실행 정보
  • 최신 Astro docs 내용
  • Astro 통합에 대한 정보

설치

Astro 프로젝트 디렉토리에서 다음 명령을 실행하십시오.

수동 설치

먼저 astro-mcp 패키지를 설치하십시오.

그런 다음 astro-mcp]를 Astro config에 통합하십시오.

사용법

통합을 설치 한 후 MCP 서버는 http://localhost:4321/__mcp/sse.]에서 사용할 수 있습니다. 연결하려면 편집기 또는 도구에 적합한 위치에 빈 구성 파일을 만듭니다.

에디터/도구 구성 파일
VSCode [T4]
커서 [T5]
윈드 서핑 [T6]
코드 [T7]

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 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:

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, or fallback
GitHub에서 전체 README 보기

설치

npx astro add astro-mcp
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →