Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
PLAYBOOK · 2026 EDITION

25 Production AI Agent Workflows with MCP: Patterns and Guardrails

Agents pay off when each one has a narrow job, scoped tools and a human at the risky step. Here are 25 workflows across five functions — each with a trigger, a stack, a guardrail and a metric to track.

Intermediate16 min readSetup time: 30 minUpdated: Author: Zhemal Khamidun
Key takeaways
  • One workflow = one trigger, one narrow job, a short tool allowlist, a named owner and one metric.
  • Start read-only: replica roles, read-only server modes, fine-grained tokens. Open write access per workflow, never globally.
  • Tool output is data, not instructions; anything written outside passes an approval gate.
  • Roll out in stages: shadow mode, eval set, limited autonomy, full autonomy — with a kill switch and a weekly review.
Step-by-step plan
  1. Pick one workflow and an ownerChoose the workflow with the clearest trigger and the cheapest failure; name one person responsible for it.
  2. Connect scoped MCP serversAdd only the servers the job needs, read-only, each with its own least-privilege token.
  3. Run in shadow modeLet the agent run on real triggers but write only to a log; compare with what people did.
  4. Build an eval set and gatesSave real cases with expected outcomes; put approvals, budget caps and a kill switch in front of every write.
  5. Grant limited autonomy, review weeklyAutomate low-risk cases and review the metric, rejected drafts and cost each week before widening the scope.

How to read this playbook

This is a catalogue of patterns, not a product tour. Every workflow runs on one loop: an agent host — Claude Code, Codex, Cursor or Hermes Agent — receives a trigger, calls tools through MCP servers and stops at a guardrail before anything leaves the building.

  • Trigger — the event, schedule or chat command that starts a run.
  • Stack — the host plus the MCP servers the job needs, and nothing more.
  • Flow — what the agent does, in order.
  • Guardrail — the control that keeps a wrong answer cheap.
  • Metric — a definition to track, not a promised result; measure your own baseline first.

New to the protocol? Read MCP vs function calling and browse the MCP directory.

Reference architecture: from trigger to audited result

All 25 workflows share one skeleton. A trigger — webhook, schedule or chat message — starts a run with a fixed prompt and a short tool allowlist. The agent plans, calls MCP tools and drafts a result; a guardrail layer validates it and sends risky actions to a human before anything is written. Every tool call lands in an audit log that later feeds your evals.

  • Least-privilege tokens. One token per workflow, limited to the repositories, projects or objects it touches.
  • Read-only by default. Query a replica through a read-only role and run the server in restricted mode; GitHub's remote server accepts an X-MCP-Readonly header.
  • Secrets in the environment. Config files reference ${VAR}; tokens never appear in prompts, repositories or logs.
  • Audit log. Record the trigger, prompt version, tool calls, approver and outcome.
.mcp.json — Claude Code project scope, read-only defaults
{
  "mcpServers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer ${GITHUB_MCP_PAT}",
        "X-MCP-Toolsets": "repos,issues,pull_requests,actions",
        "X-MCP-Readonly": "true"
      }
    },
    "postgres-ro": {
      "command": "uvx",
      "args": ["postgres-mcp", "--access-mode=restricted"],
      "env": {
        "DATABASE_URI": "${PG_REPLICA_URI}"
      }
    },
    "sentry": {
      "type": "http",
      "url": "https://mcp.sentry.dev/mcp"
    }
  }
}
Start read-only

This is a shadow-mode setup: all three servers can only read. When a workflow earns write access, add a separate entry with its own token instead of loosening this one.

Other hosts take the same servers in a different wrapper: Cursor reads .cursor/mcp.json (same mcpServers shape, ${env:NAME} variables), Codex reads tables such as [mcp_servers.github] in ~/.codex/config.toml, and Hermes Agent reads mcp_servers: in config.yaml.

Every workflow follows one path: a trigger starts the agent, MCP servers give it scoped tools, guardrails gate the result, and the audit log feeds the evals.Triggerevent, schedule, chatAgentplan & actMCP serversscoped toolsGuardrails & approvalhuman in the loopResultPR, report, CRM updateAudit log & evalsevery tool call recorded
Every workflow follows one path: a trigger starts the agent, MCP servers give it scoped tools, guardrails gate the result, and the audit log feeds the evals.

Engineering: workflows 1–5

The easiest place to start: the work is already text, CI gives an objective pass/fail signal, and every change goes through a pull request a human can reject.

#01First-pass pull request review

Trigger
A pull request is opened or marked ready for review.
Stack
Claude Code / Codex / Cursor + GitHub MCP (repos and pull_requests toolsets)
How it works
Read the diff and the touched files, check them against the repository's conventions, post one review with findings ranked by severity.
Guardrail
The token has no contents-write permission, so the agent cannot merge; branch protection still requires a human approval.
Metric
Time from PR open to first review; share of agent findings the author accepts.

#02Failing CI triage

Trigger
A workflow run fails on the main branch or on a pull request.
Stack
Claude Code / Codex / Hermes Agent + GitHub MCP (actions toolset)
How it works
Fetch the failed job logs, separate flaky tests from real regressions, link the suspect commit, propose a fix or a re-run.
Guardrail
Read-only access to the repository; any fix arrives as a separate pull request; automatic re-runs are capped per commit.
Metric
Time from red build to identified cause; share of failures classified correctly.

#03Dependency upgrade pull requests

Trigger
A weekly schedule, or a new Dependabot or Renovate pull request.
Stack
Claude Code / Codex + GitHub MCP (dependabot and pull_requests toolsets) + your CI
How it works
Read the changelog, find breaking changes that touch your code, adapt the call sites on the upgrade branch, summarize the risk.
Guardrail
One dependency per pull request; CI must be green; major versions are always merged by a human.
Metric
Median age of open upgrade PRs; share merged without manual code changes.

#04Tests for changed code

Trigger
A pull request lowers coverage, or a bug fix lands without a regression test.
Stack
Claude Code / Codex / Cursor + the project's test runner (pytest, Vitest, Jest) + Playwright MCP for UI
How it works
Find untested branches in the diff, write tests in the project's style, run them; for a bug fix, confirm the test fails on the old code.
Guardrail
The agent may edit test files only; reviewers reject tests that assert nothing or mirror the implementation.
Metric
Coverage of changed lines; share of generated tests kept after review.

#05Sentry incident triage

Trigger
A new issue or a regression alert fires in Sentry.
Stack
Claude Code / Codex / Hermes Agent + Sentry MCP + GitHub MCP + Linear MCP
How it works
Pull the stack trace and the affected release, find the suspect commit, check for a duplicate, open a Linear issue with a first diagnosis.
Guardrail
Read-only in Sentry and GitHub; the agent files and labels tickets but never resolves issues or reverts code.
Metric
Time from alert to triaged ticket; share of tickets routed to the right team the first time.

Product: workflows 6–10

Product work is synthesis: many messy inputs, one structured document. Agents write the first draft; priorities and scope stay with the product manager.

#06Customer interview synthesis

Trigger
A new interview transcript lands in the research folder.
Stack
Claude Code / Hermes Agent + Google Drive MCP + Notion MCP
How it works
Extract pains, jobs and quotes, tag them against the existing taxonomy, append them to the research database with a link to the source.
Guardrail
Every insight carries a verbatim quote; names and contact details are redacted before anything is stored.
Metric
Time from interview to published summary; share of insights backed by a traceable quote.

#07PRD first draft

Trigger
A product manager posts a problem statement with links to the evidence.
Stack
Claude Code / Cursor + Notion MCP + Linear MCP + GitHub MCP (read-only)
How it works
Gather the linked research, related tickets and code constraints; draft the PRD in the team template and list the open questions.
Guardrail
The document stays in draft status; assumptions are labelled as assumptions; the product manager owns scope and priority.
Metric
Time from problem statement to reviewable draft; number of review rounds before sign-off.

#08Support feedback clustering

Trigger
A weekly schedule over the last seven days of tickets and chats.
Stack
Hermes Agent / Claude Code + Intercom MCP or a helpdesk export + Linear MCP
How it works
Group conversations by underlying problem, count each cluster, attach sample tickets, compare with last week, link existing issues.
Guardrail
Counts come from a query, not from the model; PII is stripped; new issues are created as drafts for the product manager.
Metric
Share of tickets assigned to a cluster; time from a spike to a filed issue.

