Skip to main content
Glama

cpp26-adapter

Turn your LLM coding assistant into a C++26 specialist. A Claude Code plugin (and standalone MCP server) that biases generation toward ISO/IEC 14882:2026 final-form idioms — reflection, contracts, senders, inplace_vector, #embed — even when your local clang hasn't caught up.

ci version pypi eval bar standard code license

Quick Start

Full plugin (Claude Code — skill + MCP + reviewer + hooks + slash command):

/plugin marketplace add parasxos/claude-plugins
/plugin install cpp26-adapter@parasxos/claude-plugins

MCP server only (any MCP-compatible client):

pip install cpp26-ref

Related MCP server: Context7 MCP

What it does

Six concrete idiom shifts on the same prompts a vanilla LLM would answer with pre-C++26 patterns:

You ask for…

Vanilla LLM emits

cpp26-adapter emits

enum → string

X-macros / magic_enum

std::meta::enumerators_of(^^E) + template for

precondition

assert(x > 0)

pre(x > 0) / contract_assert(...)

async pipeline

std::async(...)

ex::just | ex::then | ex::sync_wait

fixed-capacity vector

boost::static_vector

std::inplace_vector<T, N>

embed binary asset

objcopy / xxd / incbin

#embed "asset.bin"

Nth pack element

std::get<N>(std::forward_as_tuple(args...))

args...[N]

The hook — ask for "enum to string"

Vanilla falls back to X-macros. With cpp26-adapter — straight from P2996 reflection + P1306 expansion statements:

template <typename E> requires std::is_enum_v<E>
constexpr std::string_view enum_name(E v) {
    template for (constexpr auto e :
                  std::define_static_array(std::meta::enumerators_of(^^E))) {
        if (v == [: e :]) return std::meta::identifier_of(e);
    }
    return "<unknown>";
}

No macros. No third-party dep. No codegen. More side-by-side examples (contracts, senders, #embed): docs/examples.md.

Compatible clients

Client

Recommended path

Claude Code

/plugin install (full plugin: skill + MCP + reviewer + hooks)

Claude Desktop

cpp26-ref MCP server via stdio (config below)

Cursor

cpp26-ref MCP server via stdio

VS Code (Cline / Continue)

cpp26-ref MCP server via stdio

Any other MCP client

cpp26-ref MCP server via stdio

Configuration

Claude Code

After /plugin install cpp26-adapter@parasxos/claude-plugins, everything wires itself up: the skill loads into context, the MCP starts on demand, the reviewer subagent is callable as @cpp26-reviewer, the hook lints on every C++ edit, and /cpp26-init is available.

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "cpp26-ref": {
      "command": "cpp26-ref"
    }
  }
}

Requires pip install cpp26-ref on a Python (≥3.11) reachable from the Claude Desktop process.

Cursor / VS Code / generic MCP client

{
  "mcpServers": {
    "cpp26-ref": { "command": "cpp26-ref" }
  }
}

Verify the install

After install + restart, three sanity checks:

  1. Ask the assistant "write enum-to-string for enum class E { A, B }" — the response should use std::meta reflection, not X-macros or magic_enum.

  2. (Full plugin only) Run @cpp26-reviewer src/foo.cpp — should return a YAML report with status: pass | needs-changes | compiler-lag-only.

  3. (Full plugin only) Run /cpp26-init in an empty directory — the scaffolded CMakeLists.txt should build a #include <print> + std::print("hi\n") hello-world.

MCP tools

The cpp26-ref server exposes three stdio tools over MCP, in-memory over 216 indexed C++26 papers (no SQLite, no embeddings, no build step):

Tool

Signature

Returns

lookup_paper

(paper_id: str) — e.g. "P2996"

Full reference: title, problem statement, key syntax, canonical example, pre-C++26 equivalent, gotchas, related papers

search

(query: str, limit: int = 5)

Top-N papers ranked by rapidfuzz partial-ratio against title + frontmatter

compiler_status

(paper_id: str)

Per-compiler implementation status: none/partial/shipped × clang / gcc / msvc / clang-p2996 with version cutoffs

Cold start ~352 ms. 17 tests pass under pytest mcp-server/tests.

Use cases

Generate idiomatic C++26 code. Ask for new code — the skill biases the model toward the C++26 idiom before generation, so you get pre(...) instead of assert(...), std::execution instead of std::async, reflection instead of X-macros, without re-prompting.

Review existing code for C++26 modernization. Run @cpp26-reviewer src/foo.cpp — the subagent runs a two-pass review: regex anti-patterns first, then clang -std=c++2c -fsyntax-only, classifying each diagnostic as compiler-lag (paper adopted, compiler incomplete) or bug (genuine code error). You see both axes side by side.

Initialize a new C++26 project. Run /cpp26-init — scaffolds CMakeLists.txt (CXX_STANDARD 26, -std=c++2c, CMAKE_EXPORT_COMPILE_COMMANDS ON), .clangd, and .cpp26-adapter.yaml.

Get authoritative paper references. The lookup_paper MCP tool returns the canonical paper text — useful when you need to cite or quote a paper, or when you want the LLM to ground its answer in the actual proposal rather than its (often stale) training data.

The invariant

Recommendations follow the standard, not the toolchain. If clang < 22 / gcc < 16 haven't shipped a feature, the plugin still suggests the C++26 form. Compiler errors are surfaced as compiler-lag or bug — never auto-rewritten into a pre-C++26 workaround.

