liveBook · Manning

Mcp client

As explained in AI Agents and Applications

An MCP client is a software component that connects to MCP servers and accesses the tools they expose.

An MCP client is the component through which an agent or application connects to MCP servers, discovers their tools, and invokes them as part of an existing tool-calling workflow. It moves service-integration work from each agent to the service exposing the MCP server. section 13.0 section 13.1.2

A client connection typically provides:

  • Access to one or more MCP servers and the tools each server exposes. section 13.1.2
  • A consistent interface for remote servers over Streamable HTTP and local servers over STDIO. section 13.1.2
  • Tool integration that can remain compatible with an agent's existing local-tool calling logic. section 13.1.2

Replacing a mock weather tool

A travel agent can remove its local weather tool and WeatherForecastService, then connect through an MCP client to an AccuWeather MCP server. The agent retrieves the server's weather tool dynamically and uses live weather data instead of the mock response. section 13.4.1

async def get_accuweather_tools():  #1
    mcp_client = MultiServerMCPClient({  #2
        "accuweather": { #3
            "url": "http://127.0.0.1:8020/accu-mcp-server",
            "transport": "streamable_http"
        }
    })
    return await mcp_client.get_tools()  #4

The implementation configures MultiServerMCPClient with an AccuWeather URL and Streamable HTTP, then asynchronously retrieves the exposed tools. section 13.4.2

How AI Agents and Applications covers it

How deep it goes
Explains architecture, transports, replacement steps, and asynchronous configuration, but does not detail the protocol internals.
Examples
Uses a travel agent, an AccuWeather server, live weather retrieval, and a Penzance weather query.
What it assumes
Assumes an agent or application with tool-calling logic and familiarity with MCP servers as tool providers.
What you can do after
Builds an MCP connection that retrieves remote tools and supplies them to an agent.
How it connects
Connects MCP servers, AI agents, tool calling, remote services, local tools, Streamable HTTP, and STDIO.

Also explained in

Compare how 8 books explain mcp client →

Related concepts

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