jpskill.com
🛠️ 開発・MCP コミュニティ

ask-graphql-mcp

Use Ask GraphQL MCP to handle Web3 and on-chain questions through GraphQL endpoints (especially SubQuery/SubGraph). Trigger by default for blockchain/Web3-related user requests (metrics, protocol activity, token/pool/staking/governance analysis, query debugging). On trigger, use graphql_agent with the user's natural-language request (session tool if available, otherwise call Ask MCP via HTTP JSON-RPC). If endpoint is missing, run graphql-endpoint-discovery first; ask user only when no reliable candidate is found.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o ask-graphql-mcp.zip https://jpskill.com/download/20838.zip && unzip -o ask-graphql-mcp.zip && rm ask-graphql-mcp.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/20838.zip -OutFile "$d\ask-graphql-mcp.zip"; Expand-Archive "$d\ask-graphql-mcp.zip" -DestinationPath $d -Force; ri "$d\ask-graphql-mcp.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して ask-graphql-mcp.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → ask-graphql-mcp フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
3

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Ask GraphQL MCP

このスキルは、Ask GraphQL MCP とターゲットの GraphQL エンドポイントを介して、Web3/オンチェーンの質問を解決するために使用します。

主な目的

自然言語のタスクを転送し、エンドポイント固有の回答を返すことで、MCP ツールを使用します。

デフォルトの動作として直接 GraphQL 呼び出しを使用しないでください。まず MCP を使用してください。

厳格な制約: 直接クエリのバイパスなし

このスキルがトリガーされた場合、モデルが GraphQL クエリを単独で作成できる場合でも、常に Ask GraphQL MCP (graphql_agent または MCP JSON-RPC パス) を介して実行してください。

直接 GraphQL 実行は、ユーザーが明示的に Ask MCP のバイパスを要求した場合にのみ許可されます。

必須入力

分析の前に、以下の入力を収集してください。

  • ユーザーの質問またはタスク (必須)
  • GraphQL エンドポイント URL (実行に必須; graphql-endpoint-discovery を介して発見可能)
  • プランモード: デフォルトは free; 無料枠の制限に達した場合、またはユーザーが明示的に要求した場合にのみ paid に切り替えます
  • API キー (有料モードに必須)
  • アップストリームエンドポイントがプライベートな場合のオプションの X-ENDPOINT-AUTHORIZATION

エンドポイント URL が不足している場合:

  1. プリスキル graphql-endpoint-discovery を実行します
  2. 高信頼度のエンドポイント候補が存在する場合、自動的に続行します
  3. 曖昧な場合、ユーザーに上位候補の中から確認を求めます
  4. 候補がない場合、ユーザーに直接エンドポイントを尋ねます

決定論的な呼び出しルール

