
Litport Mcp
io.github.litportnet由 GitHub 账号 litportnet 发布v0.2.1更新于 Oct 26, 2026
MCP server for the Litport API: tokens, packages, pay-per-GB pools, geo targeting and proxy URLs.
概览
Litport 代理 API 的 MCP 服务器:查看令牌、用量、套餐与按流量计费池,调整令牌设置并生成代理连接 URL。
- 可以做什么
- 列出并查看代理令牌、凭据、带宽用量、位置与套餐
- 修改令牌的位置、轮换间隔,或申请新 IP
- 管理套餐的允许 IP 列表(整体设置、添加、删除)
- 列出按 GB 计费的池、可定位选项与账户余额
- 生成可直接使用的代理连接 URL,包括免密端点
- 检索 Litport 文档,并在本地解释代理错误码
- 适用场景
- 当你使用 Litport 代理订阅,希望助手在不打开控制台的情况下查询令牌、用量和套餐,调整位置或轮换,管理允许 IP,或拼装代理连接串时适用。
- 运行要求
- 通过 npx(Node.js)以 stdio 在本地运行。需要在 LITPORT_API_KEY 环境变量中提供 Litport API 密钥。可选 LITPORT_API_URL 覆盖 API 基础地址;可选 LITPORT_MCP_REVEAL_CREDENTIALS=1 使列表返回明文密码。需要访问 Litport API 的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Litport Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Litport MCP server
A Model Context Protocol server for the Litport API: inspect proxy tokens, usage, packages, and pay-per-GB pools/geo targeting; change a token's location, rotation interval, or get a new IP; manage a package's allowed-IP list; and build ready-to-use proxy connection URLs — directly from a coding agent or chat client.
The server cannot create, buy, renew, cancel, or disable a token or package, reset credentials, or spend account balance. It can change a token's location and rotation interval, request a new IP for a datacenter/ISP token, and add, remove, or set a package's allowed IPs.
Install and configure
Create an API key at litport.net/users/settings, then add the
server to your MCP client's config with LITPORT_API_KEY in its env block.
Claude Code
Or in .mcp.json:
Claude Desktop
Add the same block to claude_desktop_config.json under mcpServers:
Cursor
Add the same block to .cursor/mcp.json, or use Cursor's Settings → MCP → Add new MCP Server with
command npx -y @litportnet/litport-mcp and LITPORT_API_KEY in the environment variables field.
Credential exposure — two options
Proxy tokens carry a username/password pair. Putting every password from list_tokens into the
model's context by default is unnecessary exposure for a browse operation, so the server ships two
ways to reach a real password:
Either way, nothing is ever permanently unreachable — the default just keeps bulk listings out of the model's context until a specific token is named.
Tools
The read tools are annotated readOnlyHint: true, destructiveHint: false, idempotentHint: true.
Every write tool documents in its own description whether it changes something and whether it is
safe to repeat; get_new_ip is the one exception (idempotentHint: false) — see below.
Token location, rotation, and new IP
set_token_location sends only the keys you give it — region/city for a datacenter/ISP token,
or city/carrier for a mobile token — so give exactly one of those two shapes. It is safe to
repeat: resending the already-saved target is a no-op. A standard US Shared Mobile token allows this
once per 48 hours; on a 409 CHANGE_LIMIT the error carries nextChangeAt and a Retry-After
header, both of which the tool surfaces, so the model knows when it can try again instead of
retrying blindly.
set_rotation changes a token's rotation interval to one of its own rotation.options values, and
answers NOT_SUPPORTED when rotation.changeable is false (e.g. a Multi-location mobile token,
whose interval always follows its current phone).
get_new_ip requests a new IP for a datacenter/ISP token. On a static token it spends the weekly
allowance and is not safe to blindly retry: call get_token_location first and check
canChangeNow/nextChangeAt, because a second call inside the same week fails with
CHANGE_LIMIT rather than returning a second new IP. If a call's result is lost or ambiguous,
re-read get_token_location instead of calling it again.
On a rotating token it works at any time. The new IP is always different from the current one, and
the token's automatic timer restarts. Two calls must be at least the type's shortest rotation
interval apart (the smallest value in the token's rotation.options); inside that wait the call
fails with CHANGE_LIMIT, nextChangeAt and Retry-After. LOCATION_UNAVAILABLE means no other IP
qualifies right now: nothing changed, and the call still uses up the wait. After a lost result,
get_token_location cannot confirm the change (its canChangeNow/nextChangeAt are about the
location, not this wait). Calling again after Retry-After is harmless and just gives another new
IP; a CHANGE_LIMIT right after a lost result does not prove the change happened.
Package allowed-IP writes
The MCP server exposes set_allowed_ips (the whole list at once), add_allowed_ip, and
remove_allowed_ip for exact public IPv4 addresses. IPv6 is unsupported; contact support. They
identify an address by the IP itself — no address ID and no revision precondition. The latest
committed, successful call wins; adding an address already active, or removing one already absent,
is a no-op. remove_allowed_ip is marked destructive because it removes passwordless access from an
IP; set_allowed_ips is too, because an omitted address is removed. A package includes one IPv4
address or supports up to 50 with the add-on; contact support after reaching 50. The passwordless
endpoint itself lives on each token as ipAuth (list_tokens/get_token_credentials), not here.
build_proxy_url and the two token types
A pay-per-GB token is request-selected: build_proxy_url appends the pool, geo and session
segments to the username and picks the port matching the chosen protocol. A token with a saved pool
takes no pool argument and refuses a conflicting one; a token without a saved pool requires pool,
because the pool sets the price.
An unlimited token is assigned exactly one endpoint, so it takes no pool, geo or session
arguments — passing them is refused by name rather than silently producing a username the proxy
rejects, and no pools request is made for it at all. If its hub is no longer in service, the tool
says so instead of returning a broken URL. Passing passwordless: true on an unlimited token builds
a credential-free URL from its ipAuth endpoint instead — see add_allowed_ip first if ipAuth is
still null.
Parameters are validated against the published rules before anything is returned, so a malformed country slug or an out-of-range session lifetime is reported without spending a request.
Environment variables
Development
src/contracts.generated.js is generated from the web application's canonical contract modules and
is never hand-edited.
License
MIT
Contracts
src/contracts.generated.js vendors the proxy error reference and pay-per-GB parameter rules from
the Litport web application, so explain_proxy_error and build_proxy_url answer without a network
call. It is generated, not hand-edited, and a parity check in the application fails if the two ever
disagree. Regenerate with npm run generate-contracts from the copy inside the Litport
application repository, where the source contracts live.
来源:README.md,提交 da0ccec
工具
0版本历史
4- v0.2.1最新Oct 26, 2026
- v0.2.0Sep 30, 2026
- v0.1.3Sep 24, 2026
- v0.1.1Sep 21, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分