Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions contents/docs/model-context-protocol/use-cases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,27 @@ Spin up flags, multivariate tests, and full A/B experiments without leaving your
outcome="Creates the feature and auto-links a dark-mode feature flag."
/>

### Manage change request approvals

Review and act on pending [approval requests](/docs/settings/approvals) without leaving your editor. Available to organizations with the approvals entitlement.

<PromptExample
prompt="What change requests are waiting for my approval?"
outcome="Lists pending requests where you're an eligible approver who hasn't voted yet."
/>
<PromptExample
prompt="Show me the details of change request #42."
outcome="Returns the full intent, policy snapshot, and current approval status for the request."
/>
<PromptExample
prompt="Approve change request #42."
outcome="Casts your approval vote after you type 'confirm'. If quorum is reached, the change is applied immediately."
/>
<PromptExample
prompt="Reject change request #15 because the rollout is too aggressive for production."
outcome="Records your rejection with the reason and notifies the requester."
/>

### Run SQL and HogQL queries

Drop into raw queries when you need precision. See the [SQL guide](/docs/data-warehouse/run-sql-mcp).
Expand Down
27 changes: 27 additions & 0 deletions contents/docs/settings/approvals.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,33 @@ This version tracking prevents race conditions where concurrent changes could le

> **Tip**: Coordinate with your team before modifying resources that have pending change requests. Check for pending requests in the resource's detail page or the approvals settings before making direct changes.

## Managing approvals with MCP

If you use the [PostHog MCP server](/docs/model-context-protocol) with an AI coding assistant like Claude Code, Cursor, or VS Code Copilot, you can list, review, approve, and reject change requests directly from your editor.

### Viewing pending requests

Ask your agent to show change requests awaiting your action:

- "What change requests are waiting for my approval?"
- "Show me pending approval requests"

The agent checks whether each request needs your decision by looking at three fields: `state` is `pending`, `can_approve` is `true`, and `user_decision` is `null` (meaning you're an eligible approver who hasn't voted yet).

### Approving or rejecting a request

To review and act on a specific request:

- "Show me the details of change request #42"
- "Approve change request #42"
- "Reject change request #15 because the rollout percentage is too aggressive"

Both approve and reject require you to type `confirm` in the chat before the action is executed. This two-step confirmation prevents accidental votes. Rejections also require a reason, which is recorded and shown to the requester.

If the approval vote reaches the policy's required quorum, the underlying change is applied immediately.

> **Note:** The MCP approval tools require the approvals entitlement and `approvals:write` scope. See the [MCP tools reference](/docs/model-context-protocol/tools) for the full list of change-request tools.

## Common use cases

### Requiring approval for production feature flag changes
Expand Down
Loading