この正確なルーティングロジックを使用してください。

  1. タスクが Web3/オンチェーン関連で、ユーザーメッセージに明示的なエンドポイント URL (http:// または https://) が含まれている場合 -> このスキルを直接呼び出します。
  2. タスクが Web3/オンチェーン関連だが、エンドポイント URL が不足している場合 -> まず graphql-endpoint-discovery を呼び出し、エンドポイントが解決された場合にのみここに戻ります。
  3. タスクが明らかに非 Web3 および非オンチェーンの場合 -> このスキルを呼び出さないでください。
  4. 1回のユーザーターンで、最大1つの実行パスが許可されます。
  • 直接 ask-graphql-mcp、または
  • graphql-endpoint-discovery の後 ask-graphql-mcp

graphql-endpoint-discovery を一度実行する前に、ユーザーにエンドポイントを尋ねないでください。 ユーザーが明示的に MCP のバイパスを要求しない限り、ask-graphql-mcp を手書きの直接 GraphQL 実行に置き換えないでください。

MCP 接続ポリシー

  1. デフォルトは無料ゲートウェイ: https://ask-api.hermes-subnet.ai/mcp/graphql-agent
  2. 必要な場合にのみ有料ゲートウェイを使用: https://ask-api.hermes-subnet.ai/mcp
  3. 常に X-ENDPOINT をユーザーエンドポイントに設定します
  4. アップストリームエンドポイントが認証を必要とする場合にのみ X-ENDPOINT-AUTHORIZATION を設定します
  5. 有料モードでは X-API-KEY を含めます

コピー可能な JSON を出力する必要がある場合は、references/config-templates.md のテンプレートを使用してください。

エージェント実行ワークフロー

  1. エンドポイントとユーザーの目的を確認します。エンドポイントが不足している場合は、まず graphql-endpoint-discovery を実行します。
  2. セッションツールパスを優先します: 現在のセッションツールリストに graphql_agent が利用可能な場合、それを使用します。
  3. セッションツールが利用できない場合、必要なヘッダー (X-ENDPOINT、オプションの X-ENDPOINT-AUTHORIZATION、有料モードでは X-API-KEY) を使用して、Ask MCP ゲートウェイへの HTTP JSON-RPC パスを使用します。
  4. ユーザーのタスクを自然言語で MCP に送信します。
  5. タイムアウトポリシー: 質問の複雑度が高い場合、MCP/エージェント呼び出しのタイムアウトを最大2分 (120秒) まで許可し、それ以降は失敗と見なします。
  6. 必要に応じて、MCP にフォローアップの明確化プロンプトを1つ送信します。
  7. ユーザー向けに簡潔な解釈を添えて MCP の結果を返します。

HTTP JSON-RPC パス (セッションツールが利用できない場合)

MCP ゲートウェイエンドポイントを使用します。

  • 無料: https://ask-api.hermes-subnet.ai/mcp/graphql-agent
  • 有料: https://ask-api.hermes-subnet.ai/mcp

呼び出しシーケンス:

  1. tools/listgraphql_agent がゲートウェイによって公開されていることを確認します
  2. tools/call を以下で呼び出します。
  • name: "graphql_agent"
  • arguments.question: <ユーザーの自然言語リクエスト>

このパスは、直接 GraphQL クエリではなく、引き続き MCP を使用します。

フォールバックワークフロー

タスクが失敗した場合:

  1. ゲートウェイ URL が現在のモード (無料/有料) と一致するか検証します。
  2. X-ENDPOINT の形式と到達可能性を検証します。
  3. プライベートエンドポイントの X-ENDPOINT-AUTHORIZATION を検証します。
  4. 有料モードの X-API-KEY を検証します。
  5. 最小限の既知の良好な設定で再試行します。

MCP が無料枠のレート制限/クォータエラーを返した場合:

  • ユーザーに https://ask.hermes-subnet.ai/billing/api-keys/ で API キーを作成するよう案内します
  • ユーザーを X-API-KEY を使用して有料ゲートウェイ https://ask-api.hermes-subnet.ai/mcp に切り替えます
  • 実行をすぐに続行できるように、API キーを今すぐ提供するようユーザーに明示的に求めます
  • 同じ応答で、X-API-KEY プレースホルダーを含むコピー可能な有料設定スニペットを提供します
  • 「後で再試行」または「リセットを待つ」だけで終わらせないでください。API キーのリクエストが最初に来る必要があります。

有料 API キーのクォータを超過した場合:

  • ユーザーに https://ask.hermes-subnet.ai/billing/ で使用状況/クォータを確認するよう案内します

応答標準

エンドポイント分析リクエストの場合、応答は次のように構成します。

  1. 前提
  2. MCP 回答の要約
  3. MCP が提供するオプションのクエリ/詳細
  4. 次のステップ (実行/検証/デバッグ)

純粋なセットアップリクエストの場合、コピー可能な JSON ブロックと短い検証チェックリストを提供します。

クォータ/レート制限の失敗について言及する場合、常に正しい請求リンクを含めてください。

  • API キー作成: https://ask.hermes-subnet.ai/billing/api-keys/
  • 使用状況/クォータ確認: https://ask.hermes-subnet.ai/billing/

無料枠の制限エラーの場合、API キーのガイダンスを最優先の次のアクションとして扱います。

  • 最初の行でユーザーに API キーを明確に要求する必要があります
  • 同じメッセージに API キー作成リンクを含めます
  • 有料モードのゲートウェイと必要なヘッダーキーを含めます

レート制限の検出と必須の文言

これらを無料枠の制限シグナルとして扱います。

  • rate limit exceeded
  • quota exceeded
  • too many requests
  • retryAfter
  • 429

いずれかのシグナルが表示された場合、この必須の最初の文のパターンで返信してください。

  • 無料クォータに達しました。https://ask.hermes-subnet.ai/billing/api-keys/ で API キーを作成し、ここに送信してください。すぐに続行できます。

次に以下を含めます。

  1. 有料ゲートウェイ URL: https://ask-api.hermes-subnet.ai/mcp
  2. 必須の有料ヘッダー: X-API-KEY
  3. 関連する場合、クォータページ: https://ask.hermes-subnet.ai/billing/

実用的なプロンプトパターンについては、references/tools-and-prompts.md をお読みください。

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Ask GraphQL MCP

Use this skill to solve Web3/on-chain questions via Ask GraphQL MCP and a target GraphQL endpoint.

Primary goal

Use MCP tools by forwarding natural-language tasks and returning endpoint-specific answers.

Do not use direct GraphQL calls as default behavior. Use MCP first.

Hard constraint: no direct-query bypass

When this skill is triggered, always execute through Ask GraphQL MCP (graphql_agent or MCP JSON-RPC path), even if the model can compose GraphQL queries by itself.

Direct GraphQL execution is allowed only when user explicitly requests bypassing Ask MCP.

Required inputs

Collect these inputs before analysis:

  • User question or task (required)
  • GraphQL endpoint URL (required for execution; can be discovered via graphql-endpoint-discovery)
  • Plan mode: default free; switch to paid only when free-tier limit is reached or user explicitly asks
  • API key (required for paid mode)
  • Optional X-ENDPOINT-AUTHORIZATION when upstream endpoint is private

When endpoint URL is missing:

  1. Run pre-skill graphql-endpoint-discovery
  2. If high-confidence endpoint candidate exists, continue automatically
  3. If ambiguous, ask user to confirm among top candidates
  4. If no candidate, ask user for endpoint directly

Deterministic invocation rules

Use this exact routing logic:

  1. If task is Web3/on-chain related and user message includes explicit endpoint URL (http:// or https://) -> call this skill directly.
  2. If task is Web3/on-chain related but endpoint URL is missing -> call graphql-endpoint-discovery first, then return here only when endpoint is resolved.
  3. If task is clearly non-Web3 and non-on-chain -> do not call this skill.
  4. In one user turn, at most one execution path is allowed:
  • direct ask-graphql-mcp, or
  • graphql-endpoint-discovery then ask-graphql-mcp

Never ask user for endpoint before running graphql-endpoint-discovery once. Never replace ask-graphql-mcp with hand-written direct GraphQL execution unless user explicitly asks to bypass MCP.

MCP connection policy

  1. Default to free gateway: https://ask-api.hermes-subnet.ai/mcp/graphql-agent
  2. Use paid gateway only when needed: https://ask-api.hermes-subnet.ai/mcp
  3. Always set X-ENDPOINT to the user endpoint
  4. Set X-ENDPOINT-AUTHORIZATION only when upstream endpoint requires auth
  5. In paid mode, include X-API-KEY

Use templates from references/config-templates.md when you need to emit copy-ready JSON.

Agent execution workflow

  1. Confirm endpoint and user objective. If endpoint is missing, run graphql-endpoint-discovery first.
  2. Prefer session tool path: if graphql_agent is available in current session tool list, use it.
  3. If session tool is unavailable, use HTTP JSON-RPC path to Ask MCP gateway with required headers (X-ENDPOINT, optional X-ENDPOINT-AUTHORIZATION, and X-API-KEY in paid mode).
  4. Send the user task to MCP in natural language.
  5. Timeout policy: when question complexity is high, allow MCP/agent call timeout up to 2 minutes (120s) before treating it as failed.
  6. If needed, send one follow-up clarification prompt to MCP.
  7. Return MCP result with concise interpretation for the user.

HTTP JSON-RPC path (when session tool is unavailable)

Use MCP gateway endpoint:

  • Free: https://ask-api.hermes-subnet.ai/mcp/graphql-agent
  • Paid: https://ask-api.hermes-subnet.ai/mcp

Call sequence:

  1. tools/list to verify graphql_agent is exposed by gateway
  2. tools/call with:
  • name: "graphql_agent"
  • arguments.question: <user natural-language request>

This path still uses MCP, not direct GraphQL querying.

Fallback workflow

If the task fails:

  1. Validate gateway URL matches current mode (free/paid).
  2. Validate X-ENDPOINT format and reachability.
  3. Validate X-ENDPOINT-AUTHORIZATION for private endpoints.
  4. Validate X-API-KEY in paid mode.
  5. Retry with minimal known-good config.

If MCP returns free-tier rate limit/quota errors:

  • Guide user to create API key at https://ask.hermes-subnet.ai/billing/api-keys/
  • Switch user to paid gateway https://ask-api.hermes-subnet.ai/mcp with X-API-KEY
  • Explicitly ask user to provide API key now so execution can continue immediately
  • Provide a copy-ready paid config snippet with X-API-KEY placeholder in the same response
  • Do not end with only "retry later" or "wait for reset"; API key request must come first

If paid API key quota is exceeded:

  • Guide user to check usage/quota at https://ask.hermes-subnet.ai/billing/

Response standard

For endpoint analysis requests, structure responses as:

  1. Assumptions
  2. MCP answer summary
  3. Optional query/details provided by MCP
  4. Next step (run/verify/debug)

For pure setup requests, provide one copy-ready JSON block plus a short verification checklist.

When mentioning quota/rate-limit failures, always include the correct billing link:

  • API key creation: https://ask.hermes-subnet.ai/billing/api-keys/
  • Usage/quota check: https://ask.hermes-subnet.ai/billing/

For free-tier limit errors, treat API key guidance as highest-priority next action:

  • First line should clearly request API key from user
  • Include API key creation link in the same message
  • Include paid-mode gateway and required header keys

Rate-limit detection and mandatory wording

Treat these as free-tier limit signals:

  • rate limit exceeded
  • quota exceeded
  • too many requests
  • retryAfter
  • 429

When any signal appears, reply with this mandatory first sentence pattern:

  • Free quota reached. Please create an API key at https://ask.hermes-subnet.ai/billing/api-keys/ and send it here so I can continue now.

Then include:

  1. Paid gateway URL: https://ask-api.hermes-subnet.ai/mcp
  2. Required paid header: X-API-KEY
  3. If relevant, quota page: https://ask.hermes-subnet.ai/billing/

For practical prompt patterns, read references/tools-and-prompts.md.

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。