0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MCP Java SDKのMCPサーバサンプルを動かす

0
Posted at

概要

v2.2.0-M1 のプレリリース版でModernサーバが部分的に実装されているので、MCP Java SDKのMCPサーバサンプルを動かす。

MCPサーバの立ち上げ

このREADMEに沿って進めればいい。

以下のコマンドを実行。

mvnw clean install -DskipTests
mvnw exec:java -pl conformance-tests/server-servlet-modern

MCP Inspectorで接続(v2)

以下でMCP Inspectorを起動

npx @modelcontextprotocol/inspector

MCP Inspectorの設定

以下の設定にする。
Server ID: 自由
Transport Type: Streamable HTTP
URL: http://localhost:8081/mcp
image.png

Protocol Era

Server Setting の Protocol Era で Modern を選択。
今回のサンプルはDual-eraサーバではないみたい。
image.png

接続(Modern)

バージョンは2026-07-28
image.png

SERVER/DISCOVERから接続が始まっている。
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?