本文へ移動
cccskills
無料GitHub で公開日本語紹介

diagnosing-mcp

ZCodeのMCPサーバーが接続しない、ツールが表示されないなどの設定問題を、状態や設定ファイルから切り分けて修正するスキルです。

原文原文の説明を見る

Use to diagnose and fix ZCode MCP (Model Context Protocol) server configuration problems in the ZCode client. Applies when an MCP server will not connect, its tools (mcp__server__tool) do not appear, it shows as disabled or failed, connections time out, a command cannot be found, template variables are not expanded, or a server defined in a configuration file has no effect. Provides configuration locations, how to inspect status in Settings, common pitfalls, and a step-by-step localization and repair workflow.

連携ツールMySQL

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • MCPサーバーが接続・起動しないとき
  • MCPツールがセッションに表示されないとき
  • 設定ファイルの変更が反映されないとき
  • コマンドや通信方式のエラーを調べたいとき

日本語での紹介

できること

ZCodeクライアントのMCPサーバー設定を調べ、接続失敗やツールが表示されない原因を切り分けます。設定画面で接続・無効・失敗などの状態を確認し、ユーザー、ワークスペース、プラグインなど設定場所ごとの読み込み順や上書き関係を踏まえて、該当する設定項目を特定します。command や args、env、headers、通信方式、タイムアウトなどの指定ミス、JSONの構文エラー、未知のキー、起動時のエラーも確認します。

こんなときに便利

MCPサーバーが接続しない、タイムアウトする、ツールがモデルのセッションに現れない場合に役立ちます。設定ファイルを編集しても反映されないときや、コマンドが見つからない、テンプレート変数がそのまま渡されるときにも、状態と設定場所を照合して原因を探せます。

使い方の例

  • 「MCPサーバーがタイムアウトします。設定を確認してください」
  • 「設定ファイルに書いたサーバーが表示されない原因を調べてください」
  • 「MCPサーバーは表示されますが、ツールが出ない理由を診断してください」

注意点

対象はZCodeクライアントのMCP設定です。設定ファイルで定義したサーバーでは ${...} 形式のテンプレート変数は展開されないため、絶対パスなど具体的な値を指定します。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

資料チェック

SKILL.md の記述から、注意が要る操作と導入の前提を AI が確認しました。点数は実際に動かした結果(実行検証)だけで付けています。

安全面送信・削除・コマンド実行などの扱いが明示されているか
B一部不足設定ファイルの編集や端末でのコマンド実行を案内するが、影響の確認は限定的。
導入のしやすさ必要なツールや API キーが少ないか、書かれているか
A良好ZCode設定画面と設定ファイルの場所が示され、追加ツール要件はない。

点数には入れていません。 2026年10月24日 時点で AI(OpenAI Codex)が判定しました。目安なので、入れる前に原文も確認してください。

評価が違うと思ったら、見直しを依頼する

どの項目が、なぜ違うと思うかを書いてください。ログインは不要です。内容を SKILL.md と照らし合わせて評価を作り直し、この欄に反映します。

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

含まれるファイル(1)

  • SKILL.md11.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Diagnosing MCP Configuration

Goal: reduce any MCP problem to a single concrete file-field edit. A person inspects status from the client; an agent reads and edits the configuration files directly.

