Install
$ agentstack add mcp-ptai-eng-synapse-mcp ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo 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.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
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 →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, usingstd::shared_mutexto safely protect all state interactions. - Dependency Light: Uses only
nlohmann/jsonfor 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
- Copy the
include/synapsedirectory into your project's include path. - Ensure you have
nlohmann/jsonavailable 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.
- Author: ptai-eng
- Source: ptai-eng/synapse-mcp
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.