A step-by-step guide to building an MCP (Model Context Protocol) server with Spring AI and connecting it to Claude Desktop. Covers creating a basic hello-world tool, testing it with MCP Inspector, configuring Claude Desktop via mcp-remote as a stdio-to-HTTP bridge, and then embedding an interactive HTML fortune wheel UI directly inside the chat using @McpTool and @McpResource annotations with Content Security Policy metadata.
Table of contents
1. Overview2. Creating an MCP Server3. Testing the MCP Server4. Embedding HTML5. Conclusion3.2K Impressions