mcp-cpp-sdk

A modern C++20 Model Context Protocol SDK.

The mcp-cpp-sdk provides a compiled, coroutine-based implementation of the Model Context Protocol (MCP), enabling seamless integration between AI models and context providers. Built on Boost.Asio for async I/O and using modern C++20 features, this SDK offers a clean, type-safe API for building MCP servers and clients.

Features

  • Modern C++20: Leverages coroutines, concepts, and ranges

  • Flexible transports: stdio, WebSocket, Streamable HTTP, and custom transport support

  • Type-safe: Strong typing with JSON serialization via nlohmann_json

  • Async-first: Built on Boost.Asio for high-performance I/O

  • Broad MCP surface: Tools, resources, prompts, sampling, roots, progress, and notifications

  • Conformance tested: The official MCP suites run in CI, with known gaps listed

  • Authentication building blocks: Experimental OAuth helpers and HTTP bearer validation

Indices and tables