elsewhere

elsewhere

MCP server that provides coding agents with scoped, temporary network egress sessions, enabling requests to exit from specified locations without changing the host's connection. It verifies egress, prevents leaks, and supports multiple adapters like gluetun and SSH.

Category
访问服务器

README

elsewhere

Give your coding agent a network location of its own.

Your agent is working through a task and hits something it cannot reach. A page that's gated by region. An API restricted to certain IPs. A dashboard that only answers requests from where the company actually operates. The agent stops, and the work becomes yours again: change your VPN, take your whole machine with it, do the rest by hand.

That doesn't scale past one thing at a time, and it can't run unattended.

elsewhere is an MCP server that hands an agent a scoped, temporary network egress session — a loopback proxy URL that exits from wherever you choose. The agent keeps going. Your machine's connection never moves.

> agent: this endpoint isn't reachable from here — opening a session and retrying

session 4f2a91c3 · via gluetun
  proxy   http://elsewhere:••••@127.0.0.1:11080
  egress  203.0.113.44 (Singapore)
  ttl     900s

HTTP 200 · 41288 bytes · 812ms

The one design rule

It routes the request, not the process.

There is no host route change, no exported HTTPS_PROXY, no system VPN state. A session is a proxy URL and the resources behind it. Traffic goes through it only when something is deliberately pointed at it.

For agents this is the whole ballgame. Put the process behind a tunnel and the agent's own control-plane traffic goes too — model API calls, telemetry, package installs. That is slow, it trips abuse heuristics, and it makes every failure impossible to attribute. elsewhere moves one request at a time and leaves everything else alone.

It also means the agent can hold sessions in several places at once, and reach each one independently, without any of them interfering.

Why not just change your VPN

Because a VPN client is a global switch, and an agent needs a local one:

VPN client elsewhere
Scope Whole machine One request
Your IP Moves Unchanged
Concurrent locations One Many
Agent's API traffic Through the tunnel Untouched
Unattended No Yes
Verified You hope Checked, fails closed

What makes a session trustworthy

An agent will believe whatever the tool tells it, and act on it for the rest of the task. So a session is verified before you're allowed to use it, and re-verified while you hold it:

  • Egress is observed, not assumed. The session reports the IP and country traffic actually came out of, over HTTPS only — a plaintext check could be forged by the very party carrying the traffic.
  • Leak detection fails closed. If a session's egress IP equals your host's, the tunnel isn't carrying traffic — you get an error, not a session. A silently-failed proxy is otherwise indistinguishable from a working one, and the agent records a confident conclusion drawn from the wrong place.
  • Location assertion. Set expectCountry and a provider that quietly lands you somewhere adjacent is caught rather than trusted.
  • Re-verified in use. Tunnels reconnect on their own, sometimes elsewhere. A session that moved is closed with a warning that earlier results may be misattributed — not silently relabelled.
  • Stale URLs fail loudly. Every session carries its own credentials, so a proxy URL an agent cached from an earlier session cannot quietly start exiting somewhere else.
  • Everything expires. Sessions self-destruct on a TTL. Agents forget to clean up, and a tunnel that outlives its task is both a cost leak and a correctness hazard.

Bring your own exit

elsewhere is a router, not a VPN. It has no network of its own and never will. It drives whatever you already have:

Adapter Backend Needs
gluetun Any gluetun-supported VPN provider Docker + your subscription
ssh Any box you own, via ssh -D An SSH host. No VPN, no Docker, no root.
upstream Datacenter/residential proxies, corporate proxies A proxy URL

Provider-agnostic is the point. A VPN vendor's own tooling drives that vendor and flips your entire machine. This drives all of them, scoped, and verifies the result.

Install

npm install && npm run build

cp .env.example .env                                   # credentials
cp elsewhere.config.example.json elsewhere.config.json # regions

Requires Node ≥22.19. Edit .env with your provider's credentials, then define the regions you want in elsewhere.config.json. Config references secrets as ${VAR} so it stays committable — .env and elsewhere.config.json are both gitignored.

Use it from an agent

Add to your MCP client (.mcp.json, Claude Code, Cursor, …):

{
  "mcpServers": {
    "elsewhere": {
      "command": "node",
      "args": ["/absolute/path/to/elsewhere/dist/mcp.js"]
    }
  }
}

Seven tools: elsewhere_regions, elsewhere_open, elsewhere_fetch, elsewhere_compare, elsewhere_status, elsewhere_close, elsewhere_host_egress.

A typical agent flow is: discover regions → open one → fetch → close. Or skip straight to elsewhere_fetch with a region id and it handles the session for you.

Anything that speaks HTTP proxy can use a session directly:

curl -x "$PROXY_URL" https://example.com
await chromium.launch({ proxy: { server: proxyUrl } });

CLI

elsewhere check                      # what does this machine look like right now?
elsewhere regions                    # what's configured?
elsewhere fetch <region> <url>       # open, fetch, tear down
elsewhere open <region>              # hold a session; use the printed proxy elsewhere
elsewhere compare <url>              # fetch from every region and diff the results
elsewhere servers <provider> <term>  # exact location names a provider offers
elsewhere update-servers <provider>  # refresh the provider server catalogue
elsewhere reap                       # clean up containers left by a crash

compare — one request, every location, diffed

$ elsewhere compare https://example.com/pricing

  host       HTTP 200      14204B    291ms
  sg         HTTP 200      14891B    843ms   203.0.113.44 (Singapore)
  br         UNREACHABLE (connect timeout)      0B  30001ms
  de         HTTP 200      14204B    412ms   198.51.100.9 (Frankfurt)

  3 distinct responses:
    · reachability — host+sg+de: HTTP 200 | br: failed (connect timeout)
    · currencies — host+de: EUR | sg: SGD

Two details that make it useful rather than noisy:

  • Your untunnelled connection is a control row. Without one you cannot tell "blocked from there" from "broken for everyone" — the most common misdiagnosis in this kind of work.
  • Bodies are normalised before hashing (nonces, UUIDs, timestamps stripped). Without that, no two responses from a modern site ever compare equal and every report says "everything differs".

Troubleshooting

If a tunnel hangs, refresh the server list first:

elsewhere update-servers <provider>

Providers rotate their fleets, and the catalogue baked into the gluetun image goes stale. The resulting failure is genuinely misleading: the tunnel starts, the proxy binds, and connections then hang against addresses the provider retired months ago. Nothing in that sequence points at the server list.

Related: location names must match the provider's catalogue exactly. An unrecognised value is a silent fallback, not an error — you end up in a perfectly working tunnel in the wrong place. elsewhere servers <provider> <term> prints the exact strings.

Security

Every session's proxy carries its own random credentials, embedded in the URL it hands you. That is not primarily about keeping local processes out — it is so a stale proxy URL fails loudly. Ports get reused, so a URL captured from an earlier session, cached by an agent or written into a config, would otherwise keep working while exiting somewhere else entirely, with nothing reporting an error. Now it gets a 401/407.

The proxy is still not a hard authorisation boundary — the credential lives in a URL the agent and your terminal can both see. Treat it as you would any local development proxy.

Private, loopback, link-local and cloud-metadata destinations are denied by default and re-checked on every redirect hop. Assume the agent driving this will be prompt-injected by a page it fetches; a tunnel grants reachability it did not otherwise have, and with the ssh adapter that includes the exit host's entire internal network. Override deliberately with ELSEWHERE_ALLOW_PRIVATE=1.

To report a vulnerability, see SECURITY.md.

Scope and intent

This exists so that developers and their agents can reach things they are entitled to reach, and check how their own applications behave for users elsewhere.

It is deliberately not a circumvention product: it ships no proxy network, no bundled exit nodes, and no evasion features. You supply your own egress, and you are responsible for your provider's terms and the terms of the services you access. Automated traffic over consumer VPN subscriptions breaches some providers' terms — check yours. Residential proxy networks raise real consent questions about whose connections you are borrowing.

CONTRIBUTING.md lists what is out of scope, as settled decisions rather than open questions.

Status

Early, but proven end-to-end. The origin case was an agent that could not reach a service gated to one country: an agent opened a session over MCP, fetched the record, and tore the session down — with the host connection unchanged throughout.

Working: session lifecycle, all three adapters, leak and location verification, re-verification in use, destination policy, compare, server-list refresh, CLI, MCP server.

The codebase has been through two independent adversarial audits and a live fault-injection pass — credential exposure, traffic leaks, lifecycle, concurrency. Findings are fixed; the git history describes each one and why it mattered. The ssh adapter is covered by tests but has not yet been run against a real SSH host.

Contributing

Provider recipes are the most valuable contribution — every user brings a different exit, and that is where nearly all the friction lives. Please read CONTRIBUTING.md first.

Licence

Apache-2.0.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选