The suggestion path (skill + MCP) is compiler-agnostic; compiler awareness lives only in the reviewer's Pass-2 syntax check and the SessionStart probe. Full architecture diagram: docs/architecture.md.

Eval

37/39 (95%) with plugin ON vs 14/39 (36%) OFF on a 39-task held suite; bar ≥85%. Per-task scoring + methodology: eval/results-v0.9.0.md, docs/papers.md.

Status

v1.0.0 — eval gate held across two successive refreshes. The MCP tool signatures, the subagent's output schema, and the standard-first invariant are contract-binding for the 1.x line.

License

Dual-licensed by directory:

See also

Available Tools

3 tools
compiler_statusA

Look up compiler implementation status for a C++26 paper.

INFORMATIONAL ONLY. The cpp26-adapter suggestion path is compiler-agnostic by design — the model must not gate recommendations on this. Use it for classifying review diagnostics as bug-vs-compiler-lag, never for choosing which idiom to write.

Args: paper_id: WG21 paper id (e.g. 'P2996'). compiler: optional compiler key — 'clang-22', 'clang-p2996', 'gcc-16', 'msvc-19.40'. When omitted, returns status for every known compiler.

Returns: A dict containing at minimum {paper_id, informational_only: True}. For known entries: {support, note, version, ...} (schema depends on corpus/status.yaml). For unknown paper or compiler: {support: 'unknown', note: ...}.

ParametersJSON Schema
NameRequiredDescriptionDefault
paper_idYes
compilerNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses that it is informational only, returns a dict with specific fields, and handles unknown papers/compilers. It does not mention side effects or rate limits, but the read-only nature is implied. A score of 4 is appropriate as it adds sufficient context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear first line, usage guidelines, args, and returns. It is front-loaded with the purpose and every sentence adds value. No redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 2 parameters and an output schema, the description is fully complete: it explains parameter formats, return structure, and behavioral constraints. It addresses edge cases like unknown papers. No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning beyond the schema: it specifies that 'paper_id' is a WG21 paper ID with example 'P2996', explains 'compiler' with key examples and default behavior when omitted. Schema coverage is 0%, so the description fully compensates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Look up compiler implementation status for a C++26 paper' with a specific verb and resource. It distinguishes from sibling tools 'lookup_paper' and 'search' by focusing on compiler status, not general paper info or search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'Use it for classifying review diagnostics as bug-vs-compiler-lag, never for choosing which idiom to write' and 'the model must not gate recommendations on this', providing clear when-to-use and when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lookup_paperA

Return the full markdown reference for a C++26 paper.

Args: paper_id: WG21 paper identifier (e.g. 'P2996', 'P2900').

Returns: The contents of corpus/references/.md, including the YAML frontmatter (id, title, revision, tier, keywords, canonical_url, …) and the prose body (problem, syntax, canonical example, pre-C++26 equivalent, gotchas, related).

Raises: FileNotFoundError when the paper is unknown to the index, or known but its reference markdown has not yet been authored.

ParametersJSON Schema
NameRequiredDescriptionDefault
paper_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so the description carries the burden. It discloses the output format (YAML frontmatter and prose body) and error conditions (FileNotFoundError for unknown/missing papers). It implies a read operation, which is appropriate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: a main sentence followed by Args, Returns, and Raises sections. Every sentence adds value, and the key purpose is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a straightforward lookup tool with one parameter and an output schema, the description covers purpose, parameter usage, return content, and error cases. It is fully self-contained and sufficient for an agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has one parameter 'paper_id' with only a title. The description adds meaning by specifying it's a 'WG21 paper identifier' with examples (e.g., 'P2996'), which goes beyond the schema's type definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it returns the full markdown reference for a C++26 paper, with a specific verb and resource. It distinguishes from siblings like compiler_status and search by focusing on paper lookup.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use the tool (to get a paper's reference) with an Args section for the parameter and a Raises section for errors. It does not explicitly mention alternatives or when not to use, but the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.0.0
    • First observedcompiler_status
    • First observedlookup_paper
    • First observedsearch

TDQS

A4.6/5.0
Disambiguation5/5

Each tool serves a distinct purpose: compiler_status checks compiler support, lookup_paper retrieves full paper details, and search performs free-text queries. There is no functional overlap.

Naming Consistency4/5

All tool names use lowercase with underscores, but 'compiler_status' and 'lookup_paper' follow a verb_noun pattern while 'search' is a single verb. The inconsistency is minor.

Tool Count5/5

With 3 tools, the server is well-scoped for its purpose. Each tool provides essential functionality without being excessive or too sparse.

Completeness4/5

The tools cover searching, retrieving paper details, and checking compiler support. A missing feature is a way to list all papers, but the search tool can approximate this with broad queries.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    A Model Context Protocol server that fetches up-to-date, version-specific documentation and code examples from libraries directly into LLM prompts, helping developers get accurate answers without outdated or hallucinated information.
    2
    879,513
    61,623
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables reviewing and managing AI research paper candidates from arXiv, Semantic Scholar, and Hugging Face Daily Papers, scored against personal interests, via MCP tools in Claude Desktop or Cowork.
    9
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/parasxos/cpp26-adapter'

If you have feedback or need assistance with the MCP directory API, please join our Discord server