Prism

io.github.terradev-cloud由 GitHub 帳號 terradev-cloud 發布v1.0.0更新於 Oct 28, 2026

Stateless MCP gateway and OTel span-streaming bridge for hosted MCP servers.

已驗證Streamable HTTP可網頁執行雲端與基礎設施開發者工具安全與監控

概覽

AI 產生的概覽

無狀態 MCP 閘道,將呼叫轉送到上游 MCP 伺服器,並把每次呼叫轉成 OpenTelemetry span 送到你指定的目的地。

可以做什麼
  • 查詢閘道身分、版本、傳輸方式、預設擷取層級與目前追蹤的連線數
  • 用 ping 驗證閘道連通性,回傳時間戳並可回顯參數
  • 取得連線說明:如何設定上游、無 header 用戶端的查詢參數設定、目的地與借用權杖模型
  • 把 JSON-RPC 原樣轉送到設定的上游 MCP 伺服器,並依請求產生 span 送到 OTLP、檔案、標準輸出或分流目的地
適用情境
適合在不更動上游伺服器的前提下觀測 MCP 流量:追蹤工具呼叫、找出失敗,並把 span 送往 Grafana、Honeycomb 或 Collector 等 OTLP 後端。它是閘道,不提供儲存或視覺化介面。
執行需求
透過 streamable HTTP 連線 prism-mcp.terradev.cloud 遠端端點;閘道本身不需帳號或開通。上游 MCP 伺服器以 X-Prism-Upstream 標頭或 upstream 查詢參數指定,且須在該部署的允許清單內。目的地由伺服器端設定(設定檔或環境變數);託管使用可能需要目的地的 bearer 權杖。
安裝前請注意
閘道位於每次 MCP 呼叫的路徑上,能看到請求參數,開啟擷取時還包括結果;擷取預設關閉並聲稱已去識別化。上游憑證可經 X-Prism-Upstream-Authorization 轉送,目的地驗證標頭或 API key 可能以標頭或查詢參數傳遞,因而出現在日誌或網址中。span 會送到你設定的第三方目的地。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Prism,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

交給代理程式安裝

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

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

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

其他 MCP 客戶端

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

{
  "mcpServers": {
    "prism": {
      "type": "http",
      "url": "https://prism-mcp.terradev.cloud/mcp"
    }
  }
}

README

Prism

Stateless MCP gateway. Sits between an AI client and an MCP server, relays JSON-RPC verbatim, and turns every call into an OpenTelemetry span — shipped over OTLP to any endpoint you choose. No database, no accounts, no provisioning. See docs/PRISM.md for the full spec.

Fastest path to a live dashboard: get a free key at telinea.terradev.cloud, set one destination, and every span appears in Telinea within seconds.

Run

bash
pip install -r requirements.txt
# Zero-config dev: spans print to stdout.PRISM_UPSTREAM_ALLOW='*' \PRISM_ALLOW_INSECURE_HOSTS='localhost,127.0.0.1' \uvicorn prism.main:app --port 8080

Where spans go

One pipeline, one egress primitive: PrismSpan → Serializer → Dispatcher. Prism knows four destination schemes and nothing about backends:

  • https:// / http:// — POST serialized spans to any OTLP endpoint. Grafana, Honeycomb, a collector, Telinea — read the backend's own docs for its endpoint and auth header, fill in two fields, done.
  • file:// — append JSONL to a local path. No account, no network.
  • stdout:// — human-readable lines for development.
  • multi://a,b — fan-out to named destinations; failures are isolated.

Configure in ~/.prism/config.toml (or ./prism.toml, or PRISM_CONFIG):

toml
[prism]destination = "telinea"
[destinations.telinea]endpoint = "https://api.terradev.cloud/telinea/v1/ingest"format = "telinea"headers = { "Authorization" = "Bearer tl_your_key" }

Formats: otlp_json (default — the industry wire standard), otlp_proto (needs pip install opentelemetry-proto), jsonl, telinea (native envelope for Telinea ingest).

Every field has an env override — secrets never need to touch disk:

bash
PRISM_DESTINATION=telineaPRISM_DESTINATION_TELINEA_HEADERS_AUTHORIZATION="Bearer tl_..."

Hosted mode: "Authorization" = "Bearer {token}" resolves {token} to the caller's bearer per span — each user's spans land in their own account.

Delivery: buffered, flushed every 5 s or 512 spans; Retry-After honored on 429 for every backend; failed batches go to a dead-letter ring buffer (10k spans) retried on backoff; on shutdown, in-flight spans drain and the dead-letter buffer is written to ~/.prism/deadletter.jsonl and replayed on next start. Fire-and-forget — Prism never blocks a chat session on a flush.

Client config

The entire integration is a URL swap plus headers:

json
{  "mcpServers": {    "acme-prod": {      "url": "https://prism-mcp.terradev.cloud/mcp",      "headers": {        "Authorization": "Bearer tln_live_…",        "X-Prism-Upstream": "http://localhost:9000/mcp",        "X-Prism-Project": "acme-prod",        "X-Prism-Env": "development"      }    }  }}
  • X-Prism-Upstream — the real MCP server. Must match PRISM_UPSTREAM_ALLOW.
  • X-Prism-Upstream-Authorization — forwarded upstream as Authorization.
  • X-Prism-Capture — none (default) | args | args,results. Redacted.
  • X-Prism-Sample — 0.0–1.0, sampled once per session.

Header-less clients can encode the upstream in the path: POST /mcp/u/{base64url(upstream)}.

Registries (Smithery et al.)

Registry installs can't set custom headers — config arrives as query params. Every X-Prism-* option has a query-param twin:

/mcp?upstream=https://mcp.acme.dev/mcp&api_key=tln_live_…&project=acme&env=prod
  • upstream → X-Prism-Upstream (or set PRISM_DEFAULT_UPSTREAM for single-upstream deployments)
  • api_key / token → Authorization / X-Api-Key
  • upstream_authorization → X-Prism-Upstream-Authorization
  • project, env, role, capture, sample → their X-Prism-* twins

smithery.yaml in this directory is the registry manifest for the self-hosted container path; the hosted listing just points at https://prism-mcp.terradev.cloud/mcp.

What you get

One MCP session = one trace. One JSON-RPC request = one span. Tool failures surface correctly (result.isError → ERROR, not a green 200). With a Telinea destination, every Prism-fronted server also appears on the Telinea Gateway board via the endpoint attribute — p50/p95/p99, req/min, sparkline — with no backend changes.

Not built (by design)

  • No backend-specific serialization. If a backend needs a proprietary format, run an OpenTelemetry Collector and point Prism at it — that's what the Collector is for.
  • No query layer, storage, or UI. Prism emits; Telinea stores and visualizes.
  • Legacy HTTP+SSE transport (/sse + /messages, 2024-11-05 spec).
  • DNS-rebinding-safe IP pinning at the transport layer (see guard.py).

來源:README.md,提交 417fc0e

工具

3

prism_info

Prism service info

Returns Prism's service identity and runtime state: version, transport, public URL, capture default, and the number of MCP sessions currently being traced. Use this to confirm which Prism deployment you are talking to and whether it is healthy before configuring an upstream.

無需輸入參數。

prism_ping

Liveness check

Returns {"pong": true, "time": <unix seconds>} plus an optional echo of the 'echo' argument. Use to verify connectivity through the gateway before pointing it at an upstream MCP server.

輸入參數echo

prism_help

How to use Prism

Returns connection instructions: how to set the upstream MCP server (X-Prism-Upstream header or ?upstream= query param), the query-param config keys for header-less clients, how destinations and the borrowed-token model work, and example client configs. Start here if you are an agent discovering Prism for the first time.

無需輸入參數。

版本歷史

1
  1. v1.0.0最新Sep 27, 2026

評分

已滿足適用檢查項的 90%

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

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

    請在儲存庫或註冊中心條目中宣告授權條款。