Skip to content

Let AI tools drive the toolkit: an MCP server, or a CLI plus a skill #764

Open

Description

@adamsilverstein

Following up on my comment in #755 (comment) - I would love to be able to ask my coding agent to "spin up a site for ticket 12345 and test the latest patch" and have it use the toolkit to do that.

image

I asked Claude to read through the repo and flesh the idea out:

What problem does this address?

An AI tool can work in a checkout once it exists, but it has no way to ask the toolkit for the things the toolkit is good at: creating a site, linking a Trac ticket or Gutenberg issue, checking out the pull request or applying the patch, starting the dev server, reading the debug log. All of that lives behind the window.

The two related issues cover the edges of this, not the middle. #755 lets an agent read the user guide, and #739 lets a person open their session in an AI tool. Neither lets the tool act, so an agent testing a ticket still has to build its own environment beside the one the toolkit already set up, or ask the person to click through the steps.

What is your proposed solution?

Expose the app's existing actions to tools outside the window. The same set either way:

  • list sites and their state (project, linked ticket, branch, server running or not)
  • create a Core or Gutenberg site
  • link a ticket or issue to a site
  • check out a pull request, or apply a Trac patch
  • start and stop the dev server, and return the site URL
  • run the allowed npm scripts on the bundled Node
  • read the debug log and captured mail

Submitting to Trac or opening a pull request would stay with the person in both options.

There are two ways to get there.

Option A: an MCP server. Each action above becomes a tool with a typed input and result.

Option B: a CLI plus a skill. A toolkit command with a subcommand per action and a --json flag, and a SKILL.md in the Agent Skills format, published with the docs next to llms.txt, that teaches an agent to use it.

  • Useful beyond AI: Contributor Day facilitators and scripts get the same commands.
  • Easy to test, and any agent with a terminal can use it without per-tool setup.
  • The skill also carries what the guide tells a person: the npm run watch trap on a Core site, and that a rebase or a half-finished merge from a terminal leaves a state the app refuses to touch (A merge in progress is a state the app knows it is in and respects #352).
  • Out of reach for tools with no shell.

The two are not exclusive. If the actions sit behind one entry point in the main process, the CLI is a thin front for it and an MCP server could wrap the same thing later.

Questions

  • Is this in scope? AGENTS.md names the first-time contributor as the first audience, with experienced contributors served second and only where it costs the first nothing. This mostly serves the second group, though Contributor Day attendees asking for Let people open a session in an AI tool or the terminal app they use #739 suggests some overlap.
  • How wide is the door? src/deep-link.cjs keeps wpct:// to one verb and warns against adding more, because any web page can send one. Either option here is a different entry point - a local process the person started or configured, not a string from a page - but each action is still a new thing something other than the person can ask for. Which actions are acceptable, and should any need a confirmation in the app?
  • How would either reach the app? There is no CLI or headless mode today. The app already takes a single-instance lock and reads a second launch's arguments, so a command could be forwarded to the running app that way. Worth noting that on Windows and Linux a wpct:// address arrives in that same argv, so commands would need to be kept clearly apart from it. A local socket is the other obvious route. Neither was tried.
  • Should it work with the app closed? Creating a site and starting a server are long-running, and today they report progress to the window.
  • Does it belong here or in Studio? The README lists a possible Studio integration, so the answer may be to wait for that.

Related: #755, #757, #739

AI Use

The idea is mine; Claude Code read the repo and drafted the description. No code yet.

Activity

  1. added
    enhancement
    on Nov 13, 2026
  2. adamsilverstein commented on Nov 13, 2026

    @adamsilverstein
    MemberAuthor

    I went through the open questions above one at a time, so we have a direction to react to. First step is up as a draft in #766. Happy to change any of these if someone sees a problem.

    Claude Code kept score while I answered, here is the tally:

    Where things landed

    • Is this in scope, and here or in Studio? Build it here. The Studio integration has no date, and the channel in Add a toolkit command so scripts and AI tools can drive the app #766 is small enough to drop if Studio takes this over later.
    • How wide is the door? One setting, off by default, along the lines of "Let tools on this computer change my sites". Reads stay open without it. Once it is on, writes run without a prompt per action.
    • Which actions? The list in the description, plus updating trunk and unlinking a ticket: create a site, link a ticket or issue, check out a pull request, apply a Trac patch, start and stop the dev server, run the allowed npm scripts, read the debug log and mail. Still not available to tools: deleting a site, discarding changes, submitting to Trac and opening a pull request.
    • Should it work with the app closed? The command starts the app, with its window, and carries on. No headless mode.
    • How would either reach the app? A local socket (a named pipe on Windows), not the second-launch arguments, so it stays apart from wpct://. That is what Add a toolkit command so scripts and AI tools can drive the app #766 does.
    • MCP or CLI plus a skill? The CLI and a SKILL.md resolve this issue. An MCP server gets an issue of its own, wrapping the same list of actions.
    • Finding the command. A row in Settings with the command's path and a Copy button, next to the setting above.

    Order of work, one pull request per step:

    1. Add a toolkit command so scripts and AI tools can drive the app #766: the channel, the toolkit command and toolkit sites.
    2. The remaining reads: debug log and captured mail.
    3. The setting and the Settings row.
    4. The write actions.
    5. The skill, published with the docs next to llms.txt.

    Does the opt-in setting feel like the right amount of friction, or would you want a prompt per action?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions