TRACK 048 lessons in trackAI Engineers, Technical Founders, Agency Operations Leads

Agentic AI, Model Context Protocol (MCP) & Governance

Go under the hood of agentic marketing and software systems. Learn how Model Context Protocol (MCP) exposes workspace context to coding and operational agents, why mutations require two-phase confirmation gates, how to engineer repository harnesses (`AGENTS.md`), how to specify agent-operable product surfaces, how agents control and verify real browsers with Playwright and multimodal checks, and how to coordinate one or multiple coding agents across branches and `git worktree` directories.

Disconnected Stack Problem

Giving AI agents raw API credentials risks accidental live publications, off-brand replies, or runaway token spend—while keeping AI completely disconnected or governed only by bloated prompt files wastes hours on copy-pasting and fragile workflows.

Connected System Outcome

A governed agentic architecture using scoped MCP tools, Prepare → Confirm mutation gates, credit caps, quiet hours, repository harnesses (`agent-harness-kit`), checkable MCP surface contracts (`mcp-surface-kit`), deterministic + multimodal Playwright verification (`playwright-harness-kit`), and multi-agent Git hygiene (`git-agent-workflow-kit`).

What You Will Master
  • Connect AI agents (Claude Code, Codex, Cursor, Antigravity) to live brand strategy, performance cohorts, and drafts via Model Context Protocol (MCP).
  • Implement the two-phase Prepare → Confirm pattern so agents never publish or reschedule without an auditable preview and explicit authorization.
  • Configure workspace governance: 3 autonomy modes (`draft_only`, `schedule_with_confirmation`, `autonomous_schedule`), quiet hours, credit budgets, and RBAC.
  • Engineer lean, verifiable coding-agent harnesses (`AGENTS.md`, progressive-disclosure skills, and CI checks) with `RolePlayingTech/agent-harness-kit`.
  • Design and validate four-tier MCP product surfaces, per-operation OAuth scopes, and generated host skills with `RolePlayingTech/mcp-surface-kit`.
  • Automate and verify browser flows with Playwright, ARIA accessibility trees (`@playwright/mcp`), multimodal screenshots, and `RolePlayingTech/playwright-harness-kit`.
  • Coordinate one or multiple coding agents across branches and `git worktree` directories, audit PR scope and test integrity, and recover safely with `RolePlayingTech/git-agent-workflow-kit`.
INTERACTIVE SYSTEM LAB · MUMRO STUDIO

MCP Simulator: Prepare → Confirm Gate & 3 Graduated Autonomy Modes

Interactive blueprint
STEP 1 · SCOPED READ-ONLY

Agent reads active Strategy v2, Brand Voice boundaries, quiet hours (22:00–07:00), and available schedule slots without mutating any state.

TRACK SYLLABUS

Step-by-step lessons.

LESSON 10Architecture12 min read

Model Context Protocol (MCP) in Practice: Connecting AI Agents to Brand Context

How to connect AI agents (Claude Code, Codex, Antigravity) to your workspace via scoped MCP tools instead of copy-pasting into chat windows.

  • Copy-pasting strategy docs and analytics CSVs into a browser chat window is brittle, manual, and immediately goes stale.
  • Model Context Protocol (MCP) gives AI agents typed, permission-scoped tools to read workspace context, inspect cohorts, and create structured drafts.
  • Well-designed MCP architectures strictly separate read-only inspection tools from draft-creation tools and confirmation-gated mutations.
Case Study

Cycling Escapes (FIELDWORK / DRIFT 4L — Demo Workspace)

Running an Interactive MCP Brief from Context Read to Scheduled Plan

Read lesson
LESSON 11Architecture11 min read

Prepare → Confirm: Designing Safe Mutation Gates for Autonomous Agents

Why AI agents should never have a single-step "publish now" tool—and how two-phase confirmation gates prevent accidental live mutations.

  • LLMs are probabilistic; external API mutations (publishing a post, replying to a customer, activating a strategy) must be deterministic.
  • Splitting every mutation into `prepare_*` (dry-run validation + preview token) and `confirm_*` (token execution) blocks unconfirmed single-call side effects.
  • A confirmation token must bind to the exact target channel, payload hash, and scheduled timestamp—expiring if anything changes.
Case Study

Cycling Escapes (FIELDWORK / DRIFT 4L — Demo Workspace)

Inspecting the MCP Preview Before Adding the DRIFT 4L Post to the Plan

Read lesson
LESSON 12Architecture10 min read

Bounded Autonomy: Credit Budgets, Quiet Hours, Allowed Channels, and Kill Switches

How to configure workspace governance, role-based access, and three graduations of AI autonomy (`draft_only`, `schedule_with_confirmation`, `autonomous_schedule`).

  • Autonomy is not a binary on/off switch; teams need graduated modes (`draft_only`, `schedule_with_confirmation`, `autonomous_schedule`) as trust matures.
  • Hard operational guardrails—allowed channels, maximum cadence, quiet hours (`22:00–07:00`), and monthly credit budgets—prevent runaway automation.
  • Multi-brand agencies require strict workspace isolation and role-based permissions (`Owner`, `Admin`, `Member`, `Viewer`) plus an instant stop switch.
Case Study

Cycling Escapes & Świadek Dziejów (Demo Workspaces)

Configuring Autonomy Rules, Quiet Hours (22:00–07:00), and Workspace Roles

Read lesson
LESSON 13From basics → Design34 min read

What an AI Harness Is and How to Design One: Agent Harness Engineering in Practice

How an AI agent’s working environment operates, what it is made of, how to build a tailored repository harness with Agent Harness Kit, and how extensible runtimes such as DeepSeek Harness fit into the picture.

  • An agent is a model plus a harness: instructions, skills, tools, a verification loop, memory and boundaries. A prompt serves one task; a harness applies to every task and every session.
  • Some of the harness is only read by the model (instructions, skills); some works regardless of it (tests, permissions, branch protection, CI). A ban in `AGENTS.md` is a request, not a lock.
  • Always-loaded files should be short and concrete: the project’s purpose, real commands, a definition of done, boundaries and non-obvious rules. Multi-step procedures belong in skills loaded on demand.
  • A good harness is a set of justified decisions with visible costs, not a sum of best practices. Every element needs a reason; anything without one should go.
  • Agent Harness Kit turns those decisions into a spec: it scans the repository, asks only what it cannot read, explains what it included and left out, generates files for Codex, Claude Code, Cursor and other `AGENTS.md`-compatible tools, and checks consistency in CI.
  • Separate a repository harness (versioned project instructions, skills and checks) from an execution harness (a host runtime such as DeepSeek Harness with Cordis plugins and Creator Mode): solve recurring workflow gaps at the lowest privilege layer first (`AGENTS.md` → `SKILL.md` → MCP → runtime plugin).
Case Study

Agent Harness Kit on this Academy’s repository

The same method applied to the code this site is built from

Read lesson
LESSON 14From basics → Product40 min read

MCP, Tools and Skills: Why Agent-Operable Products Will Win

How Model Context Protocol, typed tools and on-demand skills fit together — and why the quality of that surface will decide which products agents (and their users) actually choose.

  • More work that used to be clicked in a UI will be delegated to agents. A product that agents cannot operate safely is, for those users, an incomplete product.
  • MCP is the protocol. Tools are typed operations the model can call. Skills are workflows that say when and how to call those tools. Instructions are always-loaded text. Only the server runtime, not the skill text, can enforce a boundary.
  • A usable MCP surface is designed in tiers: read, draft, local-draft delete, and gated mutation. Annotations, OAuth scopes (including per-operation scopes) and Prepare → Confirm are how the server, not the prompt, keeps live actions from happening in one step.
  • MUMRO’s gateway follows that design: about 38 workspace-scoped tools, four annotation groups, scopes `mumro:read` → `mumro:drafts` → `mumro:schedule` → `mumro:publish`, and server instructions that treat workspace text as untrusted data.
  • mcp-surface-kit records the surface contract in `.mcp-surface/spec.json`, checks mutation and delete gates, scope hierarchy and YAML frontmatter, and safely generates `SKILL.md` files — validating the contract while server tests verify the runtime.
Case Study

Cycling Escapes (FIELDWORK / DRIFT 4L) via MUMRO MCP

Delegating Thursday’s Instagram post without giving the agent a publish button

Read lesson
LESSON 15From basics → Verification30 min read

Playwright, Browser Control and Multimodal Verification: How AI Agents Test and Operate the Web

From Selenium and Cypress to Playwright’s WebSocket architecture, choosing between @playwright/test, @playwright/cli, @playwright/mcp and Test Agents, why ARIA snapshots and multimodal screenshots solve different problems, and how to run an offline browser verification lab with playwright-harness-kit.

  • Browser control serves two distinct jobs in an agentic stack: deterministic verification of your own UI (`@playwright/test`) and interactive browser discovery or operational automation via `@playwright/cli` or `@playwright/mcp`.
  • Playwright won the agent era because of architecture, not syntax: persistent out-of-process WebSocket control, millisecond `BrowserContext` isolation, built-in actionability checks, semantic ARIA locators, and deterministic network routing (`route.fulfill` / `route.abort`).
  • Not every AI model can inspect screenshots, and not every bug is visible in the DOM. Accessibility snapshots (ARIA trees) let any model act deterministically at low token cost, while programmatic DOM geometry (`boundingBox`, `scrollWidth`) plus targeted screenshots catch mobile overflow, truncated headers, and visual regressions.
  • Know which of the four official Playwright interfaces fits the job: `@playwright/test` for CI contracts, `@playwright/cli` (`playwright-cli`) for token-efficient coding agents with shell access, `@playwright/mcp` for stateful MCP tool loops, and Playwright Test Agents (`planner`, `generator`, `healer`) for test authoring.
  • Separate declarative contract checks (`playwright-harness check --strict`), static repository evidence checks (`--verify-files`), and runtime browser execution (`npx playwright test` with `serviceWorkers: "block"`). A JSON spec or `SKILL.md` file guides the agent, but only runtime fixtures and backend controls enforce isolation.
Case Study

MUMRO Core SPA & MUMRO Academy (Playwright Verification Loop)

Turning GitHub Issues and manual QA IDs into zero-leak ui-contract and visual checks

Read lesson
LESSON 16From foundations → Multi-agent Git ops30 min read

Git Isn’t a Save Button: Version Control, Worktrees, and Safe Recovery in the Age of AI Coding Agents

Why generating code with AI is the easy part — and how to use Git, GitHub, isolated worktrees, scope audits, independent code review, and non-destructive recovery to keep multi-agent projects from collapsing.

  • A Git commit is not a “Save” checkpoint of whatever happens to sit on disk; it is an intentional, reviewable change unit composed through the Staging Area (Index) and linked into an immutable cryptographic graph.
  • Never let an AI coding agent work directly on `main` or share a single working directory with another active agent. Isolate every task on a short-lived feature branch — and when running agents in parallel, give each agent its own directory via `git worktree`.
  • Green CI is necessary but never sufficient when AI writes both the code and the tests. An agent asked to “fix failing tests” can turn the suite green by deleting assertions or replacing `assert.strictEqual(res.status, 403)` with `assert.ok(res.status)`.
  • Recovery in Git should be surgical, not destructive: use `git restore` for file-level cleanup, `git stash` to shelve work in progress, `git revert -m 1` to undo a bad merge on a shared branch without rewriting history, and `git reflog` to rescue commits lost to an accidental reset.
  • The open-source `RolePlayingTech/git-agent-workflow-kit` CLI (`git-agent doctor`, `pr-ready`, `recovery-plan`, `skills`, `sandbox`) turns these rules into read-only pre-flight checks, file-scope audits, test-weakening detection, and two reproducible local Git labs.
Case Study

MUMRO Academy Engineering (Parallel Development of Lessons 15 & 16)

Shipping two major curriculum lessons and companion CLIs in parallel without branch collisions

Read lesson
LESSON 17Foundations → Browser tool contracts35 min read

WebMCP: When a Website Becomes a Tool for AI Agents

Expose web-application capabilities to browser agents without relying solely on clicking, DOM traversal or screenshots.

  • WebMCP exposes structured tools from a live web document (`document.modelContext`) to compatible browser agents; it does not make a website generally searchable or callable by all LLMs.
  • Classical server MCP and browser-side WebMCP can complement each other; neither makes an unsafe operation safe.
  • The current W3C Community Group draft (27 October 2026) centers on the JavaScript Imperative API (`registerTool`, `getTools`, `executeTool`); Chrome also documents a separate experimental Declarative API for forms.
  • Tool schemas and metadata (`readOnlyHint`, `consequentialHint`, `untrustedContentHint`) make operations discoverable and interpretable; they do not replace runtime validation, authorization or user consent.
  • Design for progressive enhancement: a useful regular HTML interface must remain functional when WebMCP does not exist in the user’s browser.
Case Study

MUMRO Engineering Architecture (Demo Workspace / Proposed WebMCP Spike)

Evaluating how a read-only browser WebMCP adapter on QueuePage.tsx would complement the existing server-side MCP gateway in app/agent_gateway/server.py

Read lesson

OTHER ACADEMY TRACKS

MUMRO ACADEMY / RolePlayingTech

Let’s connect your brand.

Talk to RolePlayingTech about MUMRO, your content workflow, and access for your brand or agency team.

Contact RolePlayingTech

Continue to roleplayingtech.com to get in touch.