AI Skill Hub 推荐使用:现代C++ MCP工具 是一款优质的MCP工具。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
现代C++ MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
现代C++ MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/caomengxuan666/cxxmcp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"--c---mcp--": {
"command": "npx",
"args": ["-y", "cxxmcp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 现代C++ MCP工具 执行以下任务... Claude: [自动调用 现代C++ MCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"__c___mcp__": {
"command": "npx",
"args": ["-y", "cxxmcp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
-brightgreen.svg)
-brightgreen.svg)
A production-ready C++17 SDK for the Model Context Protocol — build MCP servers and clients that embed directly into native C++ applications, with full protocol coverage and cross-SDK conformance validation.
Read this in Chinese.
```cmake find_package(cxxmcp CONFIG REQUIRED)
MinGW UCRT64 GCC and MinGW CLANG64 Clang are tracked as provisional, best-effort compiler compatibility evidence. These targets are not release-supported. The compiler-compat workflow runs them with continue-on-error: true while they remain provisional.
find_package(cxxmcp CONFIG REQUIRED)
target_link_libraries(my_server PRIVATE cxxmcp::server)
#include <cxxmcp/peer.hpp>
#include <cxxmcp/run.hpp>
int main() {
return mcp::ServerPeer::builder()
.name("demo-server")
.version("1.0.0")
.stdio()
.tool<mcp::protocol::Json, mcp::protocol::Json>("echo",
[](const mcp::protocol::Json& input) {
return mcp::protocol::Json{{"echo", input}};
})
.run();
}
// Client side
#include <cxxmcp/peer.hpp>
#include <cxxmcp/run.hpp>
int main() {
return mcp::ClientPeer::builder()
.streamable_http("http://127.0.0.1:3000/mcp")
.run([](auto& svc) {
svc.peer().initialize();
svc.peer().list_all_tools();
svc.peer().call_tool("echo",
mcp::protocol::Json{{"value", "hello"}});
});
}
In-tree examples cover server/client peers, auth, tasks, elicitation, and transport adapters. Run them with:
cmake --preset examples && cmake --build --preset examples && ctest --preset examples
See examples.md for the full list. The separate cxxmcp-examples repository exercises the SDK through an external CMake project with advanced scenarios.
| Option | Default | Description |
|---|---|---|
CXXMCP_BUILD_SDK | ON | Build the aggregate SDK layer (protocol + client + server) |
CXXMCP_BUILD_CLIENT | OFF | Build the MCP client library |
CXXMCP_BUILD_SERVER | OFF | Build the MCP server library |
CXXMCP_BUILD_EXAMPLES | OFF | Build example executables |
CXXMCP_BUILD_TESTS | BUILD_TESTING | Build tests |
CXXMCP_BUILD_BENCHMARKS | OFF | Build benchmark executables |
CXXMCP_ENABLE_HTTP | OFF | Build HTTP/SSE transport (requires cpp-httplib) |
CXXMCP_ENABLE_AUTH | OFF | Build the optional OAuth 2.1 / DPoP auth target |
CXXMCP_ENABLE_WEBSOCKET | OFF | Build WebSocket transport (requires CXXMCP_ENABLE_HTTP) |
| Target | Purpose |
|---|---|
cxxmcp::protocol | MCP protocol models and JSON-RPC serialization |
cxxmcp::transport | Role-generic transport contracts |
cxxmcp::handler | Client/server handler interfaces |
cxxmcp::peer | Role-aware execution boundary |
cxxmcp::service | Service lifecycle boundary |
cxxmcp::client | Embeddable MCP client SDK |
cxxmcp::server | Embeddable MCP server SDK |
cxxmcp::auth | Optional OAuth 2.1 / DPoP contract (CXXMCP_ENABLE_AUTH=ON) |
cxxmcp::sdk | Aggregate public SDK target |
高质量的C++ MCP工具
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,现代C++ MCP工具 是一款质量良好的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | cxxmcp |
| 原始描述 | 开源MCP工具:Modern C++ SDK and runtime for the Model Context Protocol (MCP).。⭐8 · C++ |
| Topics | c++cmakejson-rpcmcp |
| GitHub | https://github.com/caomengxuan666/cxxmcp |
| License | MIT |
| 语言 | C++ |
收录时间:2026-05-26 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端