liveBook · Manning

MCP

As explained in Spring AI in Action

The Model Context Protocol is an open protocol for connecting AI applications with external tools and sources of contextual information.

Model Context Protocol (MCP) is an open specification for collecting associated tools, prompts, and resources into reusable modules that AI applications can share. It connects applications to external capabilities such as databases, filesystems, and APIs. section 7.0 section 7.6

MCP divides the integration into two cooperating components:

  • An MCP Server accesses a resource and exposes it through one or more tools. section 7.1
  • An MCP Client runs inside an AI application, retrieves the server’s tools, places them in prompt context, and invokes them for the LLM. section 7.1
  • Servers can communicate through STDIO, HTTP with Server-Sent Events, or Streamable HTTP, although Spring AI 1.0.0 supports only STDIO and HTTP+SSE. section 7.1
Figure 7.1 Interactions between MCP Servers and MCP Clients
figure

Use the interaction diagram to trace how an MCP Client discovers and invokes tools exposed by an MCP Server. section 7.1

How Spring AI in Action covers it

How deep it goes
Defines servers, clients, tool invocation, and transports, while deferring Streamable HTTP support in Spring AI 1.0.0.
Examples
Uses integrations such as PostgreSQL, GitHub, Google Maps, and Claude Desktop configurations.
What you can do after
Apply MCP via Spring AI to reuse external tools in AI applications and extend LLM functionality.
How it connects
Links LLMs, tools, prompts, resources, databases, filesystems, APIs, and Spring AI.

Also explained in

Compare how 14 books explain MCP →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring AI in Action. The section links point to the parts of the book it draws on.