orkai mcp — MCP tools from the CLI
Call any OrkAI MCP tool from a shell with orkai mcp. For agents and scripts that cannot hold an MCP connection.
orkai mcp calls any OrkAI MCP tool from a shell and prints the result.
Use it when an agent or script cannot hold an MCP connection, such as a hosted agent, a CI job, or a
shell script. It talks to the local daemon directly, so it works even when no MCP client is connected.
The daemon must be running (orkai start).
The result is what the MCP tool returns. The one difference: the next steps it prints are
orkai mcp commands, so an agent can run them as printed. To connect an
MCP client instead, see MCP, connect your AI.
Start here
orkai mcp overview # project briefing and the next steps
orkai mcp --list # one line per tool
orkai mcp session --help # one tool in full: parameters, types, required or not --list and --help need no project. Calling a tool does.
Project
Run the command in a folder that has .orkai.yaml, or pass
--path with the project folder or a project config file of any name.
Parent folders are never searched. A new project needs its category first: run
orkai init in the folder.
The project category is added for you (as category_ids or
category_id, whichever the tool declares), unless you pass one yourself.
Call a tool
orkai mcp session action=list
orkai mcp session action=get id=<id>
orkai mcp requirements action=create name='Search' text='Users can search'
orkai mcp session action=list --path projects/project1.orkai.yaml - Every parameter is
key=value. The action is a parameter:action=list, not a bare word. - The value is converted by the type the tool declares. Arrays and objects are JSON in single quotes:
category_ids='["abc"]'. - A large body goes in a file:
--args-file ./body.json, or--args-file -for stdin. Akey=valuereplaces the same key from the file. --out ./result.jsonwrites the result to a file (mode 0600) and prints onlywrote <n> bytes to ./result.json.--timeout 30slimits each request. The daemon is not told to stop, so a write that timed out may still finish.
Workflows and cycles have no orkai create path. Create and update them here, and
send both text and raw on update:
orkai mcp workflow action=update id=<id> --args-file ./workflow.json Output and exit codes
The result goes to stdout. A tool error goes to stderr and stdout stays empty.
| Exit | Meaning |
|---|---|
0 | Success, --help, --list |
1 | Tool error, daemon not reachable, license, timeout, request or result over 16 MiB, --out failure |
2 | Usage error: bad arguments, unknown tool, no project, bad --args-file |
Troubleshooting
| Message | Fix |
|---|---|
unknown operation: TOOL_LIST | The running daemon is older than this orkai. Restart it: orkai stop && orkai start |
no project: .orkai.yaml not found | Run it in the project folder, or add --path |
is not key=value | Write action=list, not list |
Cannot connect to orkai daemon | Start the daemon: orkai start |
unknown tool | orkai mcp --list shows the tools the daemon serves |
After upgrading orkai, restart the daemon so it serves the new tools.
Daemon commands are on Daemon & MCP.