# x-openapi-flow-mcp

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: tiago-marques
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/tiago-marques/x-openapi-flow/tree/HEAD/x-openapi-flow
- Updated: 2026-09-15
- HTML: https://affpapa.org/en/nevibecode/mcp/x-openapi-flow-mcp

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add x-openapi-flow-mcp -- npx -y x-openapi-flow
```

### Codex

**Platform CLI**
```bash
codex mcp add x-openapi-flow -- npx -y x-openapi-flow
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "x-openapi-flow": {
            "command": "npx",
            "args": [
                "-y",
                "x-openapi-flow"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "x-openapi-flow": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "x-openapi-flow"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add x-openapi-flow npx -y x-openapi-flow
```

## When to use it
- 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
- Show me the flow contract for `createOrder` and the call order
- Which operations must run before `payOrder`?
- Export the decision rules and field refs for the payment integration

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24242
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7506

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
