SimRelay MCP Server

SimRelay MCP Server

Enables AI agents to manage SimRelay SIMs: list, lock, release, read SMS history, and stream incoming messages in real-time via WebSocket.

Category
访问服务器

README

SimRelay MCP Server

An MCP server that lets AI agents work with SimRelay SIMs: list them, lock and release them, read message history, and stream incoming SMS in real time over WebSocket.

Built for Claude Desktop, Claude Code, Cursor, and any other MCP-compatible client.

Tools

Tool What it does
simrelay_login Open a browser to sign in to SimRelay (run on first use)
simrelay_logout Forget saved tokens
list_sims List every SIM the user can access (id, phone number, status, country, provider, lock state, …)
lock_sim Acquire an exclusive lock on a SIM by hosted_sim_id
release_sim_lock Release a lock — idempotent
get_sim_messages Paginated SMS history for a SIM (page, per_page up to 100)
subscribe_to_messages Open a WebSocket subscription; new SMS are pushed to the MCP client as notifications/message (logger simrelay-sms)
unsubscribe_from_messages Stop the WebSocket subscription

See docs/tools.md for full input/output schemas and examples, and docs/realtime.md for how the real-time stream works.

Install

As a Claude Desktop extension (recommended)

Install the bundled .mcpb extension. The first time you ask the assistant to do anything with SimRelay, it will call simrelay_login, which opens your browser. Sign in once; tokens persist to ~/.config/simrelay-mcp/tokens.json (chmod 0600) and refresh automatically.

As an npm package (Claude Code / Cursor / generic MCP)

npm install -g simrelay-mcp-server

Claude Code:

claude mcp add simrelay -- simrelay-mcp

Generic MCP client: configure an stdio server with command simrelay-mcp. From inside any conversation, ask the assistant to "log in to SimRelay" — or run simrelay-mcp login in a terminal beforehand.

Configuration (advanced)

End users don't need to set anything — the OAuth client ID is baked into the build. The following env vars are available for development and self-hosted deployments:

Env var Default Notes
SIMRELAY_OAUTH_CLIENT_ID built-in Override the bundled OAuth client (dev/staging only).
SIMRELAY_API_BASE_URL https://simrelay.com Point at staging or a self-hosted instance.
SIMRELAY_OAUTH_SCOPES mobile:device Space-separated scopes.
SIMRELAY_TOKEN_FILE ~/.config/simrelay-mcp/tokens.json Override token storage path.

See docs/configuration.md for the full reference.

Real-time messages

After calling subscribe_to_messages, each new SMS is delivered to the MCP client as an info-level logging notification with the structured payload:

{
  "event": "sms.received",
  "sim_id": 42,
  "from": "+491701234567",
  "text": "Your verification code is 123456",
  "received_at": "2026-05-12T10:00:00Z",
  "raw": { /* full SimRelay event payload */ }
}

In Claude Desktop these surface inline in the conversation. Agents can react to them within the same session — e.g. extract an OTP and submit it. Details: docs/realtime.md.

CLI

simrelay-mcp          Start the MCP server on stdio (default)
simrelay-mcp login    Sign in with SimRelay via OAuth (opens browser)
simrelay-mcp logout   Forget saved tokens
simrelay-mcp help     Show help

Security

  • Credentials never travel through tool arguments. OAuth happens out-of-band in your browser; tokens stay on disk.
  • Token file is created with 0600 permissions on POSIX (~/.config/simrelay-mcp/tokens.json by default).
  • All requests use Authorization: Bearer <access_token>. Tokens are refreshed automatically before expiry.

Development

git clone https://github.com/simrelay/mcp.git
cd mcp
npm install
npm run build
npm test                # node:test suite
npm run dev             # tsx watch entry point

See CONTRIBUTING.md for how to develop against a personal SimRelay OAuth client without any secrets.

Troubleshooting

  • **Not authenticated. Run \simrelay-mcp login` first.** — your token file is missing or empty. Run simrelay-mcp login`.
  • Token refresh failed: 401 — your refresh token expired or was revoked. Run simrelay-mcp logout && simrelay-mcp login.
  • SIMRELAY_OAUTH_CLIENT_ID is not set — export the env var before starting the server / running login.
  • Browser does not open during login — the URL is printed to stderr. Copy it into a browser manually.
  • WebSocket disconnects repeatedly — the server auto-reconnects with exponential backoff (5s → 60s). If it never reaches READY, check that the registered OAuth scopes include broadcasting permissions.

License

ISC

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选