卫星门代理
预算强制的MCP代理——严格限制你的AI代理工具的支出。
MCP服务器是开放式的。每 tools/call 这需要花钱,而且没有内置的支出限制。 satgate-proxy 位于MCP客户端(Claude Desktop、Cursor)和服务器之间,强制执行硬预算上限。
零依赖。仅内置Node.js。 npx 然后走。
快速启动-本地模式(v0.3.0中的新功能)
没有服务器,没有API密钥,没有帐户。正在执行的预算:
npx satgate-proxy --local --budget 5.00 \
--server @modelcontextprotocol/server-google-search或者使用配置文件:
# satgate.yaml
server: @modelcontextprotocol/server-google-search
budget: 5.00
mcp_pricing:
web_search: 5
dalle_generate: 50
'*': 1npx satgate-proxy --local --config satgate.yamlClaude桌面配置(本地模式):
{
"mcpServers": {
"google-search": {
"command": "npx",
"args": [
"satgate-proxy",
"--local", "--budget", "5.00",
"--server", "@modelcontextprotocol/server-google-search"
]
}
}
}不需要环境变量。没有账户。只是一个预算上限。
SaaS模式(团队和企业)
对于L402 macarons的服务器端执行:
{
"mcpServers": {
"google-search": {
"command": "npx",
"args": [
"satgate-proxy",
"--cap", "5.00",
"--server", "@modelcontextprotocol/server-google-search"
],
"env": {
"SATGATE_API_KEY": "your_macaroon_here"
}
}
}
}获取API密钥: cloud.satgate.io.
运作原理
本地模式
┌──────────────┐ stdio ┌────────────────┐ stdio ┌──────────────┐
│ Claude │ ──── JSON-RPC ──▶ satgate-proxy │ ──── JSON-RPC ──▶ MCP Server │
│ Desktop │ ◀── JSON-RPC ── │ (budget gate) │ ◀── JSON-RPC ── │ (child proc) │
│ / Cursor │ └────────────────┘ └──────────────┘
└──────────────┘ ↑ intercepts tools/call
↑ deducts from budget
↑ blocks when exhausted代理将您的MCP服务器作为子进程生成,拦截每个 tools/call,根据每个工具的定价从预算中扣除,并在预算用完时阻止通话。
SaaS模式
┌──────────────┐ stdio ┌────────────────┐ SSE/HTTP ┌──────────────┐
│ Claude │ ──── JSON-RPC ──▶ satgate-proxy │ ──── JSON-RPC ──▶ SatGate │
│ Desktop │ ◀── JSON-RPC ── │ (this package) │ ◀── JSON-RPC ── │ MCP Proxy │
│ / Cursor │ └────────────────┘ │ + Budget │
└──────────────┘ │ Enforcement │
└──────┬───────┘
│
┌──────▼───────┐
│ MCP Server │
│ (hosted) │
└──────────────┘配置文件(satgate.yaml)
您可以使用配置文件代替CLI标志:
# satgate.yaml
server: @modelcontextprotocol/server-google-search
budget: 5.00
mcp_pricing:
web_search: 5 # 5 cents per search
dalle_generate: 50 # 50 cents per image
'*': 1 # 1 cent default for unlisted tools定价在 分The '*' 通配符为任何未明确列出的工具设置默认成本。
CLI标志
| 标志 | 描述 | 默认值 |
|---|---|---|
| `--server | ||
| ` | MCP服务器包到代理(必需) | -- |
--local | 在本地模式下运行(不需要SatGate服务器) | 关闭 |
--budget | 美元预算上限(本地模式) | 无限制 |
| `--config | ||
| ` | 通往 satgate.yaml 配置文件 | -- |
--cap | 预算上限(美元)(SaaS模式) | -- |
--endpoint | SatGate代理端点 | https://satgate-mcp-saas.fly.dev |
--key | API密钥(或 SATGATE_API_KEY env) | |
--verbose | 调试日志记录到stderr | off |
-h, --help | 显示帮助 | -- |
为什么?
MCP允许AI代理直接访问付费API——搜索、代码执行、数据库,应有尽有。没有内置的支出限制。一个逃跑的特工可以在几分钟内烧掉数百美元。
卫星门代理 添加了一个硬帽:
- 本地模式:设置
--budget 5.00→ 代理人最多可以花费5美元,在过程中强制执行 - SaaS模式:设置
--cap 5.00→ 使用L402 macarons在服务器端强制执行 - 零依赖--
npx立即运行它
零依赖
此包仅使用Node.js内置(child_process, http, https, fs).不 node_modules,无安装步骤。 npx satgate-proxy 只是工作。
链接
- 🌐 satgate.io --主页
- ☁️ cloud.satgate.io -仪表板和API键
- 📦 --源代码
- 📋 MCP规范 --模型上下文协议
许可证
麻省理工学院
