Home›MCP / Tooling›『考える過程』を記録するMCPサーバーに、存在しない思考番号を投げたらそのまま通った

『考える過程』を記録するMCPサーバーに、存在しない思考番号を投げたらそのまま通ったA hands-on investigation found that the sequential-thinking MCP server accepts…

元記事を読むRead original articlezenn.dev(新しいタブで開きます)(opens in a new tab)
AI 要約AI summary

sequential-thinkingのMCPサーバーに範囲外の思考番号を送信しても正常扱いされることを実際に確認した記事で、入力バリデーションの欠如が引き起こすリスクを示している。

A hands-on investigation found that the sequential-thinking MCP server accepts out-of-range thought numbers without error, highlighting a lack of input validation that could silently corrupt reasoning traces.

AI 生成の要約と解説(解説は要約と収集メタデータに基づく)で、元記事全文の転載・翻訳ではありません。日本語版と英語版は言語ごとに独立して生成しています。正確性は元記事 (zenn.dev) でご確認ください。AI-generated summary and explainer (the latter based on the summaries and collected metadata), not a copy or translation of the full source article. Generated independently for each language. Verify accuracy at the original source (zenn.dev).

AIが問題を解く際の「考える過程」を段階的に記録するMCPサーバー「sequential-thinking」で、実在しない思考番号を渡してもそのままエラーなく受理されることが、実地の検証で確認された。入力値の検証(バリデーション)が欠けていることを示す事例で、推論の記録を気づかぬうちに壊してしまう可能性がある。

MCP(Model Context Protocol)は、AIモデルと外部のツールやデータを接続するためにAnthropicが公開した規格で、対応するサーバーを介して機能を拡張できる。sequential-thinkingはその公式リファレンス実装の一つで、複雑な課題を複数の思考ステップに分解し、必要に応じて過去の思考を修正したり枝分かれさせたりする「連続的思考」を支援するものだ。

このサーバーは、現在の通し番号を示すthoughtNumberや、想定される総数のtotalThoughts、見直し対象を指すrevisesThoughtといったパラメータを受け取る。今回の検証では、これらに範囲外の数値や存在しないステップを指す値を送っても、警告や拒否が返らず、正常な入力として処理されたという。本来なら整合性をチェックし、不正な参照を弾くことが期待される場面だ。

問題は、誤った番号がそのまま記録に残ることで、後から思考の流れをたどったときに実際の順序や依存関係と食い違う恐れがある点にある。AIの推論を可視化・監査する用途では、こうしたトレースの信頼性が前提となるため、静かに混入した不整合は発見が難しいと見られる。悪意ある入力による意図的な撹乱に悪用される可能性も、完全には否定できない。

背景として、MCPはここ数年で急速に注目を集め、OpenAIやGoogleなど複数の主要企業も対応の姿勢を示すなど、事実上の共通規格になりつつある。一方でリファレンス実装は簡潔さや動作の分かりやすさを優先している面もあり、堅牢な入力検証まで踏み込んでいないケースがある。利用者側でも、外部サーバーの応答を無条件に信頼せず、番号の連続性などを自前で確認する姿勢が求められそうだ。

The Model Context Protocol (MCP) has quickly become a common way to connect large language models to external tools, and among the reference servers distributed with it is one called sequential-thinking, designed to record a model's step-by-step reasoning. A recent hands-on investigation published on Zenn found that this server accepts "thought numbers" that fall outside any valid range without raising an error. The finding points to missing input validation and, the author argues, could quietly distort the reasoning traces the tool is meant to preserve.

MCP is an open standard, introduced by Anthropic in late 2024, that defines how AI applications expose and consume tools, resources, and prompts, typically over JSON-RPC. Its appeal is standardization: instead of writing bespoke integrations for each model and each client, developers can publish an MCP server once and have it work across compatible hosts. The ecosystem has grown to include reference servers for filesystems, GitHub, databases, and more, and sequential-thinking is one of the examples meant to showcase a specific pattern rather than serve as production infrastructure.

The sequential-thinking server lets a model externalize its chain of thought into discrete, numbered steps. Its tool accepts fields such as the thought text itself, a nextThoughtNeeded flag, a thoughtNumber, a totalThoughts estimate, and revision-oriented parameters like isRevision, revisesThought, branchFromThought, and branchId. The intent is to support reflective reasoning, where the model can revisit an earlier step, branch into alternatives, or extend the sequence as a problem becomes clearer. In principle, the numbering ties these steps together into a coherent, auditable trace.

