Astro Docs MCP Server
Astro Docs MCP サーバー
AIエージェントにAstroドキュメントへのアクセスを提供するMCPサーバー。このサーバーにより、AIアシスタントはAstro関連のタスクでユーザーを支援する際に、Astroドキュメントを検索・参照できるようになります。
このTypeScriptベースのMCPサーバーは、Astroのドキュメント検索システムを実装しています。以下の機能を提供することで、MCPのコアコンセプトを実証しています。
URI とメタデータを含む Astro ドキュメント セクションを表すリソース
Astro ドキュメントを検索するためのツール
一般的なAstroの質問とタスクのプロンプト
特徴
リソース
astro-docs://URI 経由で Astro ドキュメントの一覧とアクセスを表示します。各ドキュメントセクションにはタイトル、コンテンツ、カテゴリがあります
シンプルなコンテンツアクセスのためのプレーンテキスト MIME タイプ
ツール
search_docs- Astro ドキュメントを検索必須パラメータとして検索クエリを受け取ります
一致するドキュメントセクションを返します
プロンプト
explain_astro_islands- アストロアイランドの建築の詳細な説明を見るastro_project_setup- 新しい Astro プロジェクトを設定するためのガイドastro_vs_other_frameworks- Astroと他のWebフレームワークを比較する
Related MCP server: Dedalus MCP Documentation Server
プロジェクト構造
src/- MCPサーバーのソースコードindex.ts- メインMCPサーバーの実装scripts/- ビルドとテストのためのヘルパースクリプトbuild.js- TypeScript をトランスパイルし、ランチャー スクリプトを作成するビルド スクリプトtest-client.js- サーバー機能を検証するためのテストクライアント
bin/- 生成された実行可能スクリプトastro-docs-mcp- MCP サーバーのメイン ランチャー スクリプト
build/- コンパイルされたJavaScriptファイル(生成済み)
要件
Node.js v16以降が必要です
最高の互換性を得るにはNode.js v20以上が推奨されます
サーバーはESモジュール構文を使用する
pnpm パッケージ マネージャー (npm よりも推奨)
インストール
依存関係のインストール
依存関係をインストールします:
pnpm installサーバーを構築します。
pnpm run build自動リビルドを使用した開発の場合:
pnpm run watchサーバーの実行
pnpm start
# OR directly
./bin/astro-docs-mcpClaude Desktop による構成
Claude Desktop で使用するには、サーバー設定を追加します。
MacOS の場合: ~/Library/Application Support/Claude/claude_desktop_config.json Windows の場合: %APPDATA%/Claude/claude_desktop_config.json
重要:構成ではスクリプトへの絶対パスを使用する必要があります。
{
"mcp_servers": [
{
"id": "astro-docs-mcp",
"name": "Astro Docs",
"command": "/full/absolute/path/to/astro-mcp/bin/astro-docs-mcp",
"type": "built-in"
}
]
}/full/absolute/path/to/astro-mcp/インストール ディレクトリへの実際の絶対パスに置き換えます。
たとえば、リポジトリが/Users/username/projects/astro-mcpにある場合、コマンドは次のようになります。
"/Users/username/projects/astro-mcp/bin/astro-docs-mcp"デバッグ
MCPサーバーはstdio経由で通信するため、デバッグが困難になる場合があります。パッケージスクリプトとして提供されているMCP Inspectorの使用をお勧めします。
pnpm run inspectorインスペクターは、ブラウザでデバッグ ツールにアクセスするための URL を提供します。
テスト
サーバーが正しく動作していることを確認するためのテスト クライアントが提供されています。
pnpm test
# OR directly
node src/scripts/test-client.jsこれにより、サーバーにいくつかのコマンドが送信され、応答が表示されます。
トラブルシューティング
サーバーに問題が発生した場合:
パスの問題:最も一般的な問題は、設定内のパスが正しくないことです。以下の点を確認してください。
claude_desktop_config.json 内のスクリプトへの絶対パスを使用しています
パスは
bin/astro-docs-mcp(ルートスクリプトではない)を指しますビルドディレクトリが存在し、index.js が含まれている (
ls -la build/)すべてのスクリプトには実行権限があります
「モジュールが見つかりません」エラー:
Cannot find module '/build/index.js'のようなエラーが表示される場合は、以下を確認してください。ビルドステップを実行したこと(
pnpm run build)スクリプトが正しいディレクトリから実行されているか
スクリプト実行に絶対パスが使用されていること
Node.js バージョン:Node.js v16 以降を使用していることを確認してください。最適な結果を得るには、v20 以降をご使用ください。
node --versionスクリプトの権限: スクリプトに実行権限があることを確認します。
chmod +x bin/astro-docs-mcp src/scripts/build.js src/scripts/test-client.jsJSON出力の問題:デバッグメッセージがstdoutに送信されると、Claude Desktopは有効なJSONのみを想定しているため、混乱を招きます。弊社のスクリプトは、すべてのデバッグ出力をstderrに適切にリダイレクトします。
Claude Desktopでの使用
上記のインストール手順に従ってサーバーをインストールします。
スクリプトへの絶対パスを含めるように構成ファイルを編集して、Claude Desktop を構成します。
{ "mcp_servers": [ { "id": "astro-docs-mcp", "name": "Astro Docs", "command": "/full/absolute/path/to/astro-mcp/bin/astro-docs-mcp", "type": "built-in" } ] }Claude Desktop を再起動します。
次のコマンドを使用して、Astro ドキュメントを操作できるようになりました。
list- 利用可能なAstroドキュメントセクションを一覧表示しますsearch <query>- Astroドキュメントを検索read astro-docs:///<id>- 特定のドキュメントセクションを読む
将来の機能強化
Astroのウェブサイトからリアルタイムドキュメントを取得する
より包括的なドキュメントセクションを追加する
ドキュメントのバージョン管理サポートを実装する
一般的な Astro パターンのコード例とスニペットを追加します
Available Tools
1 toolsearch_docsC
Search Astro documentation
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search term to find in Astro documentation |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action but reveals nothing about how the search works (e.g., scope, ranking, pagination), what the output looks like, or any constraints like rate limits or authentication needs. This leaves significant gaps for a tool with undocumented behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at just three words, front-loading the essential action and resource without any wasted text. Every word earns its place, making it efficient and straightforward for an agent to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete for a search tool. It doesn't explain what the search returns, how results are structured, or any behavioral nuances, leaving the agent with insufficient context to use the tool effectively beyond the basic parameter.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the single parameter 'query' clearly documented as 'Search term to find in Astro documentation'. The description adds no additional parameter details beyond what the schema provides, so it meets the baseline for high schema coverage without compensating value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('Search') and resource ('Astro documentation'), making it immediately understandable. However, with no sibling tools mentioned, there's no opportunity to demonstrate differentiation from alternatives, which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or contextual limitations. While the absence of sibling tools reduces the need for differentiation, it still lacks any usage instructions or exclusions, leaving the agent with minimal operational context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
search_docs
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion or overlap between tools. The single tool 'search_docs' has a clearly distinct and unambiguous purpose.
The single tool name 'search_docs' follows a clear verb_noun pattern, and with only one tool, consistency is inherently perfect as there are no other names to compare against.
A single tool for an 'Astro Docs MCP Server' feels too thin for the apparent scope. While search is a core function, documentation servers typically benefit from additional tools like browsing, filtering, or retrieving specific pages, making this count borderline inadequate.
The tool surface is severely incomplete for a documentation server. It only provides search functionality, lacking obvious gaps such as retrieving documentation pages, listing categories, or navigating content, which are essential for comprehensive agent interaction with documentation.
Maintenance
Related MCP Connectors
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
An MCP server that integrates with Discord to provide AI-powered features.
An MCP server that gives your AI access to the source code and docs of all public github repos
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to access up-to-date documentation for Python libraries like LangChain, LlamaIndex, and OpenAI through dynamic fetching from official sources.1MIT
- AlicenseAqualityDmaintenanceAn MCP server that serves documentation and enables AI-powered search, Q\&A, and document analysis for developer tools and guides.54MIT
- AlicenseNot gradedqualityAmaintenanceAn MCP server that provides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation context.32 npmMIT
- AlicenseNot gradedqualityBmaintenanceMCP server for Astro/Starlight docs sites, providing search, get, and list tools for documentation content.91 npm13MIT