OpenAPI lifecycle guard and MCP sidecar for policy-driven API orchestration.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
๐ 2,100+ downloads in the first 3 weeks!
See your API lifecycle come alive from your OpenAPI spec, with one simple command
Validate, document, and generate flow-aware SDKs automatically.

openapi.json โ describes your API
openapi.x.json โ describes how to use it (flows)
x-openapi-flow adds a declarative state machine to your OpenAPI spec.
Model resource lifecycles, enforce valid transitions, and generate flow-aware artifacts for documentation, SDKs, and automation.
Define stateful workflows and lifecycle transitions directly inside your OpenAPI operations:
This flow defines an order lifecycle directly inside your OpenAPI:
created statepaid when payment is confirmedInstead of manually orchestrating API calls, the workflow is fully described alongside your API specification.
Building APIs is cheap. Building complex, multi-step APIs that teams actually use correctly is hard.
Teams face recurring problems:
x-openapi-flow exists to solve these pains: it makes lifecycles explicit, validates transitions automatically, and generates flow-aware docs and SDKs โ so teams move faster, make fewer mistakes, and ship confident integrations.
Turn your OpenAPI spec into a single source of truth for API behavior:
Prefer no local setup? Open the minimal runtime-guard demo directly in your browser:
Once open, run:
Then in another terminal:
Expected: 409 INVALID_STATE_TRANSITION.
Fastest way to see value (guided scaffold):
Optional runtime:
Then run:
Expected: 409 INVALID_STATE_TRANSITION.
Initialize flow support in your project:
After regenerating your OpenAPI file, apply and validate the flow (optional):
This will:
๐ก Tip: run this in CI to enforce API workflow correctness
For larger APIs, you can define flow rules by resource (with shared transitions/defaults) and reduce duplication in sidecar files.
See: Sidecar Contract
Use the official reusable action to validate lifecycle rules in CI with a single step:
Integration guide: GitHub-Actions-Integration.md
Hereโs a real-world payment lifecycle represented in x-openapi-flow:
Generate a visual graph of the lifecycle:
Resulting diagram:
This visualization makes your API workflow explicit, easy to communicate, and ready for documentation or demos.
Create a TypeScript SDK that respects your APIโs lifecycle and transition rules, following best practices seen in leading companies like Stripe and Adyen:
Example usage:
This SDK guides developers through valid transition paths, following patterns used by market leaders to ensure safe and intuitive integrations.
CI validation is important, but production safety needs request-time enforcement.
x-openapi-flow now includes an official runtime guard for Node.js that can block invalid state transitions during request handling.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/x-openapi-flow-mcp)<a href="https://allmcps.com/mcp/x-openapi-flow-mcp"><img src="https://allmcps.com/api/badge/x-openapi-flow-mcp?style=directory" alt="X Openapi Flow MCP on AllMCPs" /></a>