oatpp-mcp is an implementation of Anthropic's Model Context Protocol (MCP) for the Oat++ framework. It allows developers to expose APIs built with Oat++ to large language models (LLMs), enabling LLMs to query these APIs through the MCP protocol.
Main capabilities:
- Automatically generate tools from ApiController, allowing LLMs to query APIs without manual definition.
- Support providing services through STDIO.
- Provide a detailed tutorial, and include the example project example-crud (branch add_mcp_server).
How to use:
- Install the Oat++ main module (pre-installation requirement).
- Clone the repository.
- In the repository root directory, run: mkdir build && cd build cmake .. make install.
- You can refer to the working example in the test file /test/oatpp-mcp/app/ServerTest.cpp.
- When providing services through STDIO, make sure to redirect oatpp logs to another stream (for example, output to a file through a custom Logger).
Applicable scenarios: Suitable for developers who want LLMs to query their Oat++ APIs through the MCP protocol, and especially suitable for scenarios that need to quickly integrate existing APIs into an LLM toolchain.
Limitations and precautions:
- When using the STDIO service method, be sure to redirect oatpp logs to avoid interfering with STDIO communication.
- Other limitations are not provided for now.