
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 分