Module server

Source
Expand description

§MCP Server

This module provides the server-side implementation of the Model Context Protocol (MCP). It allows creating MCP servers that expose tools for clients to discover and invoke.

The core components include:

  • The Server for managing server lifetime
  • The ServerProtocolBuilder for configuring servers
  • Client connection tracking

Servers expose tools that can be discovered and called by clients, with customizable capabilities and metadata.

Structs§

ClientConnection
Represents a connected MCP client.
Server
The main MCP server type.
ServerProtocolBuilder
Builder for creating configured server protocols.