Claude Code で動く MCP が Cursor で動かない原因は「ツール数」だった Claude Code で動く MCP が Cursor で動かない原因は「ツール数」だった
- Claude Code では完璧なのに、Cursor だと壊れる 自作の MCP サーバーを Claude Code に入れて、快適に使っていた。
- ところが同じサーバーを Cursor に入れた途端、挙動がおかしくなる。
- ツールを呼んでくれな
Claude Code 向けに構築した自作 MCP サーバーを Cursor に接続したところ、ツールが呼ばれない・挙動がおかしくなるといった問題が発生した。調査の結果、原因は MCP サーバーが公開するツールの数にあることが判明。Cursor 側にはツール数の上限または処理上の制約があり、一定数を超えると正常に機能しなくなるとみられる。
対策として著者はツールを統合・削減する方針を採用し、3 つのツールにまとめることで Cursor でも安定動作させることに成功した。同じ MCP サーバーがクライアントによって異なる挙動を示すケースは珍しくなく、ツール数・スキーマの複雑さ・クライアント実装の差異が複合的に影響する点に注意が必要だ。詳細な数値や具体的な閾値は元記事で確認することを推奨する。
A developer running a custom MCP server in Claude Code found that the same server behaved erratically when connected to Cursor — tools were ignored or not invoked as expected. After investigation, the root cause was identified as the number of tools the MCP server exposed. Cursor appears to have a limit or practical constraint on how many tools it can handle reliably, causing failures beyond a certain count.
The fix involved consolidating the server's tools down to three, after which Cursor operated stably. This highlights an important compatibility consideration for MCP server authors: different AI clients implement the MCP spec with varying constraints, and tool count is one axis that can silently break integrations. Developers targeting multiple clients should test tool-count limits per client. Specific thresholds and implementation details should be verified in the original Zenn article.
本ページの本文・要約は AI による自動生成です。正確性は元記事 (zenn.dev) をご確認ください。