Manage with MCP

kōjō is an MCP server. An editor or a coding agent that speaks the Model Context Protocol can do what the dashboard and the CLI do: start a session and follow it, edit and test a skill, read and change the runtime config, roll a change back, look at the audit log.

Every tool is one call to the HTTP API made with the caller’s API token. So an MCP client can do exactly what that token’s role allows, and a tool’s answer is the JSON the API documents.

flowchart LR
    E["Editor or coding agent"] -- "stdio" --> M["kojo mcp"]
    M -- "HTTPS, API token" --> A["kōjō API"]
    R["Remote MCP client"] -- "HTTPS, API token" --> H["/mcp on the server"]
    H --> A
    A --> F["Sessions, skills, config, audit"]

Connect

Over stdio

kojo mcp runs an MCP server on standard input and output. It reads the server URL and the token from --server and --token, or from KOJO_SERVER and KOJO_TOKEN. Add it to the MCP configuration of your editor or agent:

{
  "mcpServers": {
    "kojo": {
      "command": "kojo",
      "args": ["mcp"],
      "env": {
        "KOJO_SERVER": "https://kojo.example.com",
        "KOJO_TOKEN": "<an API token>"
      }
    }
  }
}

Over HTTP

The server also serves MCP over streamable HTTP at <public_url>/mcp. Send the API token as a bearer token:

Authorization: Bearer <an API token>

A request without a bearer token, or with one that is not an API token of server.auth.tokens, gets 401 before any tool is listed or called. The endpoint is stateless: each request is authenticated on its own. A client that takes a URL and headers needs the URL above and the Authorization header.

Choose the token’s role

Tokens are listed under server.auth.tokens in kojo.yaml, each with one role. Give an MCP client the lowest role that covers what it should do:

Role An MCP client with it can
viewer Read everything: sessions and their steps, skills, drafts, config and its history, schedules, evals, memory, the audit log
skill:edit Also create, edit, test and eval skill drafts
operator Also start, message and cancel sessions, activate drafts, change models, repositories and schedules, roll those back, and manage memory
admin Also change merge policy, egress limits, the limits per team and repository, the activation policy, the skills source and access, and export and apply the whole config

A tool the role does not cover answers with the API’s 403 and changes nothing. Each tool carries the MCP hints for read-only and destructive operations, so a client can ask before it runs one that changes something.

Tools

Sessions

Tool Input Does Role
kojo_run text (required), repo, skill, number, is_pr, dry_run, plan, wait, inputs Starts a session. With wait it blocks until the session finishes or waits for a person, for up to 10 minutes, and returns the result. plan asks for a plan and the go-ahead before code changes. inputs takes reference.<name> for a reference repository and linked.<name> for a linked repository the session may also change ("linked.web": "github/acme/web"). operator
kojo_session id Returns a session: status, cost and result (summary, goal critic report, pull request link and, for a change across repositories, every pull request under pull_requests, diff of a dry run). viewer
kojo_sessions status, repo, limit (default 20, at most 100) Lists recent sessions, newest first. Diffs are left out. viewer
kojo_session_steps id Returns the session’s trace: each orchestrator turn, subagent, tool call, sandbox command and critic verdict, in order. viewer
kojo_cancel id Cancels a session. operator
kojo_session_message id, text Sends a message to a queued or running session: its next model step reads it as guidance. A message does not stop a session. See Talking to a session at work. operator
kojo_session_messages id Lists what people told the session, with who sent each message, from where, when and whether a model read it, and whether the session takes more. viewer
kojo_plan_approve id Gives the go-ahead on the plan the session waits on (in its result’s plan): the work starts. To ask for a revised plan, send a message with kojo_session_message. operator
kojo_plan_decline id Declines the plan the session waits on: the session ends and nothing is changed. operator
kojo_session_report_link id, ttl Makes a link to the session’s shareable report: a read-only, redacted page anyone with the link can open without signing in. Returns url and expires_at. ttl (for example 72h) shortens the link’s life below what settings/reports sets. A session the settings do not allow, or a confidential one, is refused with the reason. operator
kojo_session_report_revoke id Revokes every link to the session’s report made so far, the ones in pull request descriptions included. admin

Campaigns

A campaign runs one task as one session per repository.

Tool Input Does Role
kojo_campaigns status, limit (default 50) Lists campaigns, newest first, each with its status, how many of its repositories are over and what it spent. viewer
kojo_campaign id Returns a campaign and, per repository, the newest session, its status and cost, the pull request it opened and whether that is open, merged or closed. viewer
kojo_campaign_create task (required unless skill is given), title (one line, at most 200 characters), skill, inputs, repos, team, match, max_parallel (default 5), pilot (default 3) Creates a pending campaign. Nothing runs: the answer lists the repositories, the ones skipped and why, and the most the campaign can cost (estimate.max_cost_usd). operator
kojo_campaign_confirm id, max_cost_usd Starts a pending campaign. max_cost_usd must cover the estimate as it is now. operator
kojo_campaign_continue id, max_cost_usd Starts a paused campaign again: after its pilot, the rest of its repositories; after it spent what was confirmed, with a bound that covers what it spent and one more session. Refused while settings/models does not bound what a session costs. operator
kojo_campaign_cancel id Cancels a campaign: nothing more starts and its open sessions are asked to stop. On a cancelled campaign, asks its open sessions again. operator
kojo_campaign_retry id Runs the repositories that failed again, each as its next attempt. operator

Skills

Tool Input Does Role
kojo_skills repo Lists the skills a repository (or the org) resolves to. viewer
kojo_skill name (required), repo Returns one skill: its files, the layer it comes from and the layers it overrides. viewer
kojo_skill_validate files (required), scope Checks skill files against the schemas and the scope’s egress limits. Saves nothing. viewer
kojo_skill_delete name (required), scope Deletes a dashboard-managed skill. Resolution falls back to the scope’s git-backed skill of that name, or the next layer; a git skill is not hidden by the delete. operator
kojo_skill_tools repo Lists the tools a skill may give its subagent. viewer
kojo_schema name (required) Returns a JSON Schema: kojo, skill, goals, kit, factory, schedules or config-export. viewer

Skill drafts

These are the steps of the Skills studio: draft, test, eval, activate.

Tool Input Does Role
kojo_drafts scope Lists the drafts in progress. viewer
kojo_draft id Returns a draft: files, version, validation, test sessions, eval run, and the active version. viewer
kojo_draft_create name (required), scope, files Starts a draft. Without files it copies the skill the scope resolves to. skill:edit
kojo_draft_update id, files, version (all required) Replaces the draft’s files. A stale version is refused. skill:edit
kojo_draft_delete id Throws the draft away. skill:edit
kojo_draft_test id, repo (required), text, number, is_pr Runs the draft once as a dry run in a throwaway sandbox. Nothing is pushed or posted. skill:edit
kojo_draft_eval id Runs the draft against the skill’s eval fixtures in the background. skill:edit
kojo_draft_activate id (required), message Makes the draft the skill in use, if the activation policy is met. Refused for the draft of a proposal kōjō made: only a person approves one, in the dashboard. operator

Skill proposals

The changes kōjō proposes to its own skills (Self-improvement). No tool approves one: approval needs a person signed in to the dashboard, and an MCP client acts with an API token.

Tool Input Does Role
kojo_proposals scope, skill, open, limit Lists proposals, newest first, with their status, summary, pass rates and what each loosens. viewer
kojo_proposal id (required) Gets one proposal: rationale, evidence, the proposed and in-use files, what it widens and loosens against the skill in use now, and its eval next to the version in use’s. viewer
kojo_proposal_start skill (required), scope Asks kōjō to propose a change to one skill now. Refused when self-improvement is off for it, the evidence is below the threshold, or it has an open proposal. operator
kojo_proposal_reject id (required), reason Turns a proposal down and deletes its draft. The reason is kept so the same change is not proposed again. operator

Runtime config

Tool Input Does Role
kojo_config scope Lists the active config objects with the role each needs. viewer
kojo_config_get object (required), scope Returns one active object and its revision. viewer
kojo_config_put object, content (required), scope, message Replaces one object. It becomes a new revision and applies at once. operator or admin, by object
kojo_config_export none Exports every active object of every scope as one document. admin
kojo_config_apply document (required), dry_run Loads an export: every listed object that differs becomes a new revision. admin
kojo_revisions object (required), scope, limit Lists an object’s history, newest first. skill/<name> lists a skill’s. viewer
kojo_revision id Returns one revision. viewer
kojo_rollback id Makes an earlier revision the active one. operator or admin, by object

