Stoplight Prism

An open-source HTTP mock server and validation proxy based on API specifications such as OpenAPI.

github.com/stoplightio/prism
Stoplight Prism homepage screenshot

About Stoplight Prism

Stoplight Prism is an open-source set of packages for API mocking and contract testing. It creates mock servers from OpenAPI v2, OpenAPI v3.x and Postman Collection files, so an API's behavior can be seen before the backend is built. It also works as a validation proxy that checks HTTP traffic against an API specification and reports discrepancies between an implementation and its documentation.

The self-hosted version runs from the command line and can be used standalone or in continuous integration. Stoplight also offers hosted mock servers through its Stoplight Platform and Stoplight Studio products, which are separate from the open-source tool. Self-hosted use requires Node.js 18.20.1 or later, or 18.16 or later on Node.js 18.x. By default, the mock server listens on localhost, and in Docker it is unreachable from outside the container unless it is run with the host option set to 0.0.0.0.

Key features

  • Creates mock servers from OpenAPI v2, OpenAPI v3.x and Postman Collection files
  • Validation proxy that checks HTTP traffic against an API specification
  • The prism mock command runs a mock server on a local HTTP server
  • The prism proxy command routes HTTP traffic through a validation proxy
  • Self-hosted command-line server with mocking, request validation and content negotiation
  • Installable through npm as the @stoplight/prism-cli package
Best for: Developers and API teams that want to mock an API from its OpenAPI or Postman specification, or check an implementation against that specification.
Good for
  • Open source and listed as free
  • Supports OpenAPI 3.1, 3.0, 2.0 and Postman Collections
  • Can run standalone or in continuous integration
Watch out for
  • Requires Node.js 18.20.1 or later (18.16 or later on Node.js 18.x)
  • Mock server listens on localhost by default and is unreachable from outside a Docker container unless bound to 0.0.0.0
  • Documentation describes version 3.x as current; version 2.x is maintained on a separate branch

Stoplight Prism at a glance

Type
Online tool
Pricing
Free
Open source
Yes
Last checked
Oct 9, 2026 · Online when checked
Listed
Oct 9, 2026

Stoplight Prism alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 5 alternatives

MockServer

mock-server.com

An HTTP mocking and proxy server with request expectations, response configuration and verification APIs.

FreeOpen source
11 alternatives

WireMock

wiremock.org

An open-source HTTP mocking server for request matching, simulated responses and automated integration tests.

FreeOpen source
12 alternatives

Popular in APIs & Databases

Well-known listings from the same topic.

All 93

Stoplight Prism FAQ

Why can't I reach the mock server when running it in Docker?
Prism uses localhost by default. When using Docker, the mock server is unreachable outside the container unless the mock command is run with -h 0.0.0.0.
Why do I get 404 errors when my requests include the basePath?
OpenAPI v2.0 basePath is treated the same as the OpenAPI v3 server URL, so it does not need to be included in the request URL. For example, if the base path is api/v1 and the path is hello, a request to localhost:4010/hello works, but a request to localhost:4010/api/v1/hello fails.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing