C

oatpp-mcp

Created Oct 19, 2025 by oatpp

Language:

C++

Stars:

34

Forks:

2

README

oatpp-mcp

Anthropic’s Model Context Protocol implementation for Oat++

Read more:

Supported features

Autogenerated tools for API

:tada: oatpp-mcp can automatically generate tools from ApiController so that you can query your API with LLM. :tada:

Transport

  • STDIO
  • HTTP SSE

Server features

Build And Install

Pre Requirements

  • Install the main oatpp module

Install module

  • Clone this repository.
  • In the root of the repository run:
     mkdir build && cd build
     cmake ..
     make install

Examples

Find working example in tests /test/oatpp-mcp/app/ServerTest.cpp

Serve via STDIO

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());

  /* Add resource */
  server.addResource(std::make_shared());

  /* Add tools */
  server.addTool(std::make_shared());

  /* Run server */
  server.stdioListen(); 

Serve via SSE

  /* Create MCP server */
  oatpp::mcp::Server server;

  /* Add prompts */
  server.addPrompt(std::make_shared());

  /* Add resource */
  server.addResource(std::make_shared());

  /* Add tools */
  server.addTool(std::make_shared());

  /* Add SSE controller to your HTTP server router */
  router->addController(server.getSseController());
Last updated: Oct 19, 2025

Publisher info

oatpp's avatar

oatpp

🌱Light and powerful C++ web framework for highly scalable and resource-efficient web applications development. It's zero-dependency and easy-portable.

Planet Earth
179
followers
0
following
50
repos

More MCP servers built with C++

TensorFlow

An Open Source Machine Learning Framework for Everyone

By tensorflow 193.4K
React Native

A framework for building native applications using React

By facebook 125.1K
FAISS

A library for efficient similarity search and clustering of dense vectors.

By facebookresearch 38.8K