# Orca MCP Server

Connects Orca tools to an agent for describing and checking finite-state machines. Useful when topology errors must be found before execution.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 14
- Author: jascal
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/jascal/orca-lang/tree/HEAD/packages/mcp-server
- Updated: 2026-06-03
- HTML: https://affpapa.org/en/nevibecode/mcp/orca-mcp-server

## What it does

Orca MCP Server exposes Orca tools to an agent. The agent can work with finite-state machines described in Markdown and validate their structure before running code. The verifier checks reachability, deadlocks, uncovered state-event pairs, and conflicting guards.

Orca supports states, events, transitions, guards, nested and parallel regions, timeouts, and machine invocation. A machine can be compiled to an XState v5 configuration or a Mermaid diagram. Running the package through `npx` requires Node 20+; the server uses `ANTHROPIC_API_KEY`, while one setup variant also passes `ORCA_PROVIDER` and `ORCA_MODEL`. The server will not start without `ANTHROPIC_API_KEY`.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `ANTHROPIC_API_KEY`, `ORCA_PROVIDER`, `ORCA_MODEL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> --env ORCA_PROVIDER=<ORCA_PROVIDER> --env ORCA_MODEL=<ORCA_MODEL> --transport stdio mcp-server -- npx -y @orcalang/orca-mcp-server
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add mcp-server --env ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> --env ORCA_PROVIDER=<ORCA_PROVIDER> --env ORCA_MODEL=<ORCA_MODEL> -- npx -y @orcalang/orca-mcp-server
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@orcalang/orca-mcp-server"
            ],
            "env": {
                "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>",
                "ORCA_PROVIDER": "<ORCA_PROVIDER>",
                "ORCA_MODEL": "<ORCA_MODEL>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@orcalang/orca-mcp-server"
            ],
            "env": {
                "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>",
                "ORCA_PROVIDER": "<ORCA_PROVIDER>",
                "ORCA_MODEL": "<ORCA_MODEL>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> -e ORCA_PROVIDER=<ORCA_PROVIDER> -e ORCA_MODEL=<ORCA_MODEL> mcp-server npx -y @orcalang/orca-mcp-server
```
Replace <…> with your own values

## When to use it
- describe a finite-state machine in Markdown
- detect unreachable states and deadlocks
- check transition coverage and guard determinism
- compile a machine for XState or Mermaid

## Example prompts
- Use the Orca MCP tools to describe a payment-processing state machine in Markdown and verify its topology.
- Check `examples/payment-processor.orca.md` for deadlocks and unreachable states.
- Compile `examples/payment-processor.orca.md` into an XState configuration.

## Similar
- [xstate-v5](https://affpapa.org/en/nevibecode/skills/xstate-v5.md) — skill · 494 installs
- [orca-emulator-android](https://affpapa.org/en/nevibecode/skills/orca-emulator-android.md) — skill · 5600 installs
- [orca-emulator](https://affpapa.org/en/nevibecode/skills/orca-emulator.md) — skill · 5900 installs
- [orca-fleet](https://affpapa.org/en/nevibecode/skills/orca-fleet.md) — skill · ★ 57
- [create-formal-verification-skill](https://affpapa.org/en/nevibecode/skills/create-formal-verification-skill.md) — skill · 1200 installs
- [godot-gdscript-patterns](https://affpapa.org/en/nevibecode/skills/godot-gdscript-patterns.md) — skill · 17396 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
