# Stepgate

Stepgate runs agents through YAML procedures and blocks progress until each result passes its checks. Use it when skipped steps or invented values matter.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 13
- Author: Chaarangan
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Chaarangan/Stepgate/tree/HEAD/server
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/mcp/stepgate

## What it does

Stepgate exposes a YAML stepfile as an MCP tool. The file defines inputs, allowed APIs and MCP servers, an ordered procedure, and the checks for each output. The agent receives one step at a time, while the server performs the required tool calls and opens the next step only after its gate passes.

Gates can use JSON Schema, JSONLogic, or an HTTP verifier. Stepgate can build outputs mechanically, attach credentials to its own calls, and keep a hash-linked record of steps, calls, verdicts, and retries. A human approval through MCP elicitation can be required before a later step writes the result.

You need an MCP client and Node.js 22.18 or later. Credentials come from the selected stepfile; the `market-research` example requires a Tavily API key. The client’s own model handles the reasoning.

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

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add stepgate -- npx -y stepgate
```

### Codex

**Platform CLI**
```bash
codex mcp add server -- npx -y stepgate
```

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add server npx -y stepgate
```

## When to use it
- run an agent procedure in a fixed order
- validate outputs with JSON Schema or JSONLogic
- check a result against an external API response
- require human approval before a write
- record tool calls, verdicts, and retries

## Example prompts
- Run `market-research` for the brand Oatly in the UK plant-based milk market.
- Write a YAML stepfile for this procedure and add output checks.
- Run the procedure step by step and request approval before writing the result.

## Similar
- [cli2mcp](https://affpapa.org/en/nevibecode/mcp/cli2mcp.md) — MCP server · ★ 12
- [configuring-ai-agents](https://affpapa.org/en/nevibecode/skills/configuring-ai-agents.md) — skill · 2900 installs
- [obsidian-mcp-server](https://affpapa.org/en/nevibecode/mcp/obsidian-mcp-server.md) — MCP server · ★ 701
- [orion](https://affpapa.org/en/nevibecode/mcp/orion.md) — MCP server · ★ 10
- [formio-uag](https://affpapa.org/en/nevibecode/mcp/formio-uag.md) — MCP server · ★ 12
- [hook-development](https://affpapa.org/en/nevibecode/skills/hook-development.md) — skill · 7028 installs

---
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
