All pages

Agentic pipelines · Lesson 2.1 · 12 min

Drive TRMNLY from Claude Code

Give Claude Code or Codex TRMNLY's tools over MCP.

After this lesson Claude Code (or Codex) running in a pane works the way the sidebar agent does: it reads your other panes, works the project board, makes TRMNLY worktrees, checks pages in the built-in browser, and tells you when it needs you, all under approval rules you set.

Time: 12 minutes · Works on: macOS app, with the cloud workspace over the same protocol.

A coding agent is only as good as what it can reach

Claude Code on its own can read files, run commands and edit code in one folder. That covers writing the change. It doesn't cover the rest of the work around it: seeing the dev server's output in the next pane, checking the page in a browser, knowing which card it's meant to be working on, telling the other agents what it changed, or getting your attention without you watching its pane.

TRMNLY already does all of those things for its own agent. Its MCP server hands the same tools to any agent that speaks MCP. Once Claude Code is connected, the choice between "TRMNLY's agent" and "Claude Code" stops being a choice about capabilities and becomes one about which model and billing you want for the task.

The practice this lesson teaches is to give an outside agent the same environment you'd give your own: the same tools, the same project context, the same board and the same safety rules. Then you can hand work to whichever agent fits, and they can hand work to each other.

Three things to wire, not one

Connecting the MCP server gives Claude Code the tools. It doesn't tell Claude Code when to use them, and an agent that has a tool it doesn't know about won't reach for it. There are three parts to wire up:

  1. The tools. The MCP server, registered with Claude Code for every project. Tool names arrive prefixed, such as mcp__trmnly__read_terminal.
  2. When to use them. TRMNLY installs six skills into ~/.claude/skills/ (trmnly-terminal, trmnly-browser, trmnly-connections, trmnly-automation, trmnly-worktrees and trmnly-desktop) when the server starts. Claude Code picks a skill by its description, so when you say "check the page" or "make a worktree", the matching skill loads and points it at TRMNLY's tools.
  3. Where it is. A TRMNLY.md file in the project tells a Claude Code session it's running inside TRMNLY and which tools it has. Claude Code never reads a standalone TRMNLY.md. It reads CLAUDE.md, CLAUDE.local.md and the files those import. So TRMNLY adds the line @TRMNLY.md to CLAUDE.local.md and keeps both files out of git, and your tracked CLAUDE.md is never touched.

Skip the third part and Claude Code still has the tools, but it treats them as extras. Wire all three and it uses them as a matter of course.

Use TRMNLY's worktrees, not Claude Code's

Claude Code has its own worktree tool, which it reaches for whenever someone says "worktree". It knows nothing about TRMNLY projects: it doesn't copy your .env, the sidebar doesn't show the checkout, and TRMNLY's tools keep pointing at the old folder. In a TRMNLY project, tell Claude Code to use worktree_create and worktree_switch, and register any worktree made another way with worktree_adopt. The trmnly-worktrees skill and TRMNLY.md both say this, which is one more reason to wire them.

A worked example: Claude Code takes a card

You have a card, #14 Add an empty state to the projects list, and a dev server running in another pane. You start claude in the project folder and say:

"Take card #14. Make a TRMNLY worktree for it. Make the change, run the tests, then open the projects page in the TRMNLY browser with no projects and check the empty state shows and the console is clean. Post a one-line summary to the project chat, move the card to Done, and raise a flag if you get stuck."

With TRMNLY connected, every part of that is a tool call Claude Code can make: kanban_claim and kanban_move for the card, worktree_create for the checkout, read_terminal for the dev server pane, browser_navigate, browser_screenshot and browser_console for the check, chat_post for the summary. If it gets stuck, trmnly raise-flag "…" in its own pane marks the pane in the sidebar and sends you a notification. Typing your answer into the pane lowers the flag.

Because the client was started in the project's folder, TRMNLY binds it to that project. The card lands on that project's board and the commands run there, whatever window you're looking at.

Do it in TRMNLY

  1. Press ⌘,, open AI Agent and find External MCP clients. Turn on Expose TRMNLY's tools to other apps. It stays on across restarts. The MCP server lesson covers every control here.
  2. Leave Approvals on Approval for dangerous, the default. Reads and writes run. Dangerous tools, such as running commands, running JavaScript in the browser or reading credentials, ask first.
  3. Under Apps, find Claude Code and press Connect. The row should read Connected · all projects. If it reads Connected · … only, press Fix. If it reads Connected · needs node, press Update.
  4. For Codex CLI the row reads Add by hand, because its config is TOML. Press Copy stdio config at the bottom of the section and paste the block into Codex's config.
  5. In the same AI Agent settings tab, find Project context (TRMNLY.md). Select your project and press Add TRMNLY.md to current project. Turn on Auto-add TRMNLY.md when opening a project so every project and every new worktree gets it. TRMNLY never overwrites an existing TRMNLY.md; its Project notes section is yours to edit.
  6. Check the wiring from a pane in the project: cat CLAUDE.local.md should include @TRMNLY.md, and git status should show neither file.
  7. Start claude in the project folder. Run /mcp and look for trmnly in the server list. Then give it the card #14 request above, with a card of your own.
  8. Watch the approvals. When Claude Code reaches a dangerous tool, TRMNLY shows a banner and a sheet with the tool, the client's name and the arguments. Approve or deny it there. With a paired phone, the card goes to the phone too.
  9. Once you trust a client, tighten or loosen it per client under Client access. The row's ⋯ menu has Edit tool access…, for allow and deny patterns such as browser_* and a rate limit. Tick Trusted only for a client you'd let run anything without asking.
  10. Read what it did. Every call from an MCP client is in the agent's audit log with the client's name, in the Safety panel's Audit Log tab.
  11. Install the session hook under Settings → AI Agent → Claude Code sessions with Install hook. A pane running Claude Code then comes back in the same conversation after a restart or a crash.

Running Claude Code as the sidebar agent instead

You can also pick Claude Code (CLI) in the Agent tab's model menu, under Your CLI subscription (no API credits). Then you chat in the sidebar and TRMNLY runs the CLI behind it. Use a pane when you want Claude Code's own interface and long sessions. Use the sidebar when you want TRMNLY's transcript, runbooks and schedules to drive it. Claude Code, Codex and Gemini covers that route and its permission levels.

Check yourself

  • /mcp in Claude Code lists trmnly, and the Apps row reads Connected · all projects.
  • CLAUDE.local.md imports @TRMNLY.md, and neither file shows in git status.
  • Claude Code made its worktree with worktree_create, and the worktree appears in the sidebar's worktree selector.
  • A dangerous call from Claude Code showed an approval sheet in TRMNLY.
  • The audit log shows Claude Code's calls under its own name.

Go further