Any MCP client
Any agent that can load an MCP server can use the Zentri coordinator. Zentri has no kit for an agent it does not know, so nothing gates its edits. Claims are advisory: the agent must call zentri_claim_file itself.
Start the session
Section titled “Start the session”Start the agent through zt start, so it gets a worktree and a session.
zt start --agent <your agent command> "add CSV export to the reports page"For an agent that is not claude, codex, or opencode, zt start writes only .zentri/session.json and the git hooks into the worktree. It starts the agent with these variables set:
| Variable | Value |
|---|---|
ZENTRI_SERVER |
The coordinator’s URL. |
ZENTRI_SESSION_ID |
This session’s ID. |
ZENTRI_SESSION_TOKEN_FILE |
A file, readable only by you, that holds the session token. |
ZENTRI_WORKTREE |
The session’s worktree. |
You then add the Zentri MCP server to the agent’s own config, in one of two ways.
Stdio (preferred)
Section titled “Stdio (preferred)”zentri mcp is a stdio MCP server that forwards each call to the coordinator’s POST /mcp. It reads the session token from the file, so the token never reaches the agent’s environment.
{ "mcpServers": { "zentri": { "command": "zentri", "args": ["mcp"], "env": { "ZENTRI_SERVER": "${ZENTRI_SERVER}", "ZENTRI_SESSION_ID": "${ZENTRI_SESSION_ID}", "ZENTRI_SESSION_TOKEN_FILE": "${ZENTRI_SESSION_TOKEN_FILE}", "ZENTRI_WORKTREE": "${ZENTRI_WORKTREE}" } } }}Drop env if your client passes its own environment to the server. Use your client’s syntax for environment references, such as ${env:NAME}.
zentri mcp reads the token from ZENTRI_SESSION_TOKEN, or else from the file ZENTRI_SESSION_TOKEN_FILE names. If the coordinator does not answer within 5 seconds at start, it exits with a non-zero status.
Streamable HTTP
Section titled “Streamable HTTP”The coordinator serves MCP at <ZENTRI_SERVER>/mcp over stateless Streamable HTTP. It takes the session token as a bearer token. Put the token in an environment variable in the shell that starts the client, and have the client read it from there. Never write the token into a config file.
export ZENTRI_SESSION_TOKEN="$(cat "$ZENTRI_SESSION_TOKEN_FILE")"{ "mcpServers": { "zentri": { "type": "http", "url": "${ZENTRI_SERVER}/mcp", "headers": {"Authorization": "Bearer ${ZENTRI_SESSION_TOKEN}"} } }}The coordinator answers 401 to a missing or bad token and 403 to a valid token that is not a session token. A cross-site browser request also gets 403. There is no OAuth flow.
What the agent should do
Section titled “What the agent should do”Tell the agent, in its instructions, to follow these steps. The MCP server’s own instructions, which every client gets at start, cover claims and notices in short form.
- Call
zentri_submit_planafter it reads the task and before its first edit. The plan holds a summary, the steps, the files it will change (a directory ends in/), and the public symbols it will add or change. A plan claims nothing. - Call
zentri_claim_filebefore it edits a file. It takes up to 50 paths. A denial names the holder’s session, user, and task. - Read notices with
zentri_check_inbox. Without hooks, notices arrive only at the end of Zentri tool results. - For each overlap, read the other session’s work with
zentri_get_session_diffand send it a note withzentri_post_note.
See MCP tools for all 13 tools.
The PRD and ADR skills are installed only for agents with a kit. If your agent reads SKILL.md folders, copy adapters/skills/zentri-prd and adapters/skills/zentri-adr into its skills folder. Otherwise paste the two files, without the --- header, into its instructions.
What Zentri enforces
Section titled “What Zentri enforces”- The git pre-commit hook. It warns when a staged file is held by another session, and sends the coordinator a snapshot of the session’s changes. It only warns, and
git commit --no-verifyskips it. - The merge check, when branch protection requires it. A file the session never claimed fails the check.
What Zentri cannot enforce
Section titled “What Zentri cannot enforce”- Nothing stops the agent from editing a file before it claims it, or without claiming it.
- Nothing detects a shell write when it happens. There is no post-shell hook.
- The agent runs as you with
local-dev. There is no sandbox image for a generic agent. - The model router does not apply. It routes only Claude Code, Codex, and OpenCode.
Limitations
Section titled “Limitations”- No named MCP client other than the three kits has been tested with Zentri. The configs above follow the MCP spec.
- Grok Build has no kit. This page is the only way to connect it, and that has not been tested.