Model Context Protocol Library

Welcome to the MBASE MCP library documentation!

Document Navigation

The document is structured into two chapters as follows:

  • Quickstart: In this chapter, we start by creating a CMake project and linking the MCP SDK to it. Afterwards, we implement a simple MCP server with tool/resource/prompt features and communicate with that server through the MCP client which is also implemented using the SDK.

  • Information Reference: This chapter contains useful reference information for an advanced, full-featured MCP SDK usage.

About

MBASE MCP Library is an MCP client/server SDK written in C++ with all fundamental features implemented.

A full MCP documentation can be found in their official documentation website: https://modelcontextprotocol.io/introduction

Transport Methods

Method

Support

Docs

stdio

STDIO Init Client/Server

Streamable HTTP Stateless

HTTP Init Client/Server

Streamable HTTP Stateful

SSE

Feature Support Matrix

Feature

Client

Server

Docs

Prompts

Working with Prompts Client/Server

Resources

Working with Resources Client/Server

Tools

Working with Tools Client/Server

Prompt Compilation

Sending/Providing Compilation Client/Server

Logging

Sending/Reading Logs Client/Server

Pagination

Listing with Pagination Client

Ping

TBD

Progress

Sending/Reading Progress Notification Client/Server

Cancellation

TBD

Roots

Adding/Removing/Listing Roots Client/Server

Sampling

Sending/Handling Sampling Requests Client/Server

Resource Templates

Additional Features

  • HTTP API key protection support

  • HTTPS support through OpenSSL

  • JSON RPC 2.0 batch processing

  • Custom MCP request/notification/response implementation support

  • Monitoring standard MCP callbacks (requests/notifications/responses)

  • Registering/Unregistering features dynamically while the client/server is running