MCPServer.cpp
A high-performance C++ implementation of the Model Communication Protocol server,which supports python plugins.
claude mcp add --transport stdio caomengxuan666-mcpserver.cpp ./bin/mcp-server++
How to use
MCPServer.cpp is a high-performance C++20 implementation of the Model Communication Protocol server. It exposes a JSON-RPC 2.0 interface over HTTP with optional Server-Sent Events (SSE) streaming, allowing clients to execute built-in tools, manage plugins, and interact with resources provided by the server. Practical workflows include sending JSON-RPC requests to run built-in tools (such as file operations or HTTP requests) or to invoke plugin-provided functionality. The server is designed for high throughput and asynchronous I/O using ASIO, and it supports a pluggable system so you can extend its capabilities without touching core logic. To start, run the compiled binary (for example, the provided mcp-server++) and connect to its HTTP endpoint to begin sending RPC calls or subscribe to SSE streams for real-time updates.
How to install
Prerequisites:
- A modern C++20 compatible compiler (GCC 10+, Clang 12+, MSVC with C++20 support)
- CMake 3.23 or newer
- Git
Step-by-step installation from source:
-
Clone the repository: git clone https://github.com/caomengxuan666/MCPServer.cpp.git cd MCPServer.cpp
-
Create a build directory and configure with CMake: mkdir build cd build cmake ..
-
Build the project: cmake --build . --config Release
or on Linux/macOS:
make -j$(nproc)
-
Run the server: ./bin/mcp-server++
-
Optional: adjust build options via CMake, e.g. enable tests or adjust optimizations, using cmake -D<OPTION>=<VALUE> .. before building.
Additional notes
Tips and common considerations:
- HTTPS is disabled by default. To enable HTTPS, configure enable_https=1 in your config.ini and provide valid SSL certificate paths as per the documentation.
- The server supports a plugin system. You can drop dynamic libraries into the plugin path and enable them via configuration to extend built-in tools, HTTP client capabilities, and system commands.
- Built-in tools include file operations, HTTP requests, and system commands. You can invoke these via JSON-RPC 2.0 requests.
- For development, you can build in Debug mode to get more verbose logging and easier debugging. Use CMake options to toggle BUILD_TESTS or set CMAKE_BUILD_TYPE=Debug.
- If you plan to deploy with SSE, ensure your client handles streaming responses and that your transport layer is configured for HTTP/1.1 as documented.
- Review the authentication documentation (AUTH.md) to secure access to the server when exposed publicly.
Related MCP Servers
web-eval-agent
An MCP server that autonomously evaluates web applications.
mcp-neo4j
Neo4j Labs Model Context Protocol servers
Gitingest
mcp server for gitingest
fhir
FHIR MCP Server – helping you expose any FHIR Server or API as a MCP Server.
unitree-go2
The Unitree Go2 MCP Server is a server built on the MCP that enables users to control the Unitree Go2 robot using natural language commands interpreted by a LLM.
flapi
API Framework heavily relying on the power of DuckDB and DuckDB extensions. Ready to build performant and cost-efficient APIs on top of BigQuery or Snowflake for AI Agents and Data Apps