SatGate
Open-source API gateway that adds budget enforcement, cost attribution, and monetization to AI agent API calls. MCP-aware with per-tool cost tracking, macaroon-based bearer tokens, L402 Lightning micropayments, and enterprise budget control (Fiat402). The economic firewall for the agent economy.
SatGate
The Economic Firewall for AI Agents
Hard budget enforcement Β· Per-tool cost attribution Β· L402 micropayments
Why β’ Features β’ Quick Start β’ Docs β’ Website β’ Blog
βοΈ Don't want to self-host? Try SatGate Cloud
Managed SaaS β zero setup, multi-tenant isolation, enterprise dashboard.
Free Observe tier. No credit card required.
The Problem
AI agents are making API calls autonomously. They spawn sub-agents, call MCP tools, and run overnight while you sleep.
Your existing stack answers: "Is this request authenticated?"
Nobody answers: "Should this agent spend this?"
β Network Firewall β "Can this packet enter?"
β Application Firewall β "Is this request safe?"
? Economic Firewall β "Should this agent spend this?"
That's the gap. SatGate fills it.
What is SatGate?
SatGate is an Economic Firewall that enforces Economic Access Control for AI agent requests. Drop it in front of your APIs β it handles authentication, budget enforcement, cost attribution, and optional micropayments.
Not another routing layer. Routing gateways (Bifrost, LiteLLM, Portkey) optimize which provider handles a call. SatGate governs whether the call should happen at all based on budgets, policies, and cost.
Use them together:
Agent β SatGate (economic governance) β Routing Gateway β LLM Providers
Features
- π‘οΈ Capability Tokens (Macaroons) β Cryptographic credentials with built-in caveats, delegation, and instant revocation. Not API keys β tokens that agents can safely sub-delegate.
- π― MCP-Aware β Parses MCP JSON-RPC tool calls. Know that Agent X spent $47 on
search_databaseand $12 onsend_emailβ not just "1,000 requests." - π° Budget Enforcement β Hard stops per agent, team, or API. When the budget hits zero, requests are blocked. Not logged. Not alerted. Blocked.
- β‘ L402 Protocol β Native Bitcoin Lightning micropayments for API monetization. Sub-cent pricing that's uneconomical on card rails.
- π Default-Deny β All routes require valid credentials unless explicitly public. Zero Trust by design.
- π <50ms Overhead β Lightweight Go proxy. Adds governance without adding latency.
- π¦ Self-Hosted β Your infrastructure, your rules. Single binary, Docker, or Kubernetes.
- π Drop-in β Works with any HTTP backend. REST, GraphQL, MCP servers. No code changes.
Quick Start
60-Second Demo
# Download the binary (macOS Apple Silicon β see Releases for other platforms)
curl -L https://github.com/satgate-io/satgate/releases/latest/download/satgate-darwin-arm64 -o satgate
chmod +x satgate
# Start with example config (mock Lightning, auto-generated keys)
export ADMIN_TOKEN=my-secret-token
export LIGHTNING_BACKEND=mock
./satgate --config examples/gateway.yaml
Try the three policies:
# 1. Public β no auth needed
curl http://localhost:8080/health
# 2. Protected β mint a capability token, then use it
curl -X POST http://localhost:8080/api/capability/mint \
-H "X-Admin-Token: my-secret-token" \
-H "Content-Type: application/json" \
-d '{"scope": "api:read", "duration": "1h"}'
# Use the token:
curl -H "Authorization: Bearer <your-token>" \
http://localhost:8080/api/capability/ping
# 3. Paid β get an L402 challenge (HTTP 402 + Lightning invoice)
curl http://localhost:8080/api/micro
Public β Protected β Paid. Three policies, one gateway.
π Full Quick Start Guide β
Other Install Methods
# Docker
docker run -v $(pwd)/gateway.yaml:/etc/satgate/gateway.yaml \
-e ADMIN_TOKEN=my-secret-token -e LIGHTNING_BACKEND=mock \
-p 8080:8080 ghcr.io/satgate-io/satgate:latest
# Build from source
git clone https://github.com/satgate-io/satgate.git
cd satgate && go build -o satgate ./cmd/satgate
Configuration
version: 1
server:
listen: ":8080"
admin:
capabilityRootKey: "${CAPABILITY_ROOT_KEY}"
lightning:
provider: "${LIGHTNING_BACKEND}"
config:
connectionString: "${NWC_CONNECTION_STRING}"
upstreams:
api:
url: "http://localhost:3000"
routes:
- name: public-health
match:
pathPrefix: /health
upstream: api
policy:
kind: public
- name: protected-api
match:
pathPrefix: /api/
upstream: api
policy:
kind: capability
scope: "api:read"
- name: premium-api
match:
pathPrefix: /premium/
upstream: api
policy:
kind: l402
priceSats: 100
Policy Types
| Policy | Description | Use Case |
|---|---|---|
public | No authentication | Health checks, docs, webhooks |
capability | Requires valid Macaroon | Protected API endpoints |
l402 | Requires Lightning payment | Monetized endpoints |
How It's Different
| SatGate | Routing Gateways | Traditional API Gateways | |
|---|---|---|---|
| Primary concern | Economic governance | Provider routing | Traffic management |
| Budget enforcement | Hard caps (blocked at limit) | Soft alerts only | β |
| MCP cost attribution | Per-tool granularity | β | β |
| Credential model | Macaroons (delegatable) | API keys | API keys / OAuth |
| Agent delegation | Sub-tokens with reduced budgets | β | β |
| Micropayments | L402 Lightning-native | β | β |
| Works alongside | β | β Use together | β Use together |
Architecture
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SatGate β
β β
β Request β Route Match β Policy Check β Proxy β
β β β
β ββββββββββββββββΌβββββββββββββββ β
β β β β β
β [public] [capability] [l402] β
β pass verify token verify β
β check budget payment β
β log MCP tool + token β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
Key Concepts:
- Macaroons: Bearer tokens with embedded caveats (expiry, scope, budget, IP). Not API keys β they support delegation without server roundtrips.
- Delegation: Agent A gives Agent B a sub-token with reduced permissions and a $50 budget cap. B can't escalate.
- MCP Parsing: SatGate reads MCP JSON-RPC payloads to attribute costs to specific tool calls, not just HTTP endpoints.
- L402: HTTP 402 + Lightning invoice for machine-to-machine payments. The protocol for the agent economy.
SDKs
| Language | Package | Docs |
|---|---|---|
| Python | pip install satgate | README |
| JavaScript | npm install satgate-sdk | README |
MCP Proxy (NEW)
SatGate now includes a native MCP proxy that governs tool calls for any MCP-compatible agent:
# Run MCP proxy with 1000-credit budget
satgate-mcp --config satgate-mcp.yaml
- Budget enforcement: Hard 402 when agents exhaust their allocation
- Delegation: Parent agents mint sub-agent tokens with carved budgets
- Per-tool costs:
web_search: 5,dalle_generate: 50(wildcard patterns supported) - Two transports: stdio (local sidecar) or SSE/HTTP (remote multi-agent)
- Three auth modes: none, static token, macaroon (HMAC chain)
See pkg/mcpserver/README.md for full documentation.
Documentation
- Architecture Overview
- Quick Start Guide
- Configuration Reference
- Production Checklist
- Kubernetes Deployment
- LangChain Integration
- MCP Gateway Guide
βοΈ SatGate Cloud & Enterprise
Self-hosting not your thing? SatGate Cloud is the fully managed version β same gateway, zero ops.
The open-source gateway handles protection and payments. SatGate Cloud adds the control plane:
- π Observe β Real-time dashboards, usage attribution, cost center tagging
- ποΈ Control β Budget enforcement with Fiat402 (enterprise credits)
- π€ SatGate Mint β Zero-touch agent provisioning (K8s, AWS, OIDC)
- π’ Multi-tenant β Team isolation, RBAC, SSO/SCIM
- π Audit β Tamper-evident logging, compliance exports
Start Free β (Observe mode is free, unlimited, forever)
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
git clone https://github.com/satgate-io/satgate.git
cd satgate
go mod download
go test ./...
go build -o satgate ./cmd/satgate
License
Apache License 2.0 β see LICENSE for details.
Links
- π satgate.io β Website
- π Blog β Technical articles
- π’ Enterprise Governance β CISO/CFO/CTO use cases
- π° Pricing β Free Observe tier, Pro for enforcement
- π Security Model β Architecture & compliance
- π§ͺ Sandbox β Try without signup
- π ROI Calculator β Estimate savings
- βοΈ Compare β SatGate vs Zuplo, Bifrost, cloud-native
- π§ [email protected]
Built with β‘ by SatGate β The Economic Firewall
Verwandte Server
Alpha Vantage MCP Server
SponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Fossil MCP
The code quality toolkit for the vibe coding era.
Kinsta MCP
Model Context Protocol (MCP) server for Kinsta WordPress hosting
SSE MCP Server Example
An example MCP Server demonstrating Server-Sent Events (SSE) usage.
MCP Sandbox
An interactive sandbox to safely execute Python code and install packages in isolated Docker containers.
Foundry MCP Server
A lightweight MCP server for Solidity development using the Foundry toolchain (Forge, Cast, and Anvil).
Arch Tools
53 production-ready AI tools via MCP with x402 USDC payments on Base L2 β web scraping, crypto data, AI generation, OCR, and more.
HandMirrorMcp
A Model Context Protocol (MCP) server for .NET assembly and NuGet package inspection
jarp-mcp
Java Archive Reader Protocol MCP server - Give AI agents X-ray vision into compiled Java code by decompiling JAR/WAR/EAR files and Maven/Gradle dependencies
VS Code Settings MCP Server
Programmatically manage Visual Studio Code settings using AI assistants and automated tools.
Aki Design Assistant
Assists with aki-ui component development and usage.