#09Release notes from merged work

Trigger
A release tag is created, or the sprint closes.
Stack
Claude Code / Codex + GitHub MCP + Linear MCP + Slack MCP
How it works
List merged PRs and closed issues since the last tag, group them by user-facing impact, write the notes, post the draft for review.
Guardrail
Only merged, linked work is listed; anything customer-facing is published by a person.
Metric
Time from tag to published notes; number of corrections after publication.

#10Competitor change monitoring

Trigger
A daily or weekly schedule over a fixed list of pricing, changelog and docs pages.
Stack
Hermes Agent cron + Firecrawl MCP or Playwright MCP + Notion MCP
How it works
Fetch each page, diff it against the stored snapshot, summarize real changes, file them in the competitor log with the source link.
Guardrail
A fixed URL allowlist; page text is untrusted data; the run has no write tools beyond the log.
Metric
Time from a competitor's change to an internal note; share of alerts judged relevant.

Analytics: workflows 11–15

The failure mode here is a confident wrong number. Every workflow queries a read-only replica, shows its SQL and recomputes each figure before posting.

#11Natural-language questions to SQL

Trigger
A teammate asks a data question in chat.
Stack
Claude Code / Hermes Agent + Postgres MCP Pro (--access-mode=restricted) on a read replica
How it works
Inspect the schema, write the query, run it with a row limit and a timeout, return the answer together with the SQL.
Guardrail
A read-only role on a replica, restricted mode and a statement timeout; sensitive columns are not granted.
Metric
Share of answers matching an analyst's query on the eval set; time to answer.

#12Weekly KPI digest

Trigger
A schedule: every Monday morning.
Stack
Hermes Agent cron or Claude Code (claude -p) + Postgres MCP Pro + Google Sheets MCP + Slack MCP
How it works
Run the saved metric queries, compare with the previous period, write a short digest with the biggest changes and dashboard links.
Guardrail
Metrics come from versioned SQL, never improvised; every figure is recomputed and compared before sending.
Metric
Share of digests sent on time; number of figures corrected after sending.

#13Metric anomaly alerts with context

Trigger
A scheduled check finds a metric outside its expected range.
Stack
Hermes Agent cron + Postgres MCP Pro (read-only) + Sentry MCP + Slack MCP
How it works
Confirm the deviation, slice it by segment, check recent releases and incidents, post an alert with the likely cause.
Guardrail
Thresholds live in code; the agent explains alerts but cannot silence them or change a threshold.
Metric
Share of alerts that led to an action; time from deviation to alert.

#14A/B experiment readout

Trigger
An experiment reaches its planned sample size or end date.
Stack
Claude Code / Codex + PostHog MCP or read-only warehouse SQL + Notion MCP
How it works
Pull exposure and conversion data, run the pre-registered analysis, check sample ratio and guardrail metrics, draft the readout.
Guardrail
The analysis plan is fixed before launch; no metric picking after the fact; the ship decision belongs to the owner.
Metric
Time from experiment end to readout; share of readouts unchanged after analyst review.

#15Data-quality checks

Trigger
A pipeline run finishes, or a nightly schedule fires.
Stack
Hermes Agent cron / Claude Code + Postgres MCP Pro (read-only) + Linear MCP
How it works
Run freshness, null, duplicate and row-count checks, compare with history, open a ticket with the failing query and sample rows.
Guardrail
Checks are deterministic SQL; the agent only explains and routes failures and has no write access to data.
Metric
Share of data incidents caught before a user reports them; time to detection.

Marketing: workflows 16–20

Marketing agents produce drafts and variants at volume. Brand, legal and budget decisions stay human: nothing here publishes or spends without approval.

#16Content repurposing

Trigger
A long-form piece — an article or a webinar transcript — is marked as published.
Stack
Claude Code / Hermes Agent + Notion MCP or Google Docs MCP + your CMS in draft mode
How it works
Extract the key points, draft channel-specific versions (post, thread, email intro), keep facts and links from the source.
Guardrail
Drafts only; every claim must exist in the source; an editor approves each channel before publishing.
Metric
Time from source to approved drafts; share of drafts published without a rewrite.

