AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Synapse Mcp

mcp-ptai-eng-synapse-mcp · by ptai-eng

A modern, lightweight C++23 SDK for the Model Context Protocol (MCP)

No reviews yet
0 installs
9 views
0.0% view→install

Install

$ agentstack add mcp-ptai-eng-synapse-mcp

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-ptai-eng-synapse-mcp)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
24d ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Synapse Mcp? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Synapse MCP A Modern, High-Performance, Header-Only C++20 SDK for Model Context Protocol


Synapse MCP is a lightweight, ultra-fast, and deeply integrated C++20 header-only library designed to help developers build Model Context Protocol (MCP) servers and clients with zero friction. Built strictly on modern C++ paradigms, it leverages std::expected and modern standard library features to provide maximum safety without compromising on the bare-metal performance that C++ developers expect.

Why Synapse MCP?

Inspired by the design philosophies of industry standards like spdlog and abseil:

  • Header-only: Just drop the include/ folder into your project and you're ready to go. No complex build steps or linking headaches.
  • Modern C++20/23: Utilizes the latest language features (std::expected, std::variant, std::optional) for expressive, safe, and clean code.
  • Zero Overhead Abstractions: Designed for latency-critical applications where every CPU cycle counts.
  • Fully Featured MCP Spec: Supports Tools, Resources, Prompts, and Sampling natively out-of-the-box.
  • Multi-Threaded & Thread-Safe: Handles incoming JSON-RPC requests asynchronously via std::thread, using std::shared_mutex to safely protect all state interactions.
  • Dependency Light: Uses only nlohmann/json for robust JSON-RPC 2.0 serialization.

Installation

Since Synapse MCP is header-only, installation is trivial.

Option 1: CMake FetchContent (Recommended)

Add this to your CMakeLists.txt:

include(FetchContent)
FetchContent_Declare(
    synapse_mcp
    GIT_REPOSITORY https://github.com/ptai-eng/synapse-mcp.git
    GIT_TAG main
)
FetchContent_MakeAvailable(synapse_mcp)

add_executable(my_server main.cpp)
target_link_libraries(my_server PRIVATE synapse::mcp)

Option 2: Copy-Paste

  1. Copy the include/synapse directory into your project's include path.
  2. Ensure you have nlohmann/json available in your project.

Quick Start

Building an MCP server in modern C++ is now just a few lines of code:

#include 
#include 

int main() {
    // 1. Initialize the STDIO transport layer
    auto transport = std::make_shared();
    
    // 2. Create the MCP Server instance
    synapse::server mcp_server(transport);
    
    // 3. Register a tool
    mcp_server.register_tool(
        "calculate_hash",
        "Computes a dummy SHA-256 hash for a given input string.",
        R"({
            "type": "object",
            "properties": {
                "input": { "type": "string" }
            },
            "required": ["input"]
        })"_json,
        [](const nlohmann::json& args) -> std::expected {
            std::string input = args["input"];
            return nlohmann::json{{"hash", "dummy-hash-" + input}};
        }
    );
    
    // 4. Start listening for incoming requests
    transport->start();
    
    return 0;
}

Documentation

Detailed documentation on handling Prompts, Resources, and advanced Transport layers (like SSE or WebSockets) is coming soon in the docs/ folder.

Contributing

We welcome contributions! Whether it's adding new transport layers, improving documentation, or fixing bugs, please feel free to open an issue or submit a Pull Request.

License

Synapse MCP is distributed under the MIT License. See LICENSE for more information.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.