Key points that are often misunderstood: the user configuration file is ~/.zcode/cli/config.json; .agents/mcp.json is a compatibility fallback (read only when the same scope's .zcode has no MCP servers); and in the desktop client, MCP status and repair live under Settings → MCP.

1. Configuration locations and precedence

ScopeFileField
User~/.zcode/cli/config.jsonmcp.servers
User (fallback)~/.agents/mcp.jsonmcpServers (used only if ~/.zcode/cli/config.json has no MCP servers)
Workspace<repo>/.zcode/config.json or <repo>/zcode.json (every directory from the repository root down to the working directory is read)mcp.servers
Workspace (fallback)<repo>/.agents/mcp.jsonmcpServers (used only if the workspace .zcode has no MCP servers)
Plugin<pluginRoot>/.mcp.json or the manifest's mcpServers fieldKeys are namespaced as plugin:<plugin>:<server>

Within each scope, .zcode takes priority and .agents/mcp.json is a same-scope fallback: if that scope's .zcode defines any MCP server, its .agents/mcp.json is ignored entirely. Note the different key shape — .zcode uses nested mcp.servers, while .agents/mcp.json uses a top-level mcpServers.

Override order across scopes for a same-named server: CLI → environment → user → workspace → system. In short, user overrides workspace. Plugin-provided servers form the base layer and are overridden by explicit configuration.

Auto-connect: MCP servers from every scope — user, workspace, plugin, environment, and CLI — are trusted and connected automatically at session start. Workspace-scoped servers were previously untrusted (reported Project MCP server requires explicit connection before use.); they now connect by default like any other scope. Use Settings → MCP as the supported client surface for inspecting status and repairing configuration.

2. Configuration schema

  • stdio: requires command; optional args[], cwd, env, enabled, timeoutMs.
  • http / sse: requires url; optional headers, enabled, timeoutMs.
  • Standard field names are env for stdio environment variables and headers for HTTP/SSE request headers. command is a string and args is an array of strings; do not paste OpenCode-style command: ["npx", "-y", "..."] into ZCode's JSON editor.
  • When type is omitted it is inferred: a command implies stdio, a url implies http. Legacy forms are migrated automatically when the CLI reads config directly (type: "remote" → http, environment → env, enable → enabled, http_headers → headers). Desktop app-managed session creation may bypass part of that CLI file parser, so prefer canonical fields (env, headers, enabled, type: "http") in files that the desktop Settings → MCP page reads.
  • The configuration-file server schema is strict: an unknown key causes the server to be dropped.
  • Template variables ${...} are expanded only for plugin-provided MCP servers (for example ${CLAUDE_PLUGIN_ROOT} / ${ZCODE_PLUGIN_ROOT}, ${CLAUDE_PROJECT_DIR}, ${user_config.KEY}). Configuration-file MCP servers do not expand templates — use absolute paths there.
  • The default timeout is 30000 ms.

Canonical examples:

{
  "mcp": {
    "servers": {
      "mysql-local": {
        "type": "stdio",
        "command": "npx",
        "args": ["-y", "@benborla29/mcp-server-mysql"],
        "env": {
          "MYSQL_HOST": "127.0.0.1",
          "MYSQL_PORT": "3306"
        }
      },
      "remote-reader": {
        "type": "http",
        "url": "https://example.com/mcp",
        "headers": {
          "Authorization": "Bearer ..."
        }
      }
    }
  }
}

3. How to inspect status

  • List and status: open Settings → MCP in the client. Each entry shows whether the server is connected, disabled, disconnected, or failed, with any error inline. Plugin-provided servers are marked as built-in. (untrusted is a legacy status that no longer appears for normally configured servers now that every scope auto-connects.)
  • After edits: restart the affected session, or restart ZCode if the Settings page still shows stale data, then reopen Settings → MCP to confirm the server status.
  • Standard-I/O error output (the root cause of most failures): a stdio server's captured error stream is written to the ZCode log. To see the full output, run the server's command with its arguments directly in a terminal.

4. Common pitfalls (symptom → cause → fix)

  1. Workspace server does not connect — a server defined in <repo>/.zcode/config.json (or <repo>/.agents/mcp.json) is not connecting. Workspace servers now auto-connect like any other scope, so this is no longer a trust gate — the cause is a real config or startup problem. → Check its Settings → MCP status: failed → go to step 4; absent → the config was not loaded (pitfall 5/9) or it is in .agents/mcp.json but shadowed (pitfall 12).
  2. command not found — the server shows failed with an error such as spawn npx ENOENT. The command is not on PATH, or a relative path was not resolved. → Use an absolute path, add cwd when needed, and on Windows point at the .cmd/.exe.
  3. ${...} reaches the process literally — configuration-file MCP servers do not expand templates. → Use concrete absolute paths (templates are a plugin-only feature).
  4. Plugin is missing an environment value or secret — the plugin reports a missing variable. → Set the plugin's configuration value (Plugin Management → the plugin's advanced settings) or export the required environment variable; sensitive values may only be placed in env/headers, not in command/url.
  5. Wrong transport type or unknown key — the server is silently dropped. → Make type match the fields, remove any extra top-level keys (the schema is strict), and ensure exactly one of command (stdio) or url (http/sse) is present.
  6. Unexpected override — editing the workspace mcp.servers entry has no effect. A same-named server in the user configuration is shadowing it (user overrides workspace for MCP). → Edit the user entry, or rename one of the servers.
  7. Connection or tool-listing timeout — failed ... timed out after 30000ms. → Add "timeoutMs": 60000 to that server, and address the slow startup.
  8. Only Connection closed with no cause — the error stream was not surfaced in the status line. → Check the ZCode log for the captured error output, or run the command with its arguments in a terminal.
  9. JSON syntax error in the configuration file — MCP servers (and possibly the whole file) go missing. → Validate the JSON, then fix the syntax.
  10. Server shows as disabled — enabled: false (or legacy enable: false). → Set "enabled": true or remove the field.
  11. A desktop-managed server list overrides the file — edits to configuration files have no effect because the client is supplying the MCP list. → Manage MCP through Settings → MCP in that context.
  12. .agents/mcp.json edits have no effect, or use the wrong key — a server added to .agents/mcp.json never appears. Either the same scope's .zcode already defines MCP servers (so .agents/mcp.json is ignored entirely for that scope), or the servers were placed under mcp.servers instead of the top-level mcpServers that .agents/mcp.json expects. → Move the definition into the .zcode file for that scope, or ensure that scope's .zcode has no MCP servers and use the top-level mcpServers key in .agents/mcp.json.
  13. Server name appears in logs but no MCP tools appear in the model request — the desktop app read the server entry and passed its name to the runtime, but the server failed during startup, so toolCount and registeredToolCount are zero. A common cause is a legacy environment field in ~/.zcode/cli/config.json: CLI direct config parsing can migrate it, but the desktop app-managed path currently expects env when converting to protocol mcpServers. → Rename environment to env, keep the values unchanged, restart ZCode, and reopen Settings → MCP.
  14. Settings → MCP crashes after JSON editing with command.trim is not a function — the saved server has a non-string command, usually OpenCode-style command: ["npx", "-y", "server"]. → Edit ~/.zcode/cli/config.json manually: set "command": "npx" and move the rest into "args": ["-y", "server"], then restart the app.

