Skip to content

Commit b03e96b

Browse files
Expand MCP explanation: what it is, why JSON-only, why not SOAP
Rewrites the "What is MCP?" section with a 101-level explanation: - Core idea: AI assistants discover tools via JSON catalog, call them with JSON parameters, get JSON results. No XML anywhere. - Why JSON-only: MCP is JSON-RPC 2.0; AI training data, function calling APIs, and tool-use formats are all JSON-native. XML/SOAP was never considered. - What this means for SOAP: MCP can't call SOAP endpoints. Convert to JSON-RPC first (config change, not code change). Consolidates the earlier SOAP disclaimer into this section to avoid repetition. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c63587a commit b03e96b

1 file changed

Lines changed: 29 additions & 12 deletions

File tree

src/site/xdoc/docs/json-rpc-mcp-guide.xml

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,40 @@ deployed services, accessible at <code>/openapi-mcp.json</code>, that tells MCP
4444
the exact JSON-RPC envelope format, auth requirements, and endpoint URL for every
4545
deployed operation — no out-of-band documentation required.</p>
4646

47-
<p><strong>Legacy SOAP services:</strong> MCP is a JSON-RPC 2.0 protocol — it does
48-
not support SOAP. To expose a SOAP service to AI agents via MCP, first convert it
49-
to JSON-RPC by switching message receivers in <code>services.xml</code> and setting
50-
<code>axis2.mode=json</code> (see the
51-
<a href="spring-boot-starter.html#soap_vs_json">Spring Boot Starter Guide</a>).
52-
The service Java class does not change — only the wire format configuration.</p>
53-
5447
<!-- ============================================================ -->
5548
<h2>What is MCP?</h2>
5649

5750
<p><strong>MCP (Model Context Protocol)</strong> is an open standard published at
5851
<code>modelcontextprotocol.io</code> that defines how AI assistants (Claude, ChatGPT,
59-
Cursor, etc.) discover and call external tools. The protocol is JSON-RPC 2.0 over
60-
stdio or HTTP/SSE. An MCP server advertises a catalog of tools — each with a name,
61-
description, and JSON Schema for its parameters — and the AI assistant calls them
62-
by name. MCP is to AI tool use what OpenAPI is to REST API discovery: a
63-
machine-readable contract that eliminates guesswork.</p>
52+
Cursor, etc.) discover and call external tools.</p>
53+
54+
<p><strong>The core idea:</strong> An MCP server advertises a catalog of tools — each
55+
with a name, a natural-language description, and a JSON Schema describing its
56+
parameters. An AI assistant reads this catalog, decides which tool to call based on
57+
the user's request, fills in the parameters as a JSON object, and sends a
58+
<code>tools/call</code> request. The server executes the tool and returns the result
59+
as JSON. The entire exchange is JSON — requests, responses, parameter schemas,
60+
error messages. There is no XML anywhere in the protocol.</p>
61+
62+
<p><strong>Why MCP is JSON-only:</strong> MCP is built on
63+
<a href="https://www.jsonrpc.org/specification">JSON-RPC 2.0</a>, the same
64+
lightweight RPC protocol used by language servers (LSP), cryptocurrency nodes
65+
(Ethereum), and many other modern tools. AI assistants produce and consume JSON
66+
natively — their training data is overwhelmingly JSON, their function-calling APIs
67+
use JSON, and their tool-use formats are JSON Schema. XML/SOAP was never considered
68+
for MCP because the entire AI tooling ecosystem is JSON-native.</p>
69+
70+
<p><strong>What this means for SOAP services:</strong> MCP cannot call SOAP endpoints
71+
directly. A SOAP service returns XML envelopes with namespaces, and MCP clients
72+
cannot parse them. To expose a SOAP service to AI agents, convert it to JSON-RPC
73+
first — this is a configuration change in <code>services.xml</code> (swap message
74+
receivers), not a code change. The service Java class is unchanged. See the
75+
<a href="spring-boot-starter.html#soap_vs_json">Spring Boot Starter Guide</a>
76+
for the <code>axis2.mode=json</code> setting.</p>
77+
78+
<p>MCP is to AI tool use what OpenAPI is to REST API discovery: a machine-readable
79+
contract that eliminates guesswork. The protocol specification is at
80+
<code>modelcontextprotocol.io</code>.</p>
6481

6582
<h2>Axis2: Three Protocols from One Service</h2>
6683

0 commit comments

Comments
 (0)