Budget, payment and audit controls for AI agent API calls and MCP tool calls.
One address for any MCP client. Your key stays in your Odel vault.
At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Odel could not list its tools without signing in.
Observe, control and admit AI agent traffic
Every allow or deny comes with a signed receipt
Why • Build • Features • Quick Start • Docs • Website • Blog
SatGate is a gateway in front of APIs and MCP tools. It meters agent and MCP traffic (Observe), enforces owner budgets before work runs (Control), and charges external agents on the routes you choose (Admit; the Charge policy in the dashboard). Every allow or deny comes with a signed receipt.
Try it as an agent. This hosted route returns HTTP 402 with a Lightning invoice and a macaroon. The price is 10 sats, and one payment buys access until the credential_expires_at time in that response, not just one request:
curl -i -H "X-SatGate-Tenant: satgate-demo" https://api.satgate.io/paid/agent-demo
Agent instructions are in llms.txt.
SatGate's developer primitive is three calls: issue(), pay(), and verify().
import os
from satgate import SatGate
satgate = SatGate(api_key=os.getenv("SATGATE_API_KEY"))
capability = satgate.issue(
task="research market prices",
agent="research-agent",
allow=["mcp:web.search", "api:prices.read"],
budget_usd=25,
expires_in="1h",
)
receipt = satgate.pay(
upstream="https://api.example.com/search",
capability=capability,
max_usd=4.20,
)
verified = satgate.verify(receipt)
print(verified.decision, verified.evidence_pack_id)
Install today:
pip install satgate
npm install @satgate/sdk
The public packages install today; the issue/pay/verify API namespace is in private beta. Calls without private-beta access raise a structured error instead of returning fake receipts:
SatGateAuthError: This API namespace requires private beta access. Visit cloud.satgate.io/docs to request access.
Runnable examples:
examples/python/issue_pay_verify.pyexamples/node/issue-pay-verify.mjsWorks with: MCP · OpenAI tools · Anthropic tools · LangChain · CrewAI · Raw HTTP
Managed SaaS — zero setup, multi-tenant isolation, enterprise dashboard.
Free Observe tier. No credit card required.
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 have authority to spend, delegate, or invoke this paid resource?"
✓ Network Firewall → "Can this packet enter?"
✓ Application Firewall → "Is this request safe?"
? Economic Firewall → "Should this agent act, spend, or pay?"
That's the gap. SatGate fills it.
SatGate is an Economic Firewall for AI agent requests. Drop it in front of your APIs and MCP tools to enforce scoped authority, budgets, paid-rail context, and Evidence Pack receipts before agents act.
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 authority, policy, budget, and paid-rail context.
Use them together:
Agent → SatGate (economic governance) → Routing Gateway → LLM Providers
search_database and $12 on send_email — not just "1,000 requests."# Run from a clone. The example config is examples/gateway.yaml in this repo.
# macOS Apple Silicon. Other v0.5.2 assets: satgate-darwin-amd64, satgate-linux-amd64,
# satgate-linux-arm64, satgate-windows-amd64.exe
git clone https://github.com/SatGate-io/satgate.git
cd satgate
curl -L https://github.com/SatGate-io/satgate/releases/download/v0.5.2/satgate-darwin-arm64 -o satgate
chmod +x satgate
# Mock Lightning. Demo mode prints:
# SECURITY WARNING: Using ephemeral root key. Set CAPABILITY_ROOT_KEY for production use.
# That warning is expected. Tokens do not persist across restarts.
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_CAPABILITY_TOKEN" \
http://localhost:8080/api/capability/ping
# 3. Paid — get a payment challenge (L402 today; x402/other rails as governed context)
curl http://localhost:8080/api/micro
Public → Protected → Paid. Three policies, one gateway; paid rails are governed context, not the product boundary.
Hosted paid demo (Admit; Charge in the dashboard). No local Lightning node:
curl -i -H "X-SatGate-Tenant: satgate-demo" https://api.satgate.io/paid/agent-demo
Unpaid calls return 402 with a Lightning invoice and a macaroon. The price is 10 sats, and one payment buys access until the credential_expires_at time in that response, not just one request. For Lightning, show the invoice to the owner, poll payment status, then retry. Poll rules are in llms.txt.
# Release binary. ghcr.io/satgate-io/satgate:latest is private; anonymous pulls get 401.
# Assets: satgate-darwin-arm64, satgate-darwin-amd64, satgate-linux-amd64,
# satgate-linux-arm64, satgate-windows-amd64.exe
curl -L https://github.com/SatGate-io/satgate/releases/download/v0.5.2/satgate-darwin-arm64 -o satgate
chmod +x satgate
# Build from source
git clone https://github.com/SatGate-io/satgate.git
cd satgate && go build -o satgate ./cmd/satgate
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 # paid-rail policy; use payment_context to preserve L402/x402/ledger evidence
priceSats: 100
| Policy | Description | Use Case |
|---|---|---|
public | No authentication | Health checks, docs, webhooks |
capability | Requires valid Macaroon | Protected API endpoints |
l402 | Requires Lightning payment and records paid-rail context | Monetized endpoints; x402/ledger context can be preserved in Evidence Packs |
| 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 | ❌ | ❌ |
| Paid-rail governance | L402, x402, API-key billing, enterprise ledgers | ❌ | ❌ |
| Works alongside | — | ✅ Use together | ✅ Use together |
┌──────────────────────────────────────────────────┐
│ SatGate │
│ │
│ Request → Route Match → Policy Check → Proxy │
│ │ │
│ ┌──────────────┼──────────────┐ │
│ │ │ │ │
│ [public] [capability] [paid rail] │
│ pass verify token verify │
│ check budget payment │
│ log MCP tool context │
└──────────────────────────────────────────────────┘
Key Concepts:
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
web_search: 5, dalle_generate: 50 (wildcard patterns supported)See pkg/mcpserver/README.md for full documentation.
Self-hosting not your thing? SatGate Cloud is the fully managed version — same gateway, zero ops.
The open-source gateway handles protection, budgets, and paid-rail enforcement. SatGate Cloud adds the control plane:
Start Free → (Observe is free, up to a fair-use cap)
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
Apache License 2.0 — see LICENSE for details.
Built with ⚡ by SatGate — The Economic Firewall