Add mcp-server module: order-lookup service exposed via @McpTool/@McpResource/@McpPrompt over Streamable HTTP

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FtpJvZfg4nvLvtzgJTDWpB
This commit is contained in:
Claude
2026-09-23 11:56:37 +00:00
parent c1fc41e0de
commit 9919da58a7
21 changed files with 704 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Regenerates every reproducible file under output/. Run from the module root
# (spring-ai/mcp-server). Needs Maven with the dependencies already resolved once online.
#
# output/06-*.txt is NOT regenerated here -- it was captured manually against a standalone run
# with spring.ai.mcp.server.protocol commented out in application.yml. See its own header.
set -eu
cd "$(dirname "$0")/.."
mvn -q -o test
echo
echo "Regenerated output/01 through 05 -- real JSON-RPC exchanges captured by"
echo "OrderMcpTranscriptTest against the real running Streamable HTTP endpoint."
echo "output/06-protocol-property-unset-404.txt was captured manually -- see its header."
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Starts the application, killing any previous instance first.
#
# Usage:
# ./scripts/run.sh
#
# Then, in another shell (or point MCP Inspector / Claude Desktop at the same URL):
# curl -X POST http://localhost:8080/mcp \
# -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
# -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'
set -eu
cd "$(dirname "$0")/.."
for p in $(ps -eo pid,cmd | grep '[M]cpServerApplication' | awk '{print $1}'); do
kill -9 "$p"
done
mvn -q -o org.springframework.boot:spring-boot-maven-plugin:run