According to the report, the author submitted a thoughtNumber that does not correspond to any existing step, effectively an out-of-range or non-existent value, and the server processed it as a normal request and returned a success response. In other words, there appears to be no check that the supplied number is consistent with the sequence built so far. Any integer is treated as acceptable, regardless of whether it references a step that exists or maintains sensible ordering.

The technical root of this behavior lies in the difference between syntactic and semantic validation. MCP tools declare a JSON Schema for their inputs, which can enforce that a value is, say, an integer or above a minimum. That kind of check catches type errors, but it does not verify meaning: that a referenced thought actually exists, that numbering is monotonic, or that a revision points to a real prior step. Those constraints require additional server-side logic, and the sequential-thinking implementation appears not to perform them. As a result, a syntactically valid but semantically nonsensical value passes straight through.

Why this matters depends on how the output is used. The tool's value proposition is producing a structured record of reasoning, so if the numbers can be arbitrary, downstream consumers, including logs, audits, or other tools that read the trace, may misinterpret order, encounter gaps, or follow references that lead nowhere. Because the server accepts the input silently, there is no signal that anything is wrong. It is worth stressing that this is likely a data-integrity and reliability concern rather than a direct security vulnerability, though absent input validation is a well-known root cause of broader problems when inputs come from autonomous or adversarial sources.

That broader point is a recurring theme in MCP security discussions. Since servers act on behalf of agents that may generate inputs without human review, malformed or crafted values can propagate through a system. Several analyses have observed that many community-built MCP servers rely on minimal schema checks and little else. Recommended practice would be to validate ranges, cross-reference identifiers, reject inconsistent sequences, and return descriptive errors so that callers can correct course. Validation libraries such as Zod, or richer JSON Schema constraints, are commonly used to enforce these rules.

The finding is a useful reminder that reference implementations tend to prioritize demonstrating a capability over hardening it for real workloads, and teams building on them should add their own guardrails. The observed behavior may reflect deliberate simplicity rather than a discrete defect, and the practical impact will vary with how strictly downstream systems depend on the numbering. Either way, the episode illustrates how the reliability of agentic tooling often hinges less on the model and more on unglamorous details like checking that an input makes sense.

ポコとTECHガイドPoko & TECH Guide

ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.

  1. ポコPoko存在しない思考番号を「修正する」って送っても、エラーにならなかったの?なんで通っちゃうんだろう?They sent a thought number that doesn't exist, said "revise this," and it just went through? Why does that even pass?
  2. TECHガイドTECH Guideこの記事だと、まだ送っていない番号への「修正」や「分岐」もそのまま受理されたそうです。言われたことを記録するだけの作りだったということですね。That's what the article found: revisions and branches pointing at thoughts never sent were accepted as-is. It seems to just record whatever it's told.
  3. ポコPokoじゃあ、これって使う人にはどう関係するの?AIが考えた記録がおかしくなるかもってこと?So how does that matter to people using it? Could the record of the AI's thinking end up wrong?
  4. TECHガイドTECH Guide英語の要約では、入力チェックがないせいで思考の記録が気づかないうちにずれるおそれがある、と指摘されています。ただ、実際に壊れた例まで示されているかは本文から分かりません。The summary flags the missing input checks as a risk of quietly corrupting the reasoning trace. But the text doesn't show an actual case of it breaking.
  5. ポコPokoなるほど。「修正できる」「分岐できる」って聞くと、中身も筋が通ってるか見てそうだけど、実際は言われた通りに記録するだけなんだね。I see. "Revise" and "branch" sound like it checks that things make sense, but it really just writes down what it's told.
  6. TECHガイドTECH Guideそうですね。ただ今回は自作プログラムから直接送って応答を見た確認なので、AI経由で使ったときの影響までは、この記事では分かりません。Right. But this was tested by sending requests directly from a small custom program, so the article doesn't tell us how it plays out when used through an AI.
記事情報・収集記録Article details & collection record
出典Source
Zenn MCPコミュニティCommunity
公開日時 (JST)Published (JST)
収集日時 (JST)Collected (JST)
配信形式Format
ブログBlog
原文言語Source language
日本語Japanese
重要度の位置づけImportance in this lane
MediumMedium priority(MCP / Tooling 126件中、同等以上 120件)(120 of 126 MCP / Tooling entries are equal or higher)
出典の平均重要度(掲載直近 30 件・最大 30 件)Source average (last 30 listed, up to 30)
2.0 / 31=情報 · 2=中 · 3=高1=Info · 2=Medium · 3=High
情報の寿命Half-life
中期 (チュートリアル)Medium-term (tutorial)

🔗MCP / Tooling の他の記事More from MCP / Toolingもっと見る →View more →

ページ上部へScroll to top