DOC_INDEX
THEME
DOCS/LLM Agents/MCP Server

MCP Server

OrchStep as a Model Context Protocol server for native LLM agent integration

The OrchStep MCP (Model Context Protocol) server lets an agent call OrchStep as native tools instead of shelling out and scraping terminal text. It speaks JSON-RPC 2.0 over stdio.

Starting the MCP Server

orchstep mcp serve

In Claude Code the easiest route is the plugin, which registers this server for you:

/plugin install orchstep --marketplace orchstep/orchstep

Available Tools

Every tool carries MCP behaviour annotations (readOnlyHint, destructiveHint, ...) so a client can auto-approve the read-only ones and ask before anything executes.

ToolRead-onlyWhat it does
orchstep_list_tasksyesList the non-internal tasks in a workflow file
orchstep_planyesDry-run a task: rendered commands, condition verdicts, variable provenance. Nothing executes.
orchstep_runno (destructive)Execute a task and return the run result
orchstep_lintyesLint a workflow file for errors and anti-patterns
orchstep_module_searchyesSearch the module registry
orchstep_module_installnoInstall a module from the registry
orchstep_versionyesReport version and edition

orchstep_run

ArgumentTypeRequiredDescription
taskstringyesTask name to run
filestringnoWorkflow file (default ./orchstep.yml)
varsobject of stringsnoRuntime variables, same as --var key=value
environmentstringnoDeclared environment, same as --env
{
  "name": "orchstep_run",
  "arguments": { "task": "hello", "vars": { "greet_name": "agent" } }
}

The result text is the structured JSON run result (the same document orchstep run --output json prints), so the agent can branch on status and inspect steps:

{
  "workflow": "orchstep-repo",
  "task": "hello",
  "status": "success",
  "steps": [
    {
      "task": "hello",
      "name": "greet",
      "status": "ok",
      "output": "Hello, agent! This message was orchestrated by OrchStep."
    }
  ]
}

A failed run sets isError: true on the tool result and includes the error field. Task names, environments and var keys that look like CLI flags (for example a task named --file=...) are rejected before anything runs.

orchstep_plan

Takes the same arguments as orchstep_run and returns the dry-run plan (orchstep run <task> --dry-run --output json). Use it to show the user exactly what will execute, then call orchstep_run.

orchstep_list_tasks

ArgumentTypeRequiredDescription
filestringnoWorkflow file (default ./orchstep.yml)

Returns task names, one per line.

orchstep_lint

ArgumentTypeRequiredDescription
filestringyesWorkflow file to lint
ArgumentTypeRequiredDescription
querystringnoMatches name, description and tags
tierstringnoofficial, community or ai

orchstep_module_install

ArgumentTypeRequiredDescription
namestringyesFull module name, e.g. @orchstep/slack-notify

orchstep_version

No arguments. Returns {"version": "...", "edition": "community"}.

Usage Patterns

Discover, preview, run

1. orchstep_list_tasks            -> see what exists
2. orchstep_plan  task="deploy"   -> show the user the rendered commands
3. orchstep_run   task="deploy"   -> execute after approval
4. read status / steps[]          -> report, or explain the failing step

Validate before running

1. orchstep_lint file="orchstep.yml"
2. fix any reported problem
3. orchstep_run

Reuse a module

1. orchstep_module_search query="slack"
2. orchstep_module_install name="@orchstep/slack-notify"
3. orchstep_run a task that uses it

MCP Client Configuration

Claude Code

Use the plugin (above), or add the server manually:

claude mcp add orchstep -- orchstep mcp serve

Codex

codex mcp add orchstep -- orchstep mcp serve

Kimi Code CLI

.kimi-code/mcp.json in your project (or ~/.kimi-code/mcp.json). Kimi loads project-level servers only once you trust the folder.

{ "mcpServers": { "orchstep": { "command": "orchstep", "args": ["mcp", "serve"] } } }

OpenCode

opencode.json in your project:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": { "orchstep": { "type": "local", "command": ["orchstep", "mcp", "serve"], "enabled": true } }
}

VS Code / GitHub Copilot

.vscode/mcp.json:

{ "servers": { "orchstep": { "type": "stdio", "command": "orchstep", "args": ["mcp", "serve"] } } }

Cursor, Gemini CLI, Windsurf, Claude Desktop and other stdio clients

Use the standard mcpServers block in the client's config file: .cursor/mcp.json (Cursor), ~/.gemini/settings.json (Gemini CLI), ~/.codeium/windsurf/mcp_config.json (Windsurf), claude_desktop_config.json (Claude Desktop):

{
  "mcpServers": {
    "orchstep": {
      "command": "orchstep",
      "args": ["mcp", "serve"]
    }
  }
}

The server runs tasks relative to its working directory; start the client from your project, or pass file explicitly.

Tips for LLM Agents

  • Call orchstep_list_tasks first instead of guessing task names.
  • Call orchstep_plan before orchstep_run on anything that touches real systems.
  • Treat the workflow as the source of truth: run the task rather than re-deriving its commands.
  • Values you pass in vars are substituted into commands; workflow authors should pipe untrusted values through a quoting helper.
  • Use orchstep_module_search before writing a workflow from scratch.