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 serveIn Claude Code the easiest route is the plugin, which registers this server for you:
/plugin install orchstep --marketplace orchstep/orchstepAvailable Tools
Every tool carries MCP behaviour annotations (readOnlyHint, destructiveHint, ...) so a client can auto-approve the read-only ones and ask before anything executes.
| Tool | Read-only | What it does |
|---|---|---|
orchstep_list_tasks | yes | List the non-internal tasks in a workflow file |
orchstep_plan | yes | Dry-run a task: rendered commands, condition verdicts, variable provenance. Nothing executes. |
orchstep_run | no (destructive) | Execute a task and return the run result |
orchstep_lint | yes | Lint a workflow file for errors and anti-patterns |
orchstep_module_search | yes | Search the module registry |
orchstep_module_install | no | Install a module from the registry |
orchstep_version | yes | Report version and edition |
orchstep_run
| Argument | Type | Required | Description |
|---|---|---|---|
task | string | yes | Task name to run |
file | string | no | Workflow file (default ./orchstep.yml) |
vars | object of strings | no | Runtime variables, same as --var key=value |
environment | string | no | Declared 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
| Argument | Type | Required | Description |
|---|---|---|---|
file | string | no | Workflow file (default ./orchstep.yml) |
Returns task names, one per line.
orchstep_lint
| Argument | Type | Required | Description |
|---|---|---|---|
file | string | yes | Workflow file to lint |
orchstep_module_search
| Argument | Type | Required | Description |
|---|---|---|---|
query | string | no | Matches name, description and tags |
tier | string | no | official, community or ai |
orchstep_module_install
| Argument | Type | Required | Description |
|---|---|---|---|
name | string | yes | Full 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 stepValidate before running
1. orchstep_lint file="orchstep.yml"
2. fix any reported problem
3. orchstep_runReuse a module
1. orchstep_module_search query="slack"
2. orchstep_module_install name="@orchstep/slack-notify"
3. orchstep_run a task that uses itMCP Client Configuration
Claude Code
Use the plugin (above), or add the server manually:
claude mcp add orchstep -- orchstep mcp serveCodex
codex mcp add orchstep -- orchstep mcp serveKimi 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_tasksfirst instead of guessing task names. - Call
orchstep_planbeforeorchstep_runon 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
varsare substituted into commands; workflow authors should pipe untrusted values through a quoting helper. - Use
orchstep_module_searchbefore writing a workflow from scratch.