istok

MCP tools

The istok mcp server, its flags, the core and full tool sets, and the profiles.

istok mcp runs the MCP server your coding agent talks to over stdin and stdout. To connect an agent, follow the Quick start.

istok mcp --actor-id claude --actor-name "Claude Code"
Flag Default Purpose
--tools core Tools to list: core or full. Also ISTOK_MCP_TOOLS.
--profile worker Tool profile: worker, supervisor or admin.
--actor-id generated at startup Stable agent ID. Also ISTOK_AGENT_ID.
--actor-name MCP Agent Agent display name. Also ISTOK_AGENT_NAME.
--database data directory Database path. Also ISTOK_DATABASE.

Project and agent

Each server process takes the project of the directory it starts in (the closest one with nested projects) and one agent identity, and keeps both until it exits. Tools cannot point at another project or override the agent, so one global MCP configuration works for every repository.

Give each agent its own stable --actor-id, such as claude or codex. Runs, checks and leases belong to that actor: only the same actor can resume or recover its run. Without an ID, each process gets a new one, so an agent cannot continue its run after a restart.

The server also sends short instructions describing the workflow; clients that support server instructions add them to the agent’s prompt.

Core tools

The default core set is the short workflow. Every tool definition costs agent context, so the rest stays behind --tools full.

Tool Purpose
project_current The project of the server’s directory.
project_init Register the server’s directory as a project.
task_ready, task_list, task_show Find and read tasks.
task_start Create a task from a title, or claim one by task_id, or continue your own run of it. Returns the run, the project rules, task context, code hits and the latest handoff. Safe to call again after a restart or compaction.
task_progress Record a step.
task_block Block a task with a reason.
task_handoff Record what is done, where the work stopped, decisions and the next step. task_start returns it. With release: true it also ends your run as cancelled and leaves the task open, so another agent can start it at once; use it when the user hands the task to another agent. If you have no active run of the task, only the note is recorded.
task_commit Link a git commit (default HEAD) to the task; repository selects a nested repository.
task_evidence Record a check Istok cannot run itself, such as a CI run or a manual test, passed or failed. Istok stores it as the agent’s word.
run_validate Run a check (tests, a build, a linter) through Istok: it executes the command in the project and records the exit code and output as evidence, tied to the state of the code. Takes the task_id of a task you claimed, or run_id with lease_id. Agents are told to prefer it to their own shell.
task_done Finish the run and complete the task in one call. Uses the latest passed check, or closes unverified with not_verified_reason. Fails with evidence_stale if the code changed after the check; the run stays open for a new check.
run_recover Get a new lease for your own run when it cannot be resumed.
context_add, context_list, context_update Save a project rule, find saved rules, change one.
knowledge_search, knowledge_read Find knowledge, then read one item.
search Search the project’s code.

Your calls keep the run lease alive, and the next call after a pause resumes an expired lease. task_progress and task_block take an optional expected_revision; without it they write to the current revision.

A call to a tool outside the listed set returns the error tool_unavailable with a hint to start the server with --tools full.

Full tool set

--tools full adds every other tool of the profile:

Group Tools
Health health
Tasks task_create, task_update, task_comment, task_unblock, task_dependency_add, task_dependency_remove, task_claim, task_complete
Runs run_list, run_show, run_exec, run_heartbeat, run_finish, run_artifact_list, run_artifact_verify, execution_start, execution_finish, validation_record
Context context_enable, context_disable, context_show, context_search, context_package, context_preview, context_doctor
Knowledge knowledge_catalog, knowledge_show, knowledge_create, knowledge_distill, knowledge_update, knowledge_review, knowledge_promote, knowledge_supersede
Code index_status, index_rebuild, graph_symbol, graph_neighbors, graph_path

These match the CLI commands of the same name; see the CLI reference. Exporting knowledge to a file is CLI-only.

Profiles

A profile adds tools for elevated work. They are listed in both tool sets, because a profile is chosen on purpose.

Profile Adds
worker (default) Nothing: the normal workflow.
supervisor run_abandon, to end an active run while its task stays open.
admin run_abandon, project_list, project_rename, project_rebind, project_delete, project_restore, task_delete, task_restore, context_archive.

project_rebind and project_restore bind the project to the server’s directory. Use an elevated profile only when the agent needs it.

Sync

On a device that joined a hub, the server syncs the project by itself: it pulls before task_start, so a handoff written on another device is in the result, and pushes a few seconds after each write and on exit. An unreachable hub delays task_start by a few seconds at most. While another device works on a task, task_start refuses to claim it and names that device. See Working on another device.

Results and usage

Results are structured envelopes with schema_version "1", or "2" for run results; empty collections are []. See JSON output.

The server logs tool calls on this device; istok usage reports them.