https://github.com/cosate/mcp
cpp mcp streamable protocol
https://github.com/cosate/mcp
cpp17 libcurl mcp nginx
Last synced: about 2 months ago
JSON representation
cpp mcp streamable protocol
- Host: GitHub
- URL: https://github.com/cosate/mcp
- Owner: cosate
- License: apache-2.0
- Created: 2025-08-31T12:08:58.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-18T02:25:02.000Z (9 months ago)
- Last Synced: 2025-09-18T02:28:52.870Z (9 months ago)
- Topics: cpp17, libcurl, mcp, nginx
- Language: C++
- Homepage:
- Size: 687 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mcp
* cpp mcp streamable http protocol
* c++17标准
* 客户端基于libcurl,服务端基于nginx
* 理解python sdk的原理后,调教AI写出来的,自己检查再改改。AI代码量可能超过60%,AI太强大了orz
## 模块说明
- common
- types.h, 核心是开头的一些宏定义, 解决std::optional类型的序列化和反序列化
- 结构体定义参考python sdk
- client
- 已编译测试, 需要自行解决libcurl依赖
- server
- nginx http模块,需要编入nginx后启动
- 自行下载nginx 源码,修改build.sh中的代码路径,执行编译
- 功能包括:
- 解析mcp request
- 异步响应
- 按mcp method限流
- third_party
- 依赖三方库: nlohmann/json, spdlog
## TODO
- 实现mcp tools等能力