HomeMCP / ToolingMCP 2026-07-28対応のMCPサーバーをTypeScript SDK v2で作ってみた(実装編)
MCP 2026-07-28対応のMCPサーバーをTypeScript SDK v2で作ってみた(実装編)

MCP 2026-07-28対応のMCPサーバーをTypeScript SDK v2で作ってみた(実装編)This article walks through building a working MCP server compliant with the…

AI要点サマリSummary highlight

MCP 2026-07-28仕様に準拠したMCPサーバーをTypeScript SDK v2で実際に構築する手順を解説しており、前回の仕様整理編に続く実装編として具体的なコード例を提供している。

This article walks through building a working MCP server compliant with the 2026-07-28 spec using TypeScript SDK v2, serving as the hands-on implementation follow-up to a prior spec-overview post.

要約と収集メタデータをもとに生成した AI 解説本文です。元記事全文の転載・翻訳ではありません。This AI explainer is generated from the summaries and collected metadata, not from a reproduction or translation of the full source article.

MCP(Model Context Protocol)の2026-07-28版仕様に準拠したサーバーを、TypeScript向けSDKのv2を用いて実際に構築する手順を解説する技術記事が公開された。仕様の読み解きにとどまらず、動作するコードへ落とし込む「実装編」という位置づけが特徴だ。

記事は前後編の後半にあたる。前編ではMCP 2026-07-28で加わった仕様変更が整理されており、本編ではその内容を踏まえて、TypeScript SDK v2を使って実際に動くMCPサーバーを1本作り上げる流れが、具体的なコード例とともに示されるという。仕様の理解と手を動かす実装を分けて提示する構成は、初めて触れる読者にとって段階的に追いやすい。

MCPは、大規模言語モデルと外部のツールやデータソースを橋渡しするためのオープンな接続規格として知られ、対応クライアントから見て統一的な方法でサーバー側の機能を呼び出せる点に価値がある。仕様はバージョンを重ねながら更新されており、今回の2026-07-28版のように日付ベースで区切られた版が示すのは、その時点での取り決めに沿う実装が求められるということだ。SDKがv2へと進んだ背景にも、こうした仕様の進展が関係している可能性がある。

実装言語にTypeScriptを選ぶ利点としては、型情報によって仕様上の構造を明示しやすく、クライアントとのやり取りで生じがちな不整合を早い段階で検出しやすい点が挙げられる。MCPには複数言語のSDKが存在するとされ、TypeScript版はWebやNode.js系のエコシステムと親和性が高いと見られる。

一方で本記事はあくまで一つの実装例であり、仕様の全機能を網羅するものとは限らない。実際に運用へ載せる際は、公開されている最新の仕様書や公式SDKのドキュメントと照らし合わせ、バージョン間の差異や非互換の有無を確認する姿勢が求められそうだ。日付版の仕様が今後も更新されていくのであれば、追随のコストをどう抑えるかも継続的な検討課題になるだろう。

The Model Context Protocol (MCP) continues to move quickly, and a new post on Qiita documents the hands-on process of building a working MCP server that conforms to the MCP 2026-07-28 specification using the TypeScript SDK v2. For developers connecting large language models to external tools and data, tracking the latest spec revision alongside the matching SDK release matters, because interoperability between a client and a server depends on both sides implementing the same protocol version.

The article is explicitly framed as an implementation installment (実装編) that follows an earlier post summarizing the changes introduced in the 2026-07-28 revision. Where the first piece organized what changed at the specification level, this second part turns to practice, walking through the construction of a single runnable server with concrete code examples. That structure — a spec overview followed by a build-along guide — is a common and practical way to absorb a protocol update, since reading a specification and actually wiring up a server exercise different kinds of understanding.

For readers unfamiliar with the ecosystem, MCP is an open protocol, originally introduced by Anthropic in late 2024, that standardizes how AI applications supply and consume context. Instead of every application building bespoke, one-off integrations, MCP defines a client-server architecture in which a host application — such as an AI assistant or an editor extension — communicates with one or more MCP servers that expose capabilities. The primitives a server commonly provides are tools (functions the model can invoke), resources (data the model can read), and prompts (reusable message templates). Under the hood, messages are exchanged using JSON-RPC.

The TypeScript SDK is one of several official language SDKs, alongside implementations for Python and other languages, that handle the protocol's message plumbing so developers do not have to manage the low-level exchange by hand. A jump to a v2 major version typically signals a restructured API surface or breaking changes relative to earlier releases, which is one reason a guide written specifically against v2 is useful: code samples and setup steps from older tutorials may no longer apply cleanly. Readers migrating an existing server would likely need to review the SDK's changes and the spec's changes together.

MCP specifications are identified by date-based labels, and the 2026-07-28 string denotes a particular revision of the standard. This versioning approach lets clients and servers negotiate a shared protocol version during the initial handshake, and it makes the compatibility target explicit. Building against a named revision, as the article does, is a way to ensure that the server advertises and honors the behavior expected by clients targeting that same version.

Although the post's specific code is not summarized in detail, a typical MCP server build in TypeScript involves initializing the server object, declaring its capabilities, registering handlers for tools or resources, and connecting it to a transport. Servers generally communicate over stdio when run as a local subprocess, or over a streamable HTTP transport for remote or networked deployments. The choice of transport, along with correct capability declaration, tends to be where implementation details matter most for real-world compatibility.

The broader context is an increasingly crowded field of MCP tooling. Since the protocol's release, a range of clients — including AI assistants, code editors, and desktop applications — have added MCP support, and public registries and directories of community servers have grown. That momentum makes conformance to the current spec and SDK meaningful, because a server that adheres to the published revision is more likely to work across the expanding set

  • 出典SourceQiita MCPコミュニティCommunity
  • 直近30件の平均重要度Avg importance, last 301=Info · 2=Medium · 3=High
  • 配信形式FormatブログBlog
  • 重要度Importance重要度 MediumMedium priority(MCP / Tooling 116件中、同等以上 116件)(116 of 116 MCP / Tooling entries are equal or higher)
  • 情報の寿命Half-life📘 中期 (チュートリアル)Medium-term (tutorial)
  • 原文言語Source languageJA
  • 収集日時Collected2026/08/02 06:41

本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (qiita.com) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (qiita.com).

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