Prism

io.github.terradev-cloudPublished by GitHub account terradev-cloudv1.0.0Updated Oct 28, 2026

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

Overview

AI-generated overview

Stateless MCP gateway that relays calls to an upstream MCP server and turns each call into an OpenTelemetry span sent to a destination you choose.

What you can do
  • Check the gateway's identity, version, transport, capture default and active session count
  • Verify connectivity through the gateway with a ping that returns a timestamp and optional echo
  • Read connection instructions: how to set the upstream, header-less query-param config, destinations and the borrowed-token model
  • Relay JSON-RPC to a configured upstream MCP server and emit one span per request to an OTLP, file, stdout or fan-out destination
When to use it
Use it when you want observability over MCP traffic without changing the upstream server: tracing tool calls, spotting failures, and feeding spans to an OTLP backend such as Grafana, Honeycomb or a collector. It is a gateway, not a data store or dashboard.
Requirements
Remote endpoint at prism-mcp.terradev.cloud over streamable HTTP; no account or provisioning needed for the gateway itself. The upstream MCP server is set via the X-Prism-Upstream header or an upstream query parameter and must be allowed by the deployment. A destination is configured server-side (config file or environment variables); hosted use may need a bearer token for the destination.
Before you install
The gateway sits in the path of every MCP call, so it sees request arguments and, if capture is enabled, results; capture defaults to none and is described as redacted. Upstream credentials can be forwarded via X-Prism-Upstream-Authorization, and destination auth headers or API keys may be passed as headers or query parameters, where they can end up in logs or URLs. Spans are sent to a third-party destination you configure.

Installation

In SourceWeft

  1. Open Prism in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.terradev-cloud%2Fprism/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "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).

Source: README.md at commit 417fc0e

Tools

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.

Takes no parameters.

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.

Parametersecho

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.

Takes no parameters.

Version history

1
  1. v1.0.0LatestSep 27, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.