# CTronik Synapse Gateway– Open-source agentic gateway and secure MFT protocol.)

> Source: <https://github.com/ctronikstudio-74/SynapseGateway>
> Published: 2026-11-27 22:16:46+00:00

**Key takeaway:** SynapseGateway 0.3.0 gives builders a GPL-3.0-only C++20 reverse proxy that verifies x402 stablecoin payments and ERC-8004 agent identities in under 100ms at 1000+ req/s/core, with SDKs in six languages.

Version 0.3.0. SynapseGateway is a C++20 reverse proxy that lets an AI agent pay for an API with a stablecoin transfer, prove an ERC-8004 identity, and reach the existing backend. The sources are released under GPL-3.0-only.

- 🚀 **High Performance** : Sub-100ms verification latency, 1000+ req/s/core throughput
- 🔗 **Multi-Blockchain** : Ethereum, Base, Arbitrum, Polygon, BNB Chain support
- 💰 **x402 Payment Protocol** : Micropayment-based API monetization
- 🔐 **ERC-8004 Identity** : Blockchain-based agent identity verification
- 📊 **Built-in Monitoring** : Prometheus metrics, structured logging
- 🌐 **Cross-Platform** : Windows, Linux, macOS support

- **C++20 Compiler** :
  - Windows: MSVC 2019 16.11+ or MSVC 2022
  - Linux: GCC 10+ or Clang 12+
  - macOS: Xcode Command Line Tools (Clang 12+)
- **CMake** : 3.20 or later
- **vcpkg** : For dependency management

**Windows:**

```
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
$env:VCPKG_ROOT = (Get-Location).Path
```

**Linux/macOS:**

```
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
export VCPKG_ROOT=$(pwd)
```

**Automated Setup (Recommended):**

Windows:

```
.\setup-build.ps1 -BuildType Release
cmake --build --preset windows-msvc-release
```

Linux/macOS:

```
chmod +x setup-build.sh
./setup-build.sh Release
cmake --build --preset linux-gcc-release  # or linux-clang-release / macos-clang-release
```

**Manual Setup:**

```
cmake --preset windows-msvc-release  # or linux-gcc-release, macos-clang-release
cmake --build --preset windows-msvc-release
ctest --preset windows-msvc-release  # or appropriate preset for your platform
```

- [Dependencies](https://github.com/ctronikstudio-74/SynapseGateway/blob/main/DEPENDENCIES.md) - Detailed dependency information and setup
- [Deployment](https://github.com/ctronikstudio-74/SynapseGateway/blob/main/docs/deployment.md) - Build, Docker, systemd, and monitoring
- [API](https://github.com/ctronikstudio-74/SynapseGateway/blob/main/docs/api.md) - x402 headers, status codes, and refunds
- [Funzionamento](https://github.com/ctronikstudio-74/SynapseGateway/blob/main/docs/funzionamento.md) - avvio, percorso di una richiesta, rimborsi e arresto
- [Features](https://github.com/ctronikstudio-74/SynapseGateway/blob/main/docs/features.md) - complete capability catalog and the remaining design gaps
- [SDK](https://github.com/ctronikstudio-74/SynapseGateway/blob/main/sdk/README.md) - C++, Python, TypeScript, Java, C#, and Lua clients for the 0.3.0 HTTP protocol

The GPL-3.0-only core and the SDK stay free. Production support and the enterprise distribution are ordered from the C-Tronik product page, together with SynapseMFT and Synapse Firewall: [https://c-tronik.com/products/](https://c-tronik.com/products/).

```
SynapseGateway/
├── cmake/              # Custom CMake find modules
├── include/gateway/    # Public headers, including SynapseGateway.h
├── src/                # Implementation. src/SynapseGateway.cpp is the process entry
├── tests/              # Unit and integration tests
├── config/             # Example, development, and production TOML
├── deploy/             # systemd unit and Prometheus example
└── docs/               # API, operations, and deployment
```

SynapseGateway uses vcpkg for dependency management. Key dependencies include:

- **Drogon** (>= 1.9.0) - HTTP framework
- **Boost** (>= 1.75.0) - Networking and utilities
- **OpenSSL** (>= 3.0.0) - Cryptography
- **toml++** (>= 3.0.0) - Configuration parsing
- **spdlog** (>= 1.12.0) - Logging
- **nlohmann_json** (>= 3.11.0) - JSON processing
- **prometheus-cpp** (>= 1.2.0) - Metrics
- **Google Test** (>= 1.14.0) - Unit testing

Property tests run 100 iterations with the in-tree generator. RapidCheck is not part of the vcpkg baseline used by this tree.

See [DEPENDENCIES.md](https://github.com/ctronikstudio-74/SynapseGateway/blob/main/DEPENDENCIES.md) for complete details.

Configuration is managed through TOML files. Example:

```
[server]
listen_address = "0.0.0.0"
listen_port = 8080

[blockchain]
payment_wallet_seed = "your-seed-here"

[[blockchain.networks]]
network = "base"
rpc_url = "https://mainnet.base.org"
enabled = true

[[endpoints]]
path_pattern = "/api/v1/.*"
price_usdc = 0.001
trust_threshold = 0.7
backend_url = "http://localhost:3000"
SynapseGateway check config/gateway.dev.toml
SynapseGateway config/gateway.dev.toml
```

`check` validates the TOML file and prints the CREATE2 collection address. It does not open a port and it does not call a blockchain node.

On Windows the file is `SynapseGateway.exe`, under `build/windows-msvc/Debug` or `Release`. The process listens on the configured HTTP port, logs the same collection address, and writes payment state to `data/payment-state.json`. SIGTERM drains in-flight requests and exits 0.

The EIP-712 domain signed by agents remains `AgentGateway` version `1`. That name is the signature domain, not the product name.

- `GET /v1/auth` is the payment decision for Envoy ext_authz, Traefik ForwardAuth, and nginx auth_request. It does not call the backend.
- `GET /mcp` and`POST /mcp` list the live routes for agent builders.
- `SynapseGateway check config.toml` validates the file and prints the CREATE2 collection address without opening a port.
- Startup logs that same address.
- `GatewayFilter` is the stable extension point, in three phases.
- An OTLP HTTP JSON span is exported only when `opentelemetry_enabled` is true and`otlp_endpoint` is set.

- USDC stays the default. A network may also accept USDT or EURC, each with its own decimals. EIP-3009 collection and on-chain refunds stay on USDC.
- Wallet policy: a denylist, a minimum identity-NFT age, and a per-endpoint allowlist. All three reload with the TOML file.
- An agent can pay with an EIP-3009 authorization, or with prepaid credit when `gas_budget_usdc` is above the call price.
- The executable target is `SynapseGateway` .`src/SynapseGateway.cpp` starts the process.

- Build system and dependency management
- Core utilities (cache, bloom filter, rate limiter)
- Configuration management
- Blockchain connector
- Payment processor
- Identity and reputation verification
- HTTP gateway router
- Monitoring and metrics
- Integration tests, benchmarks, Docker, and systemd

GNU General Public License v3.0 only. See [LICENSE.md](https://github.com/ctronikstudio-74/SynapseGateway/blob/main/LICENSE.md).

Contributions are welcome! Please read our contributing guidelines before submitting pull requests.

For issues, questions, or contributions, please open an issue on GitHub.

Agentic Gateway, Financial Identity for Agentic AI