5. Localization workflow (in order; stop when the cause is found)

  1. Confirm MCP is enabled (it is by default).
  2. Open Settings → MCP and read the status: disabled → pitfall 10; failed (<error>) → read the inline error and go to step 4; not listed at all → step 3. (untrusted should no longer appear for a normally configured server.)
  3. Verify the configuration is loaded and valid: check the JSON validity of ~/.zcode/cli/config.json and <repo>/.zcode/config.json (and zcode.json) — pitfall 9. A server that is in the file but not listed failed schema validation (pitfall 5 — look for unknown keys, wrong type, or a missing command/url); a server defined only in .agents/mcp.json but not appearing points to the fallback shadowing or wrong-key issue (pitfall 12).
  4. Diagnose a failed server: ENOENT → pitfall 2; timed out → pitfall 7; Connection closed → pitfall 8; an http/sse network error → check proxy/CA, URL reachability, and headers.
  5. If Settings → MCP or service logs show mcpServerCount / server names but the model request has no mcp__... tools, check startup logs for mcp.startup.completed and mcp.tools.registered. If toolCount=0 with failed statuses, inspect the config field names first (env vs environment, string command vs array command) before treating it as a model-selection issue.
  6. If edits have no effect → pitfall 6 (user overrides workspace) or pitfall 11 (desktop-managed list).
  7. If a ${...} appears literally → pitfall 3 (configuration files do not expand templates) or pitfall 4 (an unset plugin variable).
  8. Apply the concrete fix — most commonly editing ~/.zcode/cli/config.json at mcp.servers.<name> (command / args / cwd / env / headers / timeoutMs / enabled) — then restart the session (every scope auto-connects) and reopen Settings → MCP to confirm.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

3d-object

無料概要あり

立体物をthree.jsで作成し、あらゆる角度から確認できるビューアーに表示します。OBJ + MTLやGLBで保存し、他の3D制作ソフトへ持ち込めます。

  • 立体物を作って全方向から確認したいとき
  • Blenderで編集するモデルの作成
  • シルエットや素材の見え方の確認
asgeirtj/system_prompts_leaks7万2026年10月24日 更新

action-items

無料概要あり

個人用のタスク一覧に、やることや期限、返答待ち、作業が止まる理由を記録します。進捗や依存関係を更新し、重複や完了済みの項目も整理するスキルです。

  • 期限付きのタスクや約束の記録
  • 返答待ちや作業が止まる理由の整理
  • 前提タスク完了後の依存関係の更新
asgeirtj/system_prompts_leaks7万2026年10月24日 更新

agents

無料概要あり

作業の目標と完了条件を整理し、必要に応じて複数のエージェントへ分担します。進捗報告、成果の検証、PRのマージまで、プロジェクトとして進行を管理します。

  • 独立した作業を並行して進めたいとき
  • 進行中の各作業の状況確認
  • 中断したプロジェクトの再開
asgeirtj/system_prompts_leaks7万2026年10月24日 更新

animated-video

無料概要あり

再生・一時停止や時間位置の指定ができるアニメーションをHTMLページとして制作します。場面の長さや速度を調整し、横長・縦長の動画書き出しに備えます。

  • 製品の操作紹介を動画にしたいとき
  • 文字と図形で内容を説明したいとき
  • 縦長のアニメーション制作
asgeirtj/system_prompts_leaks7万2026年10月24日 更新

apple_healthkit

無料概要あり

Apple Healthに同期された歩数や心拍数、睡眠、ワークアウトの記録を期間別に確認し、日々の変化や同期状況、データの欠けを調べます。

  • 歩数や心拍数の推移を確認したいとき
  • 睡眠段階や時間、中途覚醒の確認
  • 運動時間・距離・消費カロリーの振り返り
asgeirtj/system_prompts_leaks7万2026年10月24日 更新

artifact_document

無料概要あり

Word文書やテンプレートの作成・編集、内容の抽出、画像の差し替えに対応し、見出しや箇条書きの構造を整えて、全ページの表示まで確認します。

  • 構造を整えたWord文書の作成
  • 既存文書の内容を整理したいとき
  • 文書内の画像や文章の差し替え
asgeirtj/system_prompts_leaks7万2026年10月24日 更新

asgeirtj のスキルをすべて見る

このスキルの問題を報告する