scope is org (the default) or repo:<forge/owner/name>.

Schedules, evals, memory and audit

Tool Input Does Role
kojo_schedules none Lists every schedule with its last and next run. viewer
kojo_schedule_propose text Turns a schedule described in words into a schedule entry. It stores nothing. operator
kojo_evals skill, limit Lists eval runs with their pass rates. viewer
kojo_eval id Returns one eval run with its cases. viewer
kojo_eval_start skill Runs a skill against its eval fixtures in the background. skill:edit
kojo_eval_history skill, repo, test_cmd, limit (required), since Starts an eval from the repository’s history: mines merged pull requests and checks each case in a sandbox. No model runs; the run stops validated with its cost bound. operator
kojo_eval_confirm id, max_cost_usd Runs the valid cases of a validated history eval on live models. max_cost_usd is the bound the run reported; nothing starts if the bound is now higher. operator
kojo_memory query, repo, scope (team, mine, all), person, skill, source, limit Searches or lists memory: the team’s by default, your own with scope: mine. source: "review:" lists the lessons learned from reviews. viewer; admin for another person’s
kojo_memory_add topic, content (required), repo, scope (team, personal) Saves a memory, for the team or for yourself. operator for the team; any role for your own
kojo_memory_delete id Deletes a memory. operator for a team memory; the owner or an admin for a personal one
kojo_memory_erase person (required) Deletes every personal memory of one person. The person themselves, or admin
kojo_audit actor, action, session, since, until, before, limit Reads the audit log. viewer

The deployment

Tool Input Does Role
kojo_whoami none Shows the token’s identity and roles, the version, the forges and the sandbox driver. viewer
kojo_stats none Shows the last seven days: sessions by status, spend, critic pass rate per skill. viewer
kojo_limits none Shows every team, repository, skill and trigger with its limits and what counts against them now: spend over 24 hours and this month, running sessions, and the queued sessions each limit holds back. People (everyone with an entry or spend this month, most spent first) are listed for the operator role and up only. The install is shown against the daily and monthly budgets of settings/models. viewer
kojo_repos none Lists the configured repositories and the ones the forges can reach. viewer
kojo_repo_factory repo (required) Opens one pull request that creates the repository’s .factory/factory.yaml and .factory/schedules.yaml from its settings. admin
kojo_users none Lists the people who signed in, with their roles. admin
kojo_doctor none Runs the deployment checks on the server and returns the report. operator

What it looks like in use

Asked in an editor to “build the role filter from issue 415 and tell me when the pull request is up”, an agent with an operator token calls:

{"name": "kojo_run", "arguments": {"repo": "github/acme/api", "skill": "build-feature", "number": 415, "wait": true}}

and reads the session’s summary and pull request link from the answer.

Changing a setting is two calls: read the object, send it back with the change. Asked to “require an eval with a 70% pass rate before a skill goes live”, an agent with an admin token calls:

{"name": "kojo_config_get", "arguments": {"object": "settings/activation"}}
{"name": "kojo_config_put", "arguments": {
  "object": "settings/activation",
  "content": {"require_eval": true, "min_eval_pass_rate": 0.7, "require_second_reviewer": false},
  "message": "gate activation on evals"
}}

kojo_config_put replaces the whole object, which is why the read comes first. The change is a new revision: kojo_revisions lists it, and kojo_rollback with the previous revision’s ID takes it back.

What MCP does not do

  • Sign-in. The token comes from kojo.yaml; MCP has no OIDC flow.
  • Approvals of the merge policy. A merge or a pull request that waits for a person is decided in chat, and a skill proposal kōjō made is approved in the dashboard. A session’s plan is the exception: kojo_plan_approve and kojo_plan_decline decide it.
  • Setup. kojo setup, kojo migrate and kojo config validate work on a machine, not through a running server, so they stay in the CLI.
  • A session’s report page as a file. GET /api/v1/sessions/{id}/report is a download, like the audit export; use kojo sessions report --html, or open a link kojo_session_report_link made.
Scroll to move. + - zoom, 0 fit, Esc close.100%