Skip to content

Agent tools: a remote MCP server, then WebMCP #77

Open

Description

@ascorbic

Let coding and chat agents work on Tack boards through structured tools, rather than by scraping the canvas. Define the tools once, serve them from each instance as a remote MCP server, then add a thin WebMCP adapter for in-browser agents once that API settles.

Why

  • Agents are poor at canvases: dragging stickies by pixel coordinates doesn't work. With tools, an agent can take part properly: "put the open EmDash bugs on the 1.0 board and auto-stack them", "summarise what changed since yesterday", "stage these themes as issues".
  • Tack already has a command layer behind the action bar, keyboard shortcuts and AI features. The tools wrap those commands, so everything an agent does goes through the same Yjs document, undo, history, presence and push review as a person.

1. Shared tool definitions

Define each tool once in src/shared/, with a name, a description, a JSON Schema for its input, annotations, and an implementation over the existing commands. A first set:

Tool What it does Read-only
list_boards Boards the user can open ✓
read_board A board as structured text: sections, stickies, cards (state, labels), stacks, widgets, votes ✓
whats_changed What changed since a time ("since you were here") ✓
search_items The card tool's search (issues, PRs, discussions) ✓
add_stickies Add stickies, optionally into a section
add_cards Add issues, PRs or discussions by URL or search result
move_shapes Move shapes into a section or a stack
auto_stack Auto-stack a selection or a section, returning the proposed stacks; applying them is a second call
stage_changes Stage new issues, labels, milestones, parents or closes as pending changes
vote / comment Dot-vote, or comment on a shape

Safety rules

  • Pushing to GitHub stays human-reviewed. Tools can stage changes but never push. The push sheet is still the only way changes reach a forge.
  • Untrusted content is marked. Issue, PR, discussion, link-preview and other people's sticky text is returned as untrusted content: the MCP output says so, and the WebMCP version sets untrustedContentHint. It's an obvious prompt-injection route.
  • Same permissions as the user. Tools run with the signed-in user's role on each board (viewer, editor, owner) and their access to private repositories. They're never more powerful than the UI.
  • Visible on the board. Agent edits show in presence and history as "Matt (via agent)" or similar, and undo takes them back like any other edit.
  • Rate limits per user, with the existing AI budget for any tool that calls the model.

2. Remote MCP server on each instance

  • Endpoint: Streamable HTTP at /mcp on the instance. Check Cloudflare's Agents SDK (McpAgent) and the OAuth provider library for Workers.
  • Auth: OAuth through the instance's existing GitHub sign-in, with per-client consent and revocation from a settings page.
  • Docs: connecting Claude, Claude Code and other MCP clients, with one example prompt per tool.
  • Tests: in the playground, against the pretend forge.

3. WebMCP adapter, once the API settles

  • What it does: registers the same tools with document.modelContext.registerTool() when the API exists (feature-detected; nothing happens otherwise), scoped to the open board. Writes go through the open session's Yjs document, so the user sees them happen live.
  • Where the API stands (early October 2026):
    • It's a W3C Web Machine Learning Community Group draft from Google and Microsoft.
    • Chrome runs it as an origin trial, reportedly Chrome 149–156, ending 17 November 2026. Edge has it behind a flag; Firefox and Safari haven't committed.
    • The entry point moved from navigator.modelContext to document.modelContext during 2026, and almost no sites or agents use it yet.
  • When: after the API leaves the origin trial, or as an opt-in experiment on tack.social and /try with a trial token. Self-hosted instances would each need their own token or a Chrome flag until then.
  • Effort: small once the tool definitions exist, and if the API changes again only the adapter changes.

Open questions

  • Should read_board return everything at once, or be paginated or summarised for large boards?
  • Should agents get their own presence (a cursor and an avatar such as "Matt's agent"), or act invisibly as the user apart from history?
  • Should the /try demo expose the tools through WebMCP, so people can try it with their browser's agent?

Out of scope

  • Any tool that pushes to GitHub without the push sheet.
  • Agents creating or deleting boards, or changing sharing and access, at first.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions