SatGate – Economic Firewall for AI Agents

io.github.SatGate-io由 GitHub 账号 SatGate-io 发布v0.5.0更新于 Oct 24, 2026

Budget, payment and audit controls for AI agent API calls and MCP tool calls.

已验证SSE可网页运行金融开发者工具安全与监控

概览

AI 生成的概览

SatGate 为 AI 智能体的 API 与 MCP 工具调用提供预算、支付策略和每次允许或拒绝的签名回执。

可以做什么
SatGate 是部署在 API 和 MCP 工具前的网关。它计量智能体与 MCP 流量,在任务执行前执行所有者预算,并可对选定路由的外部智能体收费,每次允许或拒绝都会生成签名回执。它能解析 MCP JSON-RPC 工具调用,按工具归集成本,并支持可委派、可缩减预算的 macaroon 能力令牌。路由可采用 public、capability 或付费通道策略。
适用场景
当自主智能体调用付费 API 或 MCP 工具,且你需要硬性预算上限、按工具的成本归集或子智能体权限委派时适用。它适合希望在路由网关之外再加一层经济治理的团队。
运行要求
可使用托管的远程端点,或本地 npm 桥接包(stdio)。认证基于 OAuth;远程连接需要 SATGATE_URL 和 Authorization 请求头中的 bearer 令牌,本地桥接需要 SATGATE_TOKEN 环境变量。令牌在 SatGate Cloud 中签发。issue/pay/verify SDK 接口目前处于私有测试阶段。
安装前请注意
该服务器涉及凭据:SATGATE_TOKEN 和 Authorization bearer 令牌属于机密,应限定权限并定期轮换。预算达到上限会直接拦截请求,配置不当可能中断智能体工作。付费路由涉及真实的 Lightning 支付(例如演示中为 10 sats),支付流程应由所有者确认。使用托管路由时,流量与成本数据会发送至 SatGate Cloud。

安装

在 SourceWeft 中

  1. 打开 控制台中的 SatGate – Economic Firewall for AI Agents,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 SSE。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.SatGate-io%2Fsatgate/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "satgate-economic-firewall-for-ai-agents": {
      "type": "sse",
      "url": "https://satgate-mcp-saas.fly.dev/sse"
    }
  }
}

README

[SatGate]

SatGate

Observe, control and admit AI agent traffic
Every allow or deny comes with a signed receipt

[CI Status] [Go Report Card] [Go Reference] [License]

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:

bash
curl -i -H "X-SatGate-Tenant: satgate-demo" https://api.satgate.io/paid/agent-demo

Agent instructions are in llms.txt.

Build Agents with SatGate

SatGate's developer primitive is three calls: issue(), pay(), and verify().

python
import osfrom 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:

bash
pip install satgatenpm 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:

text
SatGateAuthError: This API namespace requires private beta access. Visit cloud.satgate.io/docs to request access.

Runnable examples:

  • examples/python/issue_pay_verify.py
  • examples/node/issue-pay-verify.mjs

Works with: MCP · OpenAI tools · Anthropic tools · LangChain · CrewAI · Raw HTTP


🎬 See SatGate in Action

[Watch Explainer]  [Watch Delegation]


☁️ 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.

[Try SatGate Cloud]


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 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.

What is SatGate?

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

Features

  • 🛡️ Capability Tokens (Macaroons) — Cryptographic credentials with built-in caveats, delegation, and next-request 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_database and $12 on send_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.
  • ⚡ Paid-Rail Governance — Govern paid API access across L402, x402, API-key billing, and enterprise ledgers without making any one rail the control plane.
  • 🔒 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

bash
# 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.exegit clone https://github.com/SatGate-io/satgate.gitcd satgatecurl -L https://github.com/SatGate-io/satgate/releases/download/v0.5.2/satgate-darwin-arm64 -o satgatechmod +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-tokenexport LIGHTNING_BACKEND=mock./satgate --config examples/gateway.yaml

Try the three policies:

bash
# 1. Public — no auth neededcurl http://localhost:8080/health
# 2. Protected — mint a capability token, then use itcurl -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:

bash
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.

📖 Full Quick Start Guide →

Other Install Methods

bash
# 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.execurl -L https://github.com/SatGate-io/satgate/releases/download/v0.5.2/satgate-darwin-arm64 -o satgatechmod +x satgate
# Build from sourcegit clone https://github.com/SatGate-io/satgate.gitcd satgate && go build -o satgate ./cmd/satgate

Configuration

yaml
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 Types

PolicyDescriptionUse Case
publicNo authenticationHealth checks, docs, webhooks
capabilityRequires valid MacaroonProtected API endpoints
l402Requires Lightning payment and records paid-rail contextMonetized endpoints; x402/ledger context can be preserved in Evidence Packs

How It's Different

SatGateRouting GatewaysTraditional API Gateways
Primary concernEconomic governanceProvider routingTraffic management
Budget enforcementHard caps (blocked at limit)Soft alerts only❌
MCP cost attributionPer-tool granularity❌❌
Credential modelMacaroons (delegatable)API keysAPI keys / OAuth
Agent delegationSub-tokens with reduced budgets❌❌
Paid-rail governanceL402, x402, API-key billing, enterprise ledgers❌❌
Works alongside—✅ Use together✅ Use together

Architecture

┌──────────────────────────────────────────────────┐│                    SatGate                        ││                                                   ││  Request → Route Match → Policy Check → Proxy    ││                             │                     ││              ┌──────────────┼──────────────┐     ││              │              │              │      ││          [public]    [capability]   [paid rail]  ││          pass        verify token     verify     ││                      check budget     payment    ││                      log MCP tool     context    │└──────────────────────────────────────────────────┘

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.
  • Paid-rail context: SatGate treats L402, x402, API-key billing, and enterprise ledgers as rails to govern around. Evidence Packs preserve which rail was involved without making the rail the product.

SDKs

LanguagePackageDocs
Pythonpip install satgateREADME
JavaScriptnpm install @satgate/sdkREADME

MCP Proxy (NEW)

SatGate now includes a native MCP proxy that governs tool calls for any MCP-compatible agent:

bash
# Run MCP proxy with 1000-credit budgetsatgate-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

☁️ 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, budgets, and paid-rail enforcement. SatGate Cloud adds the control plane:

  • 📊 Observe — Real-time dashboards, usage attribution, cost center tagging
  • 🎚️ Control — Budget and policy enforcement before agent requests execute
  • 🤖 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 is free, up to a fair-use cap)

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

bash
git clone https://github.com/satgate-io/satgate.gitcd satgatego mod downloadgo test ./...go build -o satgate ./cmd/satgate

License

Apache License 2.0 — see LICENSE for details.

Links


Built with ⚡ by SatGate — The Economic Firewall

来源:README.md,提交 9c94681

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

1
  1. v0.5.0最新Sep 29, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分