Use Workflows over PostHog MCP

Contents

The PostHog MCP server brings Workflows into Claude Code, Cursor, and other AI tools. It covers the full lifecycle – create a draft, edit its graph, test it, publish it, and read its stats and logs – so you can build and ship a workflow without leaving your editor.

What you can do here

Through MCP tools, your agent can:

  • Create and edit workflows. workflows-create makes a draft, workflows-patch-graph and workflows-update change it, and workflows-discard-draft throws the draft away.
  • Test and publish. workflows-test-run runs a workflow without sending to real recipients, and workflows-publish makes the draft live.
  • Read and list. workflows-list and workflows-get pull workflows into your session, and workflows-update-schedule changes when a scheduled workflow runs.
  • Debug a run. workflows-list-invocations, workflows-get-invocation, workflows-logs, and workflows-list-batch-jobs show what actually happened on a given run.
  • Check performance. workflows-stats reports on one workflow and workflows-global-stats across all of them.
  • Move between revisions. workflows-list-revisions, workflows-get-revision, and workflows-restore-revision let you inspect history and roll back.

For the full list of tools and how to scope a session to a subset, see the MCP tools reference.

Drafts are the safety net

A workflow created over MCP is a draft. It does not run and nobody receives a message until it's published, so an agent can build the whole thing and hand it to you for review. Test it with workflows-test-run first, then publish – from MCP or from the web app.

Set up

Connect the PostHog MCP server to your AI tool of choice, then grant it access to your project. The MCP overview covers install and authentication for each client.

Community questions

Was this page useful?