x-openapi-flow-mcp — Claude Code MCP server: what it does
An MCP server that hands your coding agent a ready flow contract for an API: call order, decision rules and field references. Useful when an agent wires up the integration.
claude mcp add x-openapi-flow-mcp -- npx -y x-openapi-flowWhat x-openapi-flow-mcp does
The server sits on top of x-openapi-flow, an OpenAPI extension that models resource lifecycles as a state machine inside your operations. You declare transitions in openapi.x.json — current state, condition, decision rule, target state, next operationId, failure paths — instead of writing orchestration code. Over MCP the agent reads that as a dense contract with no prose; the export-llm-flows command produces the same output, but here it runs as a tool.
Startup goes through npx, so Node.js 18 or newer is required. In Claude the install is claude mcp add x-openapi-flow-mcp -- npx -y x-openapi-flow; Cursor and GitHub Copilot take a stdio entry running npx -y x-openapi-flow. No Node.js in PATH and the server never comes up.
It earns its place where steps are easy to swap: charging before the order exists, shipping before payment clears. The agent sees which operations must come first, so it stops guessing the sequence.
What it helps with
- build a flow contract for an agent without rewriting the docs
- block an operation until its prerequisite has run
- describe order state transitions inside the OpenAPI spec
- export call order and decision rules for a coding agent
- check API lifecycle correctness in CI
Example prompts for the agent
- Show me the flow contract for
createOrderand the call order - Which operations must run before
payOrder? - Export the decision rules and field refs for the payment integration
How to install x-openapi-flow-mcp
Platform CLI
claude mcp add x-openapi-flow-mcp -- npx -y x-openapi-flowPlatform CLI
codex mcp add x-openapi-flow -- npx -y x-openapi-flowConfig file
{
"mcpServers": {
"x-openapi-flow": {
"command": "npx",
"args": [
"-y",
"x-openapi-flow"
]
}
}
}Config file
{
"servers": {
"x-openapi-flow": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"x-openapi-flow"
]
}
}
}Platform CLI
gemini mcp add x-openapi-flow npx -y x-openapi-flowStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about x-openapi-flow-mcp
How do I install x-openapi-flow-mcp in Claude Code?
Run claude mcp add x-openapi-flow-mcp -- npx -y x-openapi-flow. Node.js 18 or newer is required.
What does x-openapi-flow-mcp do?
It gives the agent a flow contract derived from openapi.x.json: call order, decision rules and field references. The agent no longer has to infer them from human docs.
What does the server need to run?
Node.js 18 or newer, since it starts with npx -y x-openapi-flow. Cursor and GitHub Copilot register it as a stdio server with the same command.