
neumann-labs/mcp-cpp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
neumann-labs/mcp-cpp - кандидат на сервер MCP, импортированный из https://github.com/neumann-labs/mcp-cpp.
Обзор
neumann-labs/mcp-cpp - кандидат на сервер MCP, импортированный из https://github.com/neumann-labs/mcp-cpp.
Обзор (машинный перевод)
Современный C++20 SDK для протокола Model Context (MCP), направленная на пересмотр протокола 2025-11-25.
** Статус: ** бета. Формат провода заблокирован для официальной спецификации MCP; C++ API все еще может видеть улучшения до 1.0.
Почему
Приложения LLM все чаще нуждаются в едином способе общения с инструментами, ресурсами и приложениями. Быстрые поставщики. MCP - это протокол; этот SDK стремится быть чистым, быстрым. Специфическая реализация C++, подходящая для встраивания в редакторы, IDE, агенты, нативные приложения и высокопроизводительные серверы.
Цели проектирования:
- ** Специалист.** Названия полей, названия методов и поведение соответствуют
Официальная схема TypeScript
дословно.
Идиоматический C++20. RAII, семантика значений,
std::variantдля типов сумм, фьючерсы на результаты асинхронизации, отсутствие иерархий наследования, где состав будет Правда. Маленькая поверхность, большой рычаг. Концентрированный публичный API; большая часть работы Это происходит за несколькими известными типами. Производство готово. Санитарно чистый, безвредный, где он должен быть, нет Скрытые выделения на горячих путях.
Что такое 0.1
Обсуждение Capability | Server | Client | Notes [править] [править] [править] | Инициализация/переговоры о возможностях | | | спецификация 2025-11-25 |
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
mcp-cpp
A modern C++20 SDK for the Model Context Protocol (MCP), targeting protocol revision 2025-11-25.
Status: beta. The wire format is locked to the official MCP spec; the C++ API may still see refinements before 1.0.
Why
LLM applications increasingly need a uniform way to talk to tool, resource, and prompt providers. MCP is that protocol; this SDK aims to be a clean, fast, spec-faithful C++ implementation suitable for embedding in editors, IDEs, agents, native applications, and high-throughput servers.
Design goals:
- Spec-faithful. Field names, method names, and behaviors match the official TypeScript schema verbatim.
- Idiomatic C++20. RAII, value semantics,
std::variantfor sum types, futures for async results, no inheritance hierarchies where composition will do. - Small surface, big leverage. A focused public API; most of the work happens behind a few well-named types.
- Production-ready. Sanitizer-clean, thread-safe where it must be, no hidden allocations on hot paths.
What’s in 0.1
| Capability | Server | Client | Notes |
|---|---|---|---|
| Initialize / capabilities negotiation | ✅ | ✅ | spec 2025-11-25 |
| Tools (list, call) | ✅ | ✅ | text/image/audio content blocks |
| Resources (list, read, templates, subscribe/unsubscribe) | ✅ | ✅ | text + base64 blob contents |
| Prompts (list, get) | ✅ | ✅ | typed messages with content blocks |
Sampling (sampling/createMessage) |
✅ initiator | ✅ responder | server-initiated LLM calls |
Roots (roots/list) |
✅ initiator | ✅ responder | client-side filesystem scopes |
Completion (completion/complete) |
✅ | ✅ | autocompletion suggestions |
Cancellation (notifications/cancelled) |
✅ | ✅ | wire-level support |
Progress (notifications/progress) |
✅ | ✅ | typed token + handler |
Logging (notifications/message, logging/setLevel) |
✅ | ✅ | RFC-5424 levels |
Ping (ping) |
✅ | ✅ | bi-directional liveness |
| Pagination | ✅ | ✅ | configurable page size |
stdio transport |
✅ | ✅ | spec-correct framing |
| Streamable HTTP transport | ✅ | ✅ | POST + SSE GET stream + session ids |
Tasks (tasks/get/result/list/cancel, status notifications) |
✅ | ✅ | augment tools/call via task field; spec 2025-11-25 |
Elicitation (elicitation/create, form + url modes) |
✅ initiator | ✅ responder | spec 2025-11-25 |
| OAuth 2.1 authorization (HTTP) | ✅ | ✅ | bearer + RFC 9728 protected resource metadata |
Quick start
A minimal server
#include
int main() {
mcp::Server server{
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →