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-createmakes a draft,workflows-patch-graphandworkflows-updatechange it, andworkflows-discard-draftthrows the draft away. - Test and publish.
workflows-test-runruns a workflow without sending to real recipients, andworkflows-publishmakes the draft live. - Read and list.
workflows-listandworkflows-getpull workflows into your session, andworkflows-update-schedulechanges when a scheduled workflow runs. - Debug a run.
workflows-list-invocations,workflows-get-invocation,workflows-logs, andworkflows-list-batch-jobsshow what actually happened on a given run. - Check performance.
workflows-statsreports on one workflow andworkflows-global-statsacross all of them. - Move between revisions.
workflows-list-revisions,workflows-get-revision, andworkflows-restore-revisionlet 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.
Related
- MCP overview – install and authentication
- Workflows in the web app – the visual builder
- Content library and message templates – creating templates over MCP