
tierproxy
io.github.tierproxy由 GitHub 账号 tierproxy 发布v0.4.0更新于 Oct 24, 2026
Multi-provider proxy infrastructure for AI/ML. Geo, sessions, cost-aware routing, usage tools.
概览
TierProxy 的本地 MCP 服务器让助手通过多供应商代理抓取网址,支持地理定位、会话、成本感知路由和用量查询。
- 可以做什么
- 通过代理抓取网页,可指定国家并使用固定会话 ID 支持多步爬取。按最便宜、最快、最可靠或均衡的可用上游路由每个请求。查看网关健康状态与上游情况。查询用量与剩余配额,并支持实时用量流。设置月度预算等成本护栏,在超支前拦截请求。
- 适用场景
- 适合需要借助轮换或地理定位代理基础设施抓取网页、在爬取过程中保持会话,或在 Claude Desktop、Cursor、Cline、Windsurf 等聊天客户端中查看代理成本与配额的场景。
- 运行要求
- 以 tierproxy-mcp 命令通过 stdio 在本地运行,需从 PyPI 安装 mcp 附加包(pip install tierproxy[mcp])。需要在 TIERPROXY_API_KEY 环境变量中提供 TierProxy API 密钥。README 说明网关为预览版,实际使用需邀请或加入等候名单。
安装
在 SourceWeft 中
- 打开 控制台中的 tierproxy,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
tierproxy — Python SDK
🚧 Preview release. Gateway is not yet generally available. Join the waitlist at [email protected]. SDK is functional but
tierproxy doctoragainst a live gateway requires invitation.
[PyPI version] [Python versions] [Downloads] [CI] [codecov] [License: Apache 2.0] [OpenAPI 3.1] [MCP compatible]
Premium multi-provider proxy infrastructure for AI/ML pipelines. Built for engineers who measure cost, latency, and success rate twice — and write Python.
Install
Quickstart — five-second flavor
That's it. (Set TIERPROXY_API_KEY env var first.)
Three lines, persistent session
Auto-pick the cheapest healthy upstream every request
Cost guardrails
Power-user knobs
Raw modes (Playwright, curl, etc.)
Error handling
Every SDK error inherits from tierproxy.TierProxyError and carries a
request_id for support escalation:
See Errors reference for the full HTTP-status-to-exception mapping.
AI agent integration
The SDK exposes its response models as JSON Schema and as pre-built tool definitions for Anthropic Claude and OpenAI function-calling:
See the AI integration guide
and the MCP server in
examples/mcp_claude_desktop.md.
How tierproxy compares
Features
- Five-second quickstart —
import tierproxy; tierproxy.get(url, country="US") - Layered API — five integration levels from one-liner to power-user knobs
- Smart routing —
routing="cheapest"auto-picks healthy upstream per request - Cost guardrails —
monthly_budget_usd=refuses requests that would exceed budget - Per-request cost attribution —
client.cost_for(resp)returns USD; lazy 30s cache, no per-request overhead - Client-side response caching —
cache_ttl=300, cache_max_response_size=262144LRU with size cap - Multi-provider auto-failover —
auto_failover=Trueretries with next-best upstream on 429/5xx - Rate-limit learning —
client.rate_limits.get()surfaces gateway-aggregated 429s per target domain - JA3/JA4 TLS rotation — per-upstream fingerprint randomization (gateway side; see tls-fingerprint guide)
- Cookie persistence — cookies stick to
session_idacross multi-step crawls - Streaming responses —
client.get(url, stream=True)returns iterator (large files, SSE) - Live SSE stream —
for delta in g.usage.stream()tails month-to-date bytes - MCP server —
tierproxy-mcpexposes proxy as tools to Claude/Cursor/Cline - 8 framework integrations — LangChain, LlamaIndex, Crawl4AI, Playwright, Firecrawl, Browser-Use, CrewAI
- OpenTelemetry opt-in —
pip install tierproxy[otel]for distributed tracing - Geo + sticky sessions — countries, cities, 1-1440min session pins
- Dual URL syntax — headers (httpx/requests) AND username-encoding (Playwright)
- Type-safe end-to-end — Pydantic v2 models, mypy strict, full IDE autocomplete
See examples/ for LangChain/LlamaIndex/Crawl4AI/Playwright and
examples/levels.py for a runnable demo of every level.
Use with your favorite AI/agent framework
MCP server (Claude Desktop / Cursor / Cline / Windsurf)
Then add to your MCP client config:
Now your AI assistant can call fetch_url(url, country="US"), inspect health
and usage, and route through the cheapest healthy upstream — no glue code,
no httpx imports, no boilerplate.
来源:README.md,提交 f168da1
工具
0版本历史
1- v0.4.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分