[{"data":1,"prerenderedAt":281},["ShallowReactive",2],{"content-/mcp-ondemand-confirmation":3,"all-pages-for-dir":260,"related-/mcp-ondemand-confirmation":261,"og-image-/mcp-ondemand-confirmation":280},{"id":4,"title":5,"body":6,"category":242,"concepts":243,"description":244,"extension":245,"meta":246,"navigation":247,"ogImage":243,"path":248,"project_name":243,"published":249,"publishedAt":250,"seo":251,"source":243,"stem":252,"tags":253,"todo":258,"unpublished":249,"updatedAt":243,"__hash__":259},"pages/2026-01/2026-01-07/mcp-ondemand-confirmation.md","MCPサーバーのオンデマンド化が実装済みだった件",{"type":7,"value":8,"toc":235},"minimark",[9,13,17,30,39,42,48,55,58,61,67,141,144,163,166,211,214,217,231],[10,11,5],"h1",{"id":12},"mcpサーバーのオンデマンド化が実装済みだった件",[14,15,16],"h2",{"id":16},"結論",[18,19,20,24,25,29],"p",{},[21,22,23],"code",{},"ENABLE_TOOL_SEARCH=true"," の設定により、MCPサーバーのオンデマンド化は",[26,27,28],"strong",{},"すでに実装済み","だった。",[18,31,32,33,38],{},"以前の記事「",[34,35,37],"a",{"href":36},"/claude-code-context-optimization","Claude Code コンテキスト最適化提案","」では「未実施」としていたが、2025年12月31日時点で設定済みだった。",[14,40,41],{"id":41},"確認のきっかけ",[18,43,44,47],{},[21,45,46],{},"/context"," コマンドの出力を確認したところ、MCP Toolsセクションが表示されていなかった。",[18,49,50],{},[51,52],"img",{"alt":53,"src":54},"/contextコマンドの出力結果","/2026-01/2026-01-07/context-after-tool-search.png",[18,56,57],{},"従来は MCP tools が約19kトークン（9.5%）を消費していたが、現在は0になっている。",[14,59,60],{"id":60},"設定内容",[18,62,63,66],{},[21,64,65],{},"~/.claude/settings.json"," に以下が設定されている：",[68,69,74],"pre",{"className":70,"code":71,"language":72,"meta":73,"style":73},"language-json shiki shiki-themes vitesse-light vitesse-light","{\n  \"env\": {\n    \"ENABLE_TOOL_SEARCH\": \"true\"\n  }\n}\n","json","",[21,75,76,85,105,129,135],{"__ignoreMap":73},[77,78,81],"span",{"class":79,"line":80},"line",1,[77,82,84],{"class":83},"shFtX","{\n",[77,86,88,92,96,99,102],{"class":79,"line":87},2,[77,89,91],{"class":90},"sqvqQ","  \"",[77,93,95],{"class":94},"sz8Xr","env",[77,97,98],{"class":90},"\"",[77,100,101],{"class":83},":",[77,103,104],{"class":83}," {\n",[77,106,108,111,114,116,118,122,126],{"class":79,"line":107},3,[77,109,110],{"class":90},"    \"",[77,112,113],{"class":94},"ENABLE_TOOL_SEARCH",[77,115,98],{"class":90},[77,117,101],{"class":83},[77,119,121],{"class":120},"sMJiu"," \"",[77,123,125],{"class":124},"sdGka","true",[77,127,128],{"class":120},"\"\n",[77,130,132],{"class":79,"line":131},4,[77,133,134],{"class":83},"  }\n",[77,136,138],{"class":79,"line":137},5,[77,139,140],{"class":83},"}\n",[18,142,143],{},"この設定により：",[145,146,147,151,158],"ul",{},[148,149,150],"li",{},"MCPツール定義が事前にコンテキストウィンドウに読み込まれなくなる",[148,152,153,154,157],{},"必要時に ",[21,155,156],{},"MCPSearch"," ツールで動的に検索・呼び出し",[148,159,160,162],{},[21,161,46],{}," で MCP Tools セクションが表示されなくなる",[14,164,165],{"id":165},"効果",[167,168,169,185],"table",{},[170,171,172],"thead",{},[173,174,175,179,182],"tr",{},[176,177,178],"th",{},"項目",[176,180,181],{},"Before",[176,183,184],{},"After",[186,187,188,200],"tbody",{},[173,189,190,194,197],{},[191,192,193],"td",{},"MCP tools",[191,195,196],{},"19.0k tokens (9.5%)",[191,198,199],{},"0",[173,201,202,205,208],{},[191,203,204],{},"Free space",[191,206,207],{},"113k (56.7%)",[191,209,210],{},"126k (62.8%)",[18,212,213],{},"約19kトークン削減され、フリースペースが約13k増加した。",[14,215,216],{"id":216},"関連記事",[145,218,219,224],{},[148,220,221,223],{},[34,222,37],{"href":36}," - 元の提案記事（進捗状況を更新済み）",[148,225,226,230],{},[34,227,229],{"href":228},"/claude-code-tool-search","Claude Code ツール検索ツールの設定"," - 詳細な設定手順",[232,233,234],"style",{},"html pre.shiki code .shFtX, html code.shiki .shFtX{--shiki-default:#999999;--shiki-dark:#999999}html pre.shiki code .sqvqQ, html code.shiki .sqvqQ{--shiki-default:#99841877;--shiki-dark:#99841877}html pre.shiki code .sz8Xr, html code.shiki .sz8Xr{--shiki-default:#998418;--shiki-dark:#998418}html pre.shiki code .sMJiu, html code.shiki .sMJiu{--shiki-default:#B5695977;--shiki-dark:#B5695977}html pre.shiki code .sdGka, html code.shiki .sdGka{--shiki-default:#B56959;--shiki-dark:#B56959}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":73,"searchDepth":87,"depth":87,"links":236},[237,238,239,240,241],{"id":16,"depth":87,"text":16},{"id":41,"depth":87,"text":41},{"id":60,"depth":87,"text":60},{"id":165,"depth":87,"text":165},{"id":216,"depth":87,"text":216},"dev",null,"ENABLE_TOOL_SEARCH=trueの設定でMCPツールがオンデマンド読み込みになり、約19kトークンを削減できていた","md",{},true,"/mcp-ondemand-confirmation",false,"2026-01-07T00:00:00.000Z",{"title":5,"description":244},"2026-01/2026-01-07/mcp-ondemand-confirmation",[254,255,256,257],"claude-code","mcp","optimization","context","memo","QeIdYjdq2OmX7jYsaVymn7q4A2VYYhvDsBiXx8KY_oc",[],[262,264,268,272,276],{"title":37,"path":36,"publishedAt":263},"2025-12-22T00:00:00.000Z",{"title":265,"path":266,"publishedAt":267},"1Password EnvironmentsのMCP連携がWindowsで解禁 — Claude Code / Codexへの設定手順と実機検証","/1password-mcp-windows-claude-codex","2026-07-18T00:00:00.000Z",{"title":269,"path":270,"publishedAt":271},"tool-call-malformed と一日戦って、予防策を /make-diary に焼き込んだ","/tool-call-malformed-subagent-workflow","2026-05-31T00:00:00.000Z",{"title":273,"path":274,"publishedAt":275},"Chrome DevTools MCP の autoConnect で、自分のブラウザセッションをそのままAIに渡せるようになった","/chrome-devtools-mcp-auto-connect","2026-03-31T00:00:00.000Z",{"title":277,"path":278,"publishedAt":279},"Draw.io MCP サーバー調査ログ - 3つの選択肢を比較して現状維持を選んだ話","/drawio-mcp-investigation-2026-02-13","2026-02-13T00:00:00.000Z","https://log.eurekapu.com/og/blog/mcp-ondemand-confirmation.png?v=2026-01-07T00%3A00%3A00.000Z&title=MCP%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC%E3%81%AE%E3%82%AA%E3%83%B3%E3%83%87%E3%83%9E%E3%83%B3%E3%83%89%E5%8C%96%E3%81%8C%E5%AE%9F%E8%A3%85%E6%B8%88%E3%81%BF%E3%81%A0%E3%81%A3%E3%81%9F%E4%BB%B6&author=Kei%20Komatsu&sig=9638941ff8b4783a",1785654980327]