Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Stoplight Prism

$ prism Official Low Risk
Stoplight · Design & Docs · Apache-2.0 · macos / linux / windows

Stoplight Prism (@stoplight/prism-cli) turns OpenAPI 2/3 specs or Postman collections into a local mock HTTP server (prism mock) or contract-validating reverse proxy (prism proxy). Because both subcommands run long-lived HTTP servers, agents should spawn them in the background and probe them with curl or test suites.

FCRS-1.0 Score
81 /100
Good
Medium Confidence
Zero-Friction Install
npm install -g @stoplight/prism-cli
CLI vs MCP Decision CLI Preferred vs MCP

Spawning a local OpenAPI mock server with prism mock lets integration tests hit real HTTP endpoints directly without MCP.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 17 / 25

Non-interactive flag configuration (-p, --dynamic, -h), though both mock and proxy are blocking server processes that emit plain-text request logs rather than structured JSON summaries.

  • Server processes block foreground execution until killed
  • Plain-text HTTP validation log lines
Trust & Safety 22 / 25

prism mock is purely read-only on local specs; prism proxy forwards requests to the specified upstream URL so target selection matters.

  • Zero spec file writes; proxy forwards live traffic to upstream
Setup & Portability 13 / 15

Cross-platform via npm or npx @stoplight/prism-cli (plus Docker images).

  • Available via npm and npx
Utility & Efficiency 13 / 15

Quickly spins up realistic contract mocks (--dynamic) or catches backend contract drift via prism proxy.

  • Supports both static examples and --dynamic JSON Schema Faker responses
Maintenance & Lineage 8 / 10

Official Stoplight repository (stoplightio/prism) under Apache-2.0.

  • Official Stoplight GitHub organization
Docs & Verifiability 8 / 10

Well-documented CLI flags and HTTP mock/proxy behavior at docs.stoplight.io/docs/prism.

  • Official Stoplight documentation

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; operates on local OpenAPI specs (or forwards caller headers in proxy mode).

Side Effects
Read-Only
Cost & Quotas

100% free and Apache-2.0 open-source.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Stoplight Prism Agent Rules
- `prism mock` and `prism proxy` are blocking HTTP servers—always run them in the background or a daemon process.
- Do not point `prism proxy` at production APIs with mutating requests; point it at local/staging upstreams.

Agent-Ready Command Recipes

Safe Read-Only Queries

Start a dynamic OpenAPI mock server on port 4010
prism mock -p 4010 --dynamic openapi.yaml

Serves schema-generated dynamic responses from openapi.yaml on localhost without touching any files.

Controlled Writes & Previews

Validate live traffic against an upstream API
prism proxy -p 5000 openapi.yaml http://localhost:3000

Proxies requests to http://localhost:3000 and logs OpenAPI request/response contract violations.

Strengths for Agents

  • + Instant OpenAPI mock server (--dynamic or spec examples) with zero code required.
  • + prism proxy validates both incoming requests and upstream responses against the OpenAPI contract.
  • + Available immediately via npx @stoplight/prism-cli.

Caveats & Pitfalls

  • ! Both mock and proxy are long-running servers that hang foreground agent commands if not daemonized.
  • ! prism proxy forwards live HTTP calls to the target upstream—never point it at production with mutating tests.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI