Ray notifications

io.github.gege-mn由 GitHub 帳號 gege-mn 發布v0.1.0更新於 Oct 24, 2026

Send email, push, Slack, Discord, Telegram and webhook notifications and manage templates with Ray.

已驗證Streamable HTTP可網頁執行效率與工作流溝通與協作

概覽

AI 產生的概覽

Ray 通知投遞 MCP 伺服器:讓助理傳送電子郵件、推播、Slack、Discord、Telegram 和 webhook 通知,並管理範本、投遞狀態、點擊統計和事件 webhook。

可以做什麼
查看 API 金鑰所屬工作區、金鑰 ID 和權限範圍,並讀取方案、訂閱狀態和本月配額用量。
適用情境
當你希望助理透過 Ray 傳送或測試通知、管理訊息範本、查看投遞狀態和點擊統計,或設定對外事件 webhook 時使用。
執行需求
需要 Ray 帳號和 API 金鑰(ck_live_...),讀取權限即可,傳送和修改還需寫入權限;需在控制台至少設定一個通道。可連線託管端點並使用 Authorization bearer 標頭,或在本機以 Node.js 18+ 執行 npm 套件並設定 RAY_API_KEY。需要能連線至 Ray 的網路。
安裝前請注意
此金鑰可存取你的 Ray 工作區,請勿提交到版本控制。寫入權限的工具會透過服務商實際傳送通知和測試訊息,建立、發布、封存和刪除範本,以及建立或刪除 webhook。建立 webhook 時簽章金鑰只回傳一次,輪替後舊金鑰立即失效。傳送會計入每月配額。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Ray notifications,將其新增到工作區。
  2. 連接 Authorization token 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.gege-mn%2Fray-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "ray-notifications": {
      "type": "http",
      "url": "https://ray-api.gege.mn/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

README

Ray MCP server

[npm] [CI] [MIT]

MCP server for Ray, the notification delivery API. It lets Claude, Cursor, VS Code, Windsurf, Codex, Zed and any other MCP client send notifications and manage templates, delivery webhooks and usage in your Ray workspace.

Ray here is the multi-tenant notification API from gege.mn (email via Amazon SES or SMTP, Firebase push, Slack, Discord, Telegram, SMS via Twilio or sendsms.mn, generic webhooks and an in-app feed). It is not the Ray distributed computing framework.

Hosted or local?

Ray runs an MCP server for you. There are two ways to connect, with the same tools:

Hosted (recommended)Local (this package)
What runsNothing on your machinenpx -y @gege-mn/ray-mcp, a stdio process
Endpointhttps://ray-api.gege.mn/mcp (Streamable HTTP)Bridges to the hosted endpoint
AuthAuthorization: Bearer <key> headerRAY_API_KEY environment variable
Use it whenYour client supports remote servers with custom headersYour client only runs stdio servers (e.g. Claude Desktop config file), or you prefer env vars over headers

This package is a thin bridge: it connects to the hosted endpoint with your key and mirrors its tool list, descriptions and instructions, so new tools appear without upgrading the package. All validation, scopes, rate limits and quota are enforced by Ray's API.

1. Get an API key

  1. Sign in at ray.gege.mn and open API keys.
  2. Create a key. It starts with ck_live_ and is shown only once.
    • read scope: status, templates, usage, docs.
    • write scope: also needed to send, create or change templates, and manage webhooks.
  3. Configure at least one channel in the dashboard under Channels. Channel credentials can't be created through the API or MCP.

The examples below use ck_live_... as a placeholder. Keep real keys out of version control.

2. Add Ray to your client

Claude Code

Hosted:

bash
claude mcp add --transport http ray https://ray-api.gege.mn/mcp --header "Authorization: Bearer $RAY_API_KEY"

Local:

bash
claude mcp add ray --env RAY_API_KEY=ck_live_... -- npx -y @gege-mn/ray-mcp

Add --scope user to make it available in every project. Check the connection with claude mcp get ray.

Claude Desktop

Edit claude_desktop_config.json (Settings → Developer → Edit Config; macOS ~/Library/Application Support/Claude/claude_desktop_config.json, Windows %APPDATA%\Claude\claude_desktop_config.json), then fully restart Claude Desktop:

json
{  "mcpServers": {    "ray": {      "command": "npx",      "args": ["-y", "@gege-mn/ray-mcp"],      "env": { "RAY_API_KEY": "ck_live_..." }    }  }}

Cursor

.cursor/mcp.json in a project, or ~/.cursor/mcp.json for all projects.

Hosted:

json
{  "mcpServers": {    "ray": {      "url": "https://ray-api.gege.mn/mcp",      "headers": { "Authorization": "Bearer ck_live_..." }    }  }}

Local:

json
{  "mcpServers": {    "ray": {      "command": "npx",      "args": ["-y", "@gege-mn/ray-mcp"],      "env": { "RAY_API_KEY": "ck_live_..." }    }  }}

Cursor can read the key from your environment instead: "Authorization": "Bearer ${env:RAY_API_KEY}".

VS Code (GitHub Copilot)

VS Code's mcp.json (.vscode/mcp.json in a workspace, or MCP: Open User Configuration) uses a top-level servers key and can prompt for the key so it isn't stored in the file:

json
{  "inputs": [    { "id": "ray-api-key", "type": "promptString", "description": "Ray API key (ck_live_...)", "password": true }  ],  "servers": {    "ray": {      "type": "http",      "url": "https://ray-api.gege.mn/mcp",      "headers": { "Authorization": "Bearer ${input:ray-api-key}" }    }  }}

Local variant: replace the server entry with { "type": "stdio", "command": "npx", "args": ["-y", "@gege-mn/ray-mcp"], "env": { "RAY_API_KEY": "${input:ray-api-key}" } }.

Windsurf

~/.codeium/windsurf/mcp_config.json (Windsurf calls the URL field serverUrl and supports ${env:VAR}):

json
{  "mcpServers": {    "ray": {      "serverUrl": "https://ray-api.gege.mn/mcp",      "headers": { "Authorization": "Bearer ${env:RAY_API_KEY}" }    }  }}

Local: use the same command / args / env entry as in the Cursor example.

Codex

~/.codex/config.toml, local:

toml
[mcp_servers.ray]command = "npx"args = ["-y", "@gege-mn/ray-mcp"]env = { RAY_API_KEY = "ck_live_..." }

Hosted, reading the key from your shell environment:

toml
[mcp_servers.ray]url = "https://ray-api.gege.mn/mcp"bearer_token_env_var = "RAY_API_KEY"

Or from the CLI: codex mcp add ray --env RAY_API_KEY=ck_live_... -- npx -y @gege-mn/ray-mcp.

Zed

In Zed's settings.json:

json
{  "context_servers": {    "ray": {      "url": "https://ray-api.gege.mn/mcp",      "headers": { "Authorization": "Bearer ck_live_..." }    }  }}

Local: "ray": { "command": "npx", "args": ["-y", "@gege-mn/ray-mcp"], "env": { "RAY_API_KEY": "ck_live_..." } }.

Any other client

Any client that runs stdio servers:

json
{  "mcpServers": {    "ray": {      "command": "npx",      "args": ["-y", "@gege-mn/ray-mcp"],      "env": { "RAY_API_KEY": "ck_live_..." }    }  }}

Any client that supports Streamable HTTP: URL https://ray-api.gege.mn/mcp, header Authorization: Bearer ck_live_....

Environment variables (local package)

VariableRequiredDefaultDescription
RAY_API_KEYyesRay API key (ck_live_...). Whitespace, quotes and a Bearer prefix are stripped.
RAY_MCP_URLnohttps://ray-api.gege.mn/mcpHosted endpoint to bridge to. Only change it for staging or local development.

CLI flags: --help, --version. Requires Node.js 18 or newer.

Tools

The tool list comes from the hosted server, so it can grow over time; your client shows the authoritative descriptions and input schemas. Current tools:

ToolWhat it does
whoamiShows the workspace, key id and scopes of the API key in use.
get_usagePlan, subscription status and this month's usage against the quota.
list_channelsConfigured channels with their ids and the recipient shape each accepts. Call first.
send_notificationSends a notification (single, fan-out, multi-channel or feed-only). Needs write.
get_send_statusDelivery status of a send, with per-recipient rows.
list_templatesLists message templates.
get_templateOne template with its published version and draft.
create_templateCreates a template, optionally publishing it. Needs write.
update_template_draftReplaces a template's draft. Needs write.
publish_templatePublishes a template's draft as the live version. Needs write.
archive_templateArchives a template. Needs write.
unarchive_templateRestores an archived template. Needs write.
test_send_templateSends a real test of a published template to one recipient. Needs write.
list_feed_notificationsReads one end user's in-app notification feed.
get_click_statsEmail link click counts for a send or campaign.
list_webhooksLists outbound event webhooks and their delivery health.
get_webhookOne outbound webhook.
create_webhookCreates an outbound webhook; returns its signing secret once. Needs write.
update_webhookChanges a webhook or rotates its secret. Needs write.
delete_webhookDeletes a webhook. Needs write.
read_docsReads Ray's documentation as markdown.

Read-only tools are annotated readOnlyHint; archive and delete tools are annotated destructiveHint, so clients can ask before running them.

Example prompts

  • "Send a test email to me through Ray."
  • "Which Ray channels do I have, and what recipient does each one need?"
  • "Create and publish a welcome email template in Ray with a firstName param, then test-send it to me."
  • "Did send snd_... get delivered? Show me any failures."
  • "How many notifications have we sent this month, and how much quota is left?"
  • "Set up a Ray webhook to https://example.com/hooks/ray for failed deliveries."

Troubleshooting

The local package always starts, even when something is wrong, and explains the problem through MCP instead of crashing. Diagnostics go to stderr (your client's MCP log); stdout carries only MCP messages.

  • Only a setup_help tool is listed. The server can't load Ray's tools. Its description says why. Without RAY_API_KEY every tool call returns setup steps. If the endpoint was unreachable, call setup_help after fixing the cause: it retries, and on success the client is told the tool list changed. If your client doesn't refresh, reload the server.
  • "Ray rejected the API key (HTTP 401)". The key is wrong, revoked, or was pasted incompletely. Create a new key at ray.gege.mn, update the config and restart the client.
  • "write scope required" or HTTP 403. The key is read-only, or your plan doesn't include the feature (webhooks need Pro or higher). Use a key with the write scope.
  • HTTP 402 / quota. The workspace used its monthly quota. Check with get_usage.
  • HTTP 429. Rate limited; the error says how many seconds to wait. See rate limits.
  • "Could not reach Ray's MCP endpoint (ECONNREFUSED / ENOTFOUND / ...)". Network, proxy or firewall problem, or a wrong RAY_MCP_URL.
  • npx not found or old Node. Install Node.js 18+ and make sure npx is on the PATH your client uses. On macOS GUI apps may not see shell PATH changes; use an absolute path to npx if needed.
  • Check the server by hand: RAY_API_KEY=ck_live_... npx -y @gege-mn/ray-mcp should log connected to https://ray-api.gege.mn/mcp on stderr, then wait for input (Ctrl+C to exit). Or inspect it with npx @modelcontextprotocol/inspector npx -y @gege-mn/ray-mcp.

Related

Development

bash
pnpm installpnpm typecheckpnpm test        # vitest: bridge end to end against an in-process fake Ray endpointpnpm build       # tsup -> dist/index.jspnpm smoke       # the built binary over real stdioRAY_MCP_URL=http://localhost:8787/mcp RAY_API_KEY=ck_live_... node dist/index.js

Releasing: bump the version in package.json, server.json (both version fields) and src/version.ts, update CHANGELOG.md, then publish a GitHub release tagged vX.Y.Z. The publish workflow ships to npm and the MCP Registry. To publish by hand instead: pnpm publish --access public, then run the MCP Registry workflow (a personal mcp-publisher login github can't publish under the gege-mn namespace).

License

MIT © gege.mn

來源:README.md,提交 ebdfa1b

工具

21

whoami

Who am I

Identify the API key this connection uses (GET /me): `tenantId` (the workspace), `apiKeyId` and `scopes`. Write tools need the `write` scope; call this to check before attempting them.

無需輸入參數。

get_usage

Get plan and usage

The workspace's plan, subscription status and this calendar month's usage against the monthly quota (GET /billing/subscription). `used`/`remaining` are null on unmetered plans. On a hard-capped plan, sends beyond the quota fail with HTTP 402 quota_exceeded.

無需輸入參數。

list_channels

List channels

List the delivery channels configured in this workspace (GET /channels). Call this FIRST before sending: each entry's `id` is the `channelConfigId` for send_notification and test_send_template, `kind` is the channel type (ses_email, smtp_email, fcm_push, slack_webhook, discord_webhook, telegram_bot, twilio_sms, sendsms_mn, generic_webhook), `templateKind` is the template channelKind it accepts, and `recipientSchema` is the exact JSON Schema of the `recipient` it expects. Channels and their provider credentials are set up in the Ray dashboard, not through this API; if the list is empty, ask the user to add one there.

無需輸入參數。

send_notification

Send notification

Send a notification (POST /send; needs a `write`-scoped key). Returns `{ sendId }` with HTTP 202: delivery is asynchronous, so check the outcome with get_send_status. Use exactly one mode: 1. Single: `channelConfigId` + `recipient`. 2. Fan-out: `channelConfigId` + `targets` (1-1000 `{ recipient, externalUserId? }`), one channel, one sendId. 3. Multi-channel: `deliveries` (1-10, each with its own `channelConfigId`, `recipient` and `templateId` or `content`) for ONE person over several channels; add `feed` + `externalUserId` for a single in-app feed entry. 4. Feed-only: `feed` (with `title`) + `externalUserId` and no channel: an in-app notification only. In modes 1-2 give exactly one of `templateId` (a published template, plus `params`) or inline `content`; in mode 3 that choice is made per delivery. Get channel ids and each recipient shape from list_channels first. Pass `idempotencyKey` whenever a retry must not deliver twice.

輸入參數feedparamscontenttargetslogTitleprioritynotBeforerecipientcampaignIddeliveriesshowInFeedtemplateId另有 5 個

get_send_status

Get send status

Delivery status of a send (GET /sends/{id}): `aggregate` counts per status over the whole send (pending, claimed, delivered, failed_retryable, failed_terminal, suppressed) plus one page of per-recipient delivery rows including provider errors. Right after sending, rows are usually `pending`; check again after a few seconds. Feed-only sends have no rows. For more rows, pass the returned `nextCursor` as `cursor`.

輸入參數limitcursorsendId必填

list_templates

List templates

List message templates (GET /templates): id, name, folder, channelKind, and `publishedVersionId` (null = never published, so it cannot be sent by templateId yet). Archived templates are hidden unless `includeArchived` is true. Use get_template for content and required params.

輸入參數folderincludeArchived

get_template

Get template

Get one template with its published version and its current draft (GET /templates/{id}): content, logTitle/logDescription, `requiredParams` a send must supply, and paramOverrides. Read this before update_template_draft, which needs the full body.

輸入參數templateId必填

create_template

Create template

Create a template (POST /templates; write scope). `channelKind` is permanent and must match the channels you'll send through (list_channels `templateKind`). It is saved as an unpublished draft unless `publish: true`; sending by templateId needs a published version (publish_template). Names are unique per workspace including archived templates: a collision returns 409, so unarchive_template the old one instead. Returns `{ id, requiredParams }`. Designed (drag-and-drop) email templates can only be made in the dashboard.

輸入參數name必填foldercontent必填publishlogTitle必填channelKind必填logDescription必填paramOverrides

update_template_draft

Update template draft

Replace a template's draft (PATCH /templates/{id}; write scope). This is a full replacement, not a partial patch: pass content, logTitle, logDescription and paramOverrides as they should end up (get_template first). `name`, `folder` and `channelKind` are required for validation but not changed (channelKind must equal the original). Live sends keep using the published version until you publish, either with `publish: true` here or publish_template. Fails on archived templates.

輸入參數name必填foldercontent必填publishlogTitle必填templateId必填channelKind必填logDescription必填paramOverrides

publish_template

Publish template

Publish a template's current draft as its new live version (POST /templates/{id}/publish; write scope). Sends by templateId use it immediately. Fails if there is no draft or the template is archived.

輸入參數templateId必填

archive_template

Archive template

Archive a template (POST /templates/{id}/archive; write scope). Sends that reference it fail until it is restored with unarchive_template; its name stays reserved meanwhile. Confirm with the user first if it may be in production use.

輸入參數templateId必填

unarchive_template

Unarchive template

Restore an archived template (POST /templates/{id}/unarchive; write scope). This is how to reclaim a name held by an archived template instead of creating a new one.

輸入參數templateId必填

test_send_template

Test-send template

Send a real test of a template's PUBLISHED version to one recipient (POST /templates/{id}/test-send; write scope). It goes through the provider for real, so use a recipient the user controls. Test sends don't count toward the monthly quota (a small daily allowance applies instead) and never appear in feeds. Returns `{ sendId }` for get_send_status.

輸入參數paramsrecipient必填templateId必填channelConfigId必填

list_feed_notifications

List feed notifications

Read one end user's in-app notification feed (GET /notifications): the entries created by sends with `feed` or `showInFeed`. This is what an in-app inbox would show, not delivery status (use get_send_status for that). Paginate by passing `nextCursor` back as `cursor`.

輸入參數afterlimitbeforecursortemplateIdexternalUserId必填channelConfigId

get_click_stats

Get click stats

Email link click counts grouped by destination URL (GET /clicks) for a `sendId`, a `campaignId`, or both (at least one is required). Only links from email sends made with `trackClicks: true` are counted.

輸入參數sendIdcampaignId

list_webhooks

List webhooks

List the workspace's outbound event webhooks (GET /tenant-webhooks): url, subscribed events, enabled flag and delivery health (consecutiveFailures, lastError). Signing secrets are never returned.

輸入參數includeArchived

get_webhook

Get webhook

Get one outbound webhook (GET /tenant-webhooks/{id}) including its delivery health (consecutiveFailures, lastDeliveryAt, lastFailureAt, lastError).

輸入參數webhookId必填

create_webhook

Create webhook

Create an outbound webhook that Ray POSTs signed event payloads to (POST /tenant-webhooks; write scope; Pro plan or higher, otherwise 403). The URL must be public HTTPS. The response contains the signing `secret` exactly once: show it to the user to store (e.g. as an env var), since it can't be read again, only rotated with update_webhook. Read the `webhooks` docs page for the signature scheme.

輸入參數url必填name必填events必填

update_webhook

Update webhook

Change a webhook (PATCH /tenant-webhooks/{id}; write scope). Only the fields you pass change; pass at least one. `rotateSecret: true` issues a new signing secret, returned once in the response, and the old secret stops verifying immediately, so the receiving service must be updated at the same time.

輸入參數urlnameeventsenabledwebhookId必填rotateSecret

delete_webhook

Delete webhook

Delete (archive) a webhook so it receives no more events (DELETE /tenant-webhooks/{id}; write scope). It cannot be restored through the API; confirm with the user first.

輸入參數webhookId必填

read_docs

Read Ray docs

Read Ray's documentation as markdown. With no `slug` it returns the index (llms.txt) listing every page; then pass a page slug, i.e. the path after /docs/ without `.md`, such as `sending`, `templates`, `idempotency`, `errors`, `rate-limits`, `webhooks`, `status-and-feeds` or `channels/telegram`. Use it for anything the tool descriptions don't cover.

輸入參數slug

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分