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 and concepts for readable asynchronous code and clear compile-time errors
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. A sync mode, with plain-function handlers and blocking calls, is also available for simple programs and rapid prototyping
Protocol revision 2026-07-28: Sessionless requests,
server/discover, cache hints, multi round-trip requests andsubscriptions/listen, with the older revisions served on the same transportsBroad 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
Optional extensions: MCP Apps, Skills, OAuth client credentials and enterprise-managed authorization, each off until the application opts in (Extensions)
Quick Links
Getting Started - Installation and quick start guide
Async Servers and Clients - Servers and clients with coroutines on an event loop
API Reference - Complete API reference
Examples - Example programs and code snippets
Protocol Revisions - How protocol revision 2026-07-28 works in the SDK
Specification Support - Which parts of the specification the SDK implements
Architecture - Design overview and architectural decisions
Getting Started
Core Documentation
Project Info