中文文档:README_zh.md
C++17 implementation of the Model Context Protocol (MCP): static client and server libraries for MCP-based AI tooling integrations.
Status: 0.3.13 (mcp::kSdkVersion), five protocol versions in two eras, 124 conformance tests. Windows (MSVC, clang-cl), Linux (GCC, Clang), macOS (Clang).
- CMake 3.28+ with the Ninja generator; a C++17 compiler (MSVC, Clang, GCC).
- OpenSSL optional:
MCP_WITH_OPENSSL=AUTO|ON|OFF(defaultAUTO). TLS needs it; OAuth PKCE does not (built-in SHA-256 fallback). Supports 3.x/4.x.
cmake --preset debug
cmake --build --preset debug
ctest --preset debug --output-on-failurePresets: debug, release. Examples need -DMCP_BUILD_EXAMPLES=ON; the conformance fixture needs -DMCP_BUILD_CONFORMANCE=ON.
Full manual: https://jesspig.github.io/modelcontextprotocol-cpp-sdk/. Sources: docs/zh (Chinese original), mirrored in English at docs/en.
- Quick start — a working server and client in five minutes.
- Installation & CMake integration — dependencies, build options,
find_package, install layout. - Architecture · Protocol versions · Extensions
- Register a tool · Connect to a server · Handle errors
- API reference · Compatibility & deprecation registry · Release notes
- Chinese manual: docs/zh/. Runnable examples: examples/.
MIT — LICENSE.