hiragramhiragram

MCPツールの棚卸しをする

2025-09-30


Claude Codeには /context というコマンドが用意されていて、現在のセッションにおけるコンテキストの使用状況を確認することができる。

$ claude して、何も発言していない状態で叩いた結果がこれ。

なにかを言う前にすでに半分以上コンテキストを消費していることがわかる。

このプロジェクトではMCPツールを .mcp.json に書いてコミットしている。いわゆるプロジェクトスコープというやつ。

{
  "mcpServers": {
    "ios-simulator": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "ios-simulator-mcp"
      ],
      "env": {}
    },
    "XcodeBuildMCP": {
      "command": "npx",
      "args": [
        "-y",
        "xcodebuildmcp@latest"
      ]
    },
    "github-as-app": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "github-as-app@latest"
      ],
      "env": {}
    },
    "supabase": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@supabase/mcp-server-supabase@latest",
        "--project-ref=xxxxxxxxxxxxxxxxxxxx"
      ],
      "env": {}
    },
    "xcodeproj": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "/Users/hiragram/Development/voicecall:/workspace",
        "ghcr.io/giginet/xcodeproj-mcp-server",
        "/workspace"
      ],
      "env": {}
    }
  }
}

github-as-app 以外はだいたい代替手段があって一旦なくしても良いかなって感じがするので消してみる。

{
  "mcpServers": {
    "github-as-app": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "github-as-app@latest"
      ],
      "env": {}
    }
  }
}

改めて新しいセッションで /context を叩くと

だいぶスッキリした。これでコンテキストの空きが増えて、体感する性能の変化があるかどうかは色々触ってみて確認する。

MCP流行りの初期に色々入れたものが残ったままになってる人は多い気がするので一度棚卸ししてみるとよさそう。

このエントリーをはてなブックマークに追加

Post