Official · MODEL CONTEXT PROTOCOL
oatpp-mcp
Anthropic’s Model Context Protocol implementation for Oat++
WHAT IT CONNECTS
What oatpp-mcp gives an AI Agent
The source catalog does not include a structured feature list. Review the repository documentation before use.
SECURITY
An MCP listing is not a security review
An MCP server may receive model context, credentials, local files, or permission to call external systems. Review its code, requested environment variables, network behavior, package provenance, and maintenance status before connecting it to an agent.
README
Repository documentation
Anthropic’s Model Context Protocol implementation for Oat++
Read more:
🎉 oatpp-mcp can automatically generate tools from ApiController so that you can query your API with LLM. 🎉
- Detailed tutorial
- Example project example-crud (branch
add_mcp_server)
- STDIO
- HTTP SSE
- Install the main oatpp module
- Clone this repository.
- In the root of the repository run:
mkdir build && cd build cmake .. make install
Find working example in tests /test/oatpp-mcp/app/ServerTest.cpp
Note: make sure to redirect oatpp logging to a different stream - ex.: to file by providing custom Logger.
/* Create MCP server */
oatpp::mcp::Server server;
/* Add prompts */
server.addPrompt(std::make_shared<prompts::CodeReview>());
/* Add resource */
server.addResource(std::make_shared<resource::File>());
/* Add tools */
server.addTool(std::make_shared<tools::Logger>());
/* Run server */
server.stdioListen(); /* Create MCP server */
oatpp::mcp::Server server;
/* Add prompts */
server.addPrompt(std::make_shared<prompts::CodeReview>());
/* Add resource */
server.addResource(std::make_shared<resource::File>());
/* Add tools */
server.addTool(std::make_shared<tools::Logger>());
/* Add SSE controller to your HTTP server router */
router->addController(server.getSseController());COMMUNITY