oatpp-mcp
@oatpp
Anthropic’s Model Context Protocol implementation for Oat++
Overview
What is oatpp-mcp?
oatpp-mcp is an implementation of Anthropic’s Model Context Protocol (MCP) for the Oat++ C++ web framework. It allows developers to create MCP servers that can automatically generate tools from an ApiController, enabling LLMs to query the API. It is intended for Oat++ users who want to integrate with AI assistants via the MCP standard.
How to use oatpp-mcp?
Build and install the module after installing the main oatpp module, then include it in your project. Use the oatpp::mcp::Server class to add prompts, resources, and tools, and serve via STDIO (server.stdioListen()) or HTTP SSE (attach the SSE controller to your HTTP server router). Redirect Oat++ logging to a different stream when using STDIO.
Key features of oatpp-mcp
- Autogenerates MCP tools from
ApiControllerfor LLM querying. - Supports STDIO and HTTP SSE transport.
- Implements Prompts, Resources, and Tools per the MCP specification.
- Integrates directly with the Oat++ web framework.
Use cases of oatpp-mcp
- Expose existing Oat++ REST API endpoints as MCP tools for LLM consumption.
- Build an MCP server with custom prompts, resources, and tools for AI workflows.
- Connect LLMs to C++ backend services with minimal manual tool definition.
FAQ from oatpp-mcp
What transports does oatpp-mcp support?
STDIO and HTTP SSE.
Can it automatically create tools from my API?
Yes, oatpp-mcp can automatically generate tools from an ApiController, as demonstrated in a detailed tutorial and an example project.
What are the build prerequisites?
The main oatpp module must be installed first.
Does it support resources and prompts?
Yes, the server supports Prompts, Resources, and Tools as defined in the MCP specification.
How do I run the server over STDIO?
Use server.stdioListen(). Ensure you redirect Oat++ logging to a separate stream (e.g., to a file) to avoid interfering with the MCP STDIO communication.