#17SEO content briefs

Trigger
A keyword is added to the content plan.
Stack
Claude Code / Hermes Agent + Firecrawl MCP (search and scrape) + Notion MCP
How it works
Collect the current top results, map search intent and subtopics, find gaps, write a brief with an outline, questions and internal links.
Guardrail
Search volumes come from your SEO tool's export, not from the model; competitor text is never copied.
Metric
Time to produce a brief; share of briefs the editor accepts without changes.

#18Ad creative variants with approval

Trigger
A campaign brief is approved, or a creative shows fatigue.
Stack
Claude Code / Hermes Agent + Google Sheets MCP + Slack MCP for approvals
How it works
Generate headline and copy variants within the brand rules, check length limits and banned claims, queue them for approval.
Guardrail
No access to ad accounts or budgets; a marketer approves each variant; regulated claims are checked against a blocklist.
Metric
Share of variants approved; time from brief to an approved set.

#19Social listening digest

Trigger
A daily schedule over tracked brand and category queries.
Stack
Hermes Agent cron + Firecrawl MCP (search) + Slack MCP
How it works
Collect new mentions, drop duplicates and spam, classify by topic and urgency, send a digest with links, flag what needs a reply.
Guardrail
The agent never replies in public; mention text is untrusted input; urgent items go to a named person.
Metric
Time from mention to internal flag; share of flagged items that were relevant.

#20Newsletter assembly

Trigger
A weekly schedule, two days before the send date.
Stack
Hermes Agent cron / Claude Code + Notion MCP + Firecrawl MCP + your email platform's draft API
How it works
Pull the week's published items, write summaries in the house style, assemble the draft issue, verify every link.
Guardrail
The agent only creates a draft; a person presses send; unsubscribe and legal blocks are locked in the template.
Metric
Time to assemble an issue; number of broken links or factual fixes found in review.

Operations: workflows 21–25

These workflows touch customers, money and personal data, so they get the strictest gates: confidence thresholds, dry runs and a diff someone signs off.

#21Support ticket triage

Trigger
A new ticket or chat arrives.
Stack
Hermes Agent / Claude Code + Intercom MCP or your helpdesk API + Notion MCP (knowledge base)
How it works
Classify topic, language and urgency, attach the matching help article, draft a reply, route to the right queue.
Guardrail
Below a confidence threshold the reply stays a draft; refunds, legal questions and angry customers always go to a person.
Metric
First response time; share of tickets routed correctly; share of drafts sent unedited.

#22Invoice and document extraction

Trigger
A PDF or a scan arrives in the invoices mailbox or folder.
Stack
Claude Code / Hermes Agent + Gmail MCP or Google Drive MCP + Google Sheets MCP + Stripe MCP
How it works
Extract vendor, dates, line items and totals, check that the sums add up, match against orders or payments, write a row.
Guardrail
Arithmetic is validated in code; low-confidence fields are flagged; the agent never initiates a payment.
Metric
Field-level accuracy on a labelled sample; share of documents processed without manual edits.

#23CRM hygiene

Trigger
A nightly schedule, or a deal changes stage.
Stack
Hermes Agent / Claude Code + Bitrix24 REST API (scoped inbound webhook) or HubSpot MCP
How it works
Find duplicates, missing fields and stale deals, propose merges and fixes as a diff, apply the approved batch, log every change.
Guardrail
Dry run first; merges and bulk updates need approval; the webhook is scoped to CRM only.
Metric
Share of records with required fields filled; duplicate rate; number of changes rolled back.

#24Meeting notes to Linear tasks

Trigger
A meeting transcript or a notes document is saved.
Stack
Claude Code / Hermes Agent + Google Drive MCP or Notion MCP + Linear MCP + Slack MCP
How it works
Extract decisions and action items with owners and dates, check for existing issues, create tasks, post the summary to the channel.
Guardrail
When the owner is unclear the task is created unassigned; attendees confirm the summary before it is final.
Metric
Share of action items that become tracked tasks; time from meeting end to posted summary.

#25Employee onboarding checklists

Trigger
HR marks a new hire with a role and a start date.
Stack
Hermes Agent / Claude Code + Notion MCP + Linear MCP + Google Calendar MCP + Slack MCP
How it works
Build a role-specific checklist from the template, create tasks for IT, the manager and the buddy, schedule intro meetings.
Guardrail
The agent requests access through tickets and never grants it; personal data stays in the HR system.
Metric
Share of onboarding tasks completed by day one; time from HR mark to a complete checklist.

Guardrails: a risk-to-control matrix

Most agent incidents fall into seven classes. Map each to a control you can test, and re-test it whenever you add a tool.

RiskGuardrail
Prompt injection through tool outputTreat pages, issues, emails and tickets as data. Keep read and write tools in separate runs; approve any write that follows untrusted input.
Data exfiltrationAllowlist tools and outbound domains; no general web or shell access in runs that read sensitive data.
Runaway costBudget caps per run and per day: turns, tokens, tool timeouts. Stop the loop at the cap and alert.
Destructive actionsApproval gates for delete, merge, send, pay and bulk update; show a dry-run diff first.
Hallucinated numbersValidate against the source: every figure links to its query or record and is recomputed before publishing.
PIIRedact before the model sees the text; grant only the columns the job needs.
Credential scopeOne least-privilege token per workflow, short expiry, rotation, read-only server modes.

A guardrail that lives only in the prompt is a suggestion. Enforce it outside the model: token scopes, server flags, host permissions, CI rules.

Rollout: from shadow mode to full autonomy

Promote each workflow through four stages and let eval results, not enthusiasm, decide when it moves.

  1. Shadow mode. The agent runs on real triggers but writes only to a log; people keep doing the job and you compare.
  2. Eval set. Collect a few dozen real cases with expected outcomes, ugly ones included; re-run them after every prompt, model or tool change.
  3. Limited autonomy. The agent acts on low-risk cases; everything else is a draft awaiting approval.
  4. Full autonomy. Only for reversible actions with a clean record; money, deletion and external messages keep their gate.

Three habits keep it healthy: a kill switch that stops the trigger without a deploy (in Hermes, hermes pause), a named owner per workflow who reads the failures, and a weekly review of the metric, rejected drafts and cost.

Common gotchas and fixes

SymptomCauseFix
Claude Code skips a remote server declared in .mcp.json.The entry has a url but no type, so it is read as a stdio server.Add "type": "http" to the entry and check with claude mcp list.
A tutorial installs @modelcontextprotocol/server-postgres or server-github.Those reference servers are archived and no longer maintained.Use the vendor's own server or a maintained one, such as Postgres MCP Pro in restricted mode.
After reading a web page, the agent calls tools nobody asked for.Prompt injection: tool output was treated as instructions.Separate read runs from write runs and keep approvals on for every write.
The model bill jumps overnight.A retry loop, or a huge tool result re-sent on every turn.Cap turns and tokens per run, set tool timeouts, alert on daily spend.
The agent keeps picking the wrong tool.Too many servers load their tool definitions into the context.Enable only what the job needs: X-MCP-Toolsets for GitHub, tools.include in Hermes, enabled_tools in Codex.

Frequently asked questions

Which agent host should I start with?

The one your team already uses. Claude Code, Codex and Cursor suit repository work; Hermes Agent suits scheduled and chat-triggered jobs on a server. See Claude Code vs Cursor.

Do I need MCP, or is function calling enough?

For one app with a few tools, function calling is enough. MCP pays off when several hosts and workflows share the same tools and permissions.

How do I estimate the model cost?

Multiply runs per day by tokens per run and by the model's price — the LLM cost calculator does the arithmetic — then set the result as a daily cap.

Can an agent work without human approval?

Yes, for reversible low-risk actions with a clean eval record, such as labelling tickets. Money, deletion and customer messages keep an approval gate.

Free · Daily AI brief

The AI brief engineers actually read

The day’s most important AI stories — models, tools, prices and agents — in five minutes. Free, unsubscribe in one click.

Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — 25 Production AI Agent Workflows with MCP (2026) — Hamidun News https://news.hamidun.com/en/guides/production-ai-agent-workflows-mcp-2026