About Cpp SDK
Cpp SDK is an MCP server published by pooriayousefi in the AI category: c++ SDK for the Model Context Protocol.
The repository has 4 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.
Install
git clone https://github.com/pooriayousefi/cpp-sdkThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Cpp SDK
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
C++ MCP SDK
A modern, header-only C++ implementation of the Model Context Protocol (MCP).
Note: This SDK is currently in early development. It aims to become the official C++ SDK for MCP through community collaboration.
What is MCP?
The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you're building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.
Why C++ MCP SDK?
- 🚀 Performance: Native C++ performance for latency-critical applications
- 🎮 Native Integration: Perfect for game engines, CAD software, scientific computing
- 🔧 System-Level Control: Fine-grained control over memory, threading, and I/O
- 📦 Header-Only: Minimal dependencies, easy integration
- 🌐 Cross-Platform: Works on Linux, macOS, Windows, and embedded systems
- ⚡ Modern C++23: Leverages coroutines, ranges, and modules
Features
Current Status (v0.1.0-alpha)
- Project structure and build system
- Core utilities (async ops, RAII wrappers, string formatting)
- Pythonic naming conventions
- MCP Protocol Types (JSON-RPC 2.0)
- Transport Layer (stdio, HTTP/SSE)
- Client Implementation
- Server Implementation
- Resource Management
- Tool/Prompt Support
Planned Features
- WebSocket transport
- Sampling support
- Comprehensive examples
- Full test coverage
- Documentation site
Quick Start
Prerequisites
- Compiler: GCC 13+, Clang 16+, or MSVC 19.34+ (C++23 support)
- Platform: Linux, macOS, or Windows
- Dependencies: See DEPENDENCIES.md
Installation
# Clone the repository
git clone https://github.com/pooriayousefi/cpp-sdk.git
cd cpp-sdk
# Initialize dependencies (git submodules)
git submodule update --init --recursive
# Build the project
g++ -std=c++23 builder.cpp -o builder
./builder --release --executable
Basic Usage (Coming Soon)
#include <pooriayousefi/mcp/server.hpp>
#include <pooriayousefi/mcp/transport/stdio.hpp>
using namespace pooriayousefi::mcp;
int main() {
// Create MCP server
auto server = Server::builder()
.name("my-cpp-server")
.version("1.0.0")
.build();
// Add a tool
server.add_tool("greet", [](const json& args) {
return json{{"message", "Hello, " + args["name"].get<std::string>()}};
});
// Run over stdio
server.run(transport::Stdio{});
return 0;
}
Project Structure
cpp-sdk/
├── include/
│ ├── pooriayousefi/
│ │ └── mcp/
│ │ ├── client.hpp # MCP client
│ │ ├── server.hpp # MCP server
│ │ ├── protocol.hpp # Protocol types
│ │ ├── transport/ # Transport implementations
│ │ │ ├── stdio.hpp # Stdio transport
│ │ │ └── sse.hpp # HTTP/SSE transport
│ │ └── types.hpp # Core MCP types
│ └── core/ # Utility headers
│ ├── asyncops.hpp # Async operations & coroutines
│ ├── raiiiofsw.hpp # RAII filesystem wrappers
│ ├── stringformers.hpp # String formatting
│ └── utilities.hpp # General utilities
├── examples/ # Example implementations
├── tests/ # Unit tests
├── external/ # External dependencies (submodules)
├── docs/ # Documentation
├── AUTHORS # Project contributors
├── LICENSE # MIT License
├── DEPENDENCIES.md # Dependency information
└── README.md # This file
Design Philosophy
Namespace Structure
All code is organized under the pooriayousefi namespace:
pooriayousefi::mcp::core // Core protocol types
pooriayousefi::mcp::transport // Transport implementations
pooriayousefi::mcp::client // Client implementation
pooriayousefi::mcp::server // Server implementation
pooriayousefi::core // General utilities
Coding Conventions
- Classes/Structs:
PascalCase(e.g.,McpServer) - Functions/Variables:
snake_case(e.g.,add_tool()) - Constants:
UPPER_SNAKE_CASE(e.g.,MAX_BUFFER_SIZE) - Namespaces: lowercase (e.g.,
pooriayousefi::mcp) - Indentation: Allman style (braces on new lines)
Dependencies Strategy
- Header-only libraries only: No linking complexity
- Minimal dependencies: Only nlohmann/json, asio, cpp-httplib
- Zero Boost: Using standalone alternatives
- See DEPENDENCIES.md for details
Contributing
We welcome contributions! This project aims to become the official C++ SDK for MCP.
How to Contribute
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
See CONTRIBUTING.md for detailed guidelines (coming soon).
Roadmap to Official SDK
- Phase 1 (Current): Core implementation and architecture
- Phase 2: Community adoption and feedback
- Phase 3: Proposal to modelcontextprotocol organization
- Phase 4: Official SDK status with potential corporate partnership
Related Projects
Community
- Discussions: GitHub Discussions
- Issues: GitHub Issues
- MCP Community: Official MCP Discussions
License
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 The C++ MCP SDK Authors
Acknowledgements
- Created and maintained by Pooria Yousefi
- Inspired by the official Go and Rust MCP SDKs
- Built with support from the MCP community
Status: Early Development | Version: 0.1.0-alpha | Last Updated: October 2025
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.