> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Events

> Let agents connected over MCP subscribe to connector and Data Sync events, choose which events each connection can receive, and revoke subscriptions.

With **MCP Events**, an agent connected to the [StackOne MCP server](https://docs.stackone.com/ai-platforms/mcp-server.md) subscribes to [events](https://docs.stackone.com/gateway/concepts/events.md) on the Linked Accounts it was granted, so it hears about a new hire or a changed deal without polling. The agent's client gives StackOne a callback URL when it subscribes, and StackOne sends each event there, signed.

```mermaid theme={null}
sequenceDiagram
    participant Agent as Agent's client
    participant S as StackOne MCP
    participant P as Provider or Data Sync

    Agent->>S: events/list, then events/subscribe with a callback URL
    S->>Agent: Verification request to the callback URL
    Agent-->>S: Echoes the challenge
    P->>S: A record is added, updated or removed
    Note over S: Checks the connection still has access
    S->>Agent: Signed POST with the account, connector, record type, record ID and change
    Agent->>S: Tool call to read the record
```

StackOne implements the webhook delivery mode of the official [MCP Events extension](https://modelcontextprotocol.io/extensions/events/overview) ([SEP-3415](https://modelcontextprotocol.io/seps/3415-events-extension)). ChatGPT supports MCP Events today, so an event can wake a ChatGPT chat. See [ChatGPT](https://docs.stackone.com/ai-platforms/openai/overview.md#chatgpt) to connect it.

> [!NOTE]
>
> Clients without MCP Events support keep working with tools as before and see no events. To act on the same changes from your own backend, send them to a [webhook](https://docs.stackone.com/connect/webhooks.md) in your project, including [Data Sync events](https://docs.stackone.com/optimize/data-sync/events.md).

## Native and Data Sync events

An agent can subscribe to two kinds of event. Both are listed by `events/list` and subscribed to with `events/subscribe`:

| Kind | Where it comes from | When it arrives | Named |
| - | - | - | - |
| **Native** | The provider's own webhooks | In real time, as StackOne receives it | The connector's event ID, for example `jira_webhook_issue_created` |
| **Data Sync** | [Data Sync](https://docs.stackone.com/optimize/data-sync/overview), which compares each run with the records it already stored | Once a scheduled sync run finishes, as often as every 15 minutes for actions that sync incrementally | `{action_id}.added`, `{action_id}.updated` or `{action_id}.removed`, for example `humaans_list_people.added` |

Data Sync events let an agent hear about changes in systems that send no webhooks. They're offered as soon as the action has a sync running on the account, with no webhook and no event toggles on the Connector Profile. `removed` events come from full re-syncs. See [Data Sync events](https://docs.stackone.com/optimize/data-sync/events.md) for what each change means.

### What the agent receives

Each event carries identifiers only: the Linked Account, the connector, the record type, the record ID and what changed. No record content or provider text reaches the agent's context through an event. To see the record, the agent reads it with a tool call, under the same permissions, [policies](https://docs.stackone.com/secure/policies), [Defender](https://docs.stackone.com/secure/defender.md) checks and [PII redaction](https://docs.stackone.com/secure/pii-redaction.md) as any other call.

### Who can subscribe

Subscriptions belong to the connection the agent uses, not to the project:

* **OAuth connections** made under **Connected Apps → OAuth apps** can subscribe.
* **Token apps** can subscribe.
* **Personal API keys** can subscribe.
* **Project API keys** can't. A backend that calls StackOne with a project API key receives events through a [webhook](https://docs.stackone.com/connect/webhooks.md) instead.

## Turn on MCP Events for a project

MCP Events is off for every project until a **Project Admin** turns it on.

**1. Open the MCP settings**

Go to **Project Settings → MCP Settings**.

**2. Allow agents to subscribe**

1. Turn on **MCP Events**.
2. Click **Save changes**.

Agents can subscribe as soon as you save. Turning the setting off deletes every subscription in the project, and agents can't subscribe again until it is back on.

## Which events an agent is offered

An agent subscribes to one event on one Linked Account at a time. `events/list` offers it:

* **Native events** that are enabled on the account's [Connector Profile](https://docs.stackone.com/connect/managing-connectors/connector-profiles.md). When StackOne registers the provider webhook itself, the registration must also have succeeded on the account. Events whose provider webhook is set up by hand are offered too, and the agent is told the provider side must be set up before anything arrives.
* **Data Sync events** for actions with [Data Sync](https://docs.stackone.com/optimize/data-sync/overview) enabled and a schedule running on the account. The connection must also be allowed the action itself or its `{action_id}_s1query` tool.

Each event must also be allowed by the connection's grant.

## Choose which events a connection can receive

A connection receives events only on accounts it was granted, and only the events its grant allows.

On the consent screen, each account's side panel lists its events under **Events**, beside its actions:

* **Native** events are listed by name.
* **Data Sync** events are grouped by action, with **Added**, **Updated** and **Removed** each ticked separately.

Every access level grants every event on the account, including events added to it later. Unticking an event makes the account **Custom**, and the connection receives only the events left ticked. A Data Sync event can't be ticked until its action, or the action's Deep Query copy, is allowed. An account with events and no actions grants its events at any level.

The **Events** section appears when MCP Events is on for the project. **Edit tool access** under **Connected Apps** keeps a grant's events as they are. To change them, run the connection again from the client.

Token apps receive every event on the accounts they were given.

> [!NOTE]
>
> Connections authorized before their project could grant events carry none. Reconnect the client, or create a new token app, to give it events.

## Set up an agent to receive events

Set up the connector, its sync and the agent's access from the dashboard, or ask an agent connected over StackOne MCP to do it for you. Either way, MCP Events must be on for the project.

> [tab] From your agent
>
> An agent connected over OAuth with your StackOne login can set up the connector and its events itself, so asking it to watch your HR system for new joiners doesn't need a trip to the dashboard. Its management tools need the **Project Admin** or **Project Member** role.
>
> **1. Connect the client**
>
> Connect the client to the [StackOne MCP server](https://docs.stackone.com/ai-platforms/mcp-server.md#client-setup-oauth) and sign in with your StackOne login. For ChatGPT, follow [ChatGPT](https://docs.stackone.com/ai-platforms/openai/overview.md#chatgpt).
>
> **2. Ask for the connector**
>
> Ask the agent to set up the connector, for example "Connect Humaans and tell me when someone new joins". The agent opens a Connector Profile for you to review with `stackone_plan_connector_profile`, or creates one with `stackone_create_connector_profile`. You enter any credentials in StackOne yourself, never in the chat.
>
> **3. Turn on Data Sync for the action**
>
> For changes the provider sends no webhook for, ask the agent to turn on Data Sync for the action that lists those records, such as `humaans_list_people`, and say how often it should run.
>
> **4. Link the account**
>
> The agent starts linking with `stackone_link_account` and gives you a link to authenticate with the provider. Once the account is linked and added to the connection, the agent finds it with `stackone_list_accounts`.
>
> **5. Subscribe**
>
> The agent calls `events/list`, picks the event, such as `humaans_list_people.added`, and subscribes with `events/subscribe`. The subscription shows on the account's **Agent Subscriptions** tab.

> [tab] From the dashboard
>
> **1. Set up the connector**
>
> Create a [Connector Profile](https://docs.stackone.com/connect/managing-connectors/connector-profiles.md) for the connector. For native events, enable the events on the profile. For Data Sync events, turn on [Data Sync](https://docs.stackone.com/optimize/data-sync/overview) for the action that lists the records, such as `humaans_list_people`.
>
> **2. Link the account**
>
> [Link the account](https://docs.stackone.com/connect/managing-connectors/linking-accounts.md) the agent should hear about.
>
> **3. Connect the client**
>
> Connect the client to the [StackOne MCP server](https://docs.stackone.com/ai-platforms/mcp-server.md), and on the consent screen grant the account and the events the agent should receive.
>
> **4. Ask the agent to subscribe**
>
> Ask the agent for what it should do when the event arrives, for example "When someone new joins, message me with their details". The agent calls `events/list` and `events/subscribe`, and the subscription shows on the account's **Agent Subscriptions** tab.

## How a subscription stays live

StackOne checks the subscription against the current state of its connection before every event is sent, not only when the agent subscribed. The subscription ends, with one final `terminated` message sent to the callback URL, when any of these happens:

* **MCP Events** is turned off for the project.
* The OAuth grant is revoked or expires, or the token app is revoked or expires.
* The Linked Account is unlinked, disabled or removed from the connection's grant.
* The event is unticked in the connection's grant.
* For a Data Sync event, the connection loses its action, a [runtime policy](https://docs.stackone.com/secure/policies) stops it running the action, or the action's sync schedule is deleted.

A Linked Account in an error state pauses delivery rather than ending the subscription, and delivery resumes once the account is healthy. Some clients ignore the `terminated` message and find out when their next renewal is refused.

> [accordion] Lifetime and limits
>
> A subscription lasts for the time the agent's client asks for, between 5 minutes and 24 hours (1 hour if it doesn't say), and never past the end of its connection: 90 days for an OAuth grant, or a token app's expiry. The client renews it before then, and one that isn't renewed expires.
>
> Each connection can hold 100 subscriptions, and each project 1,000.

> [accordion] Callback verification
>
> When an agent subscribes, StackOne sends a signed verification request to the callback URL, and the subscription is refused if the URL doesn't answer it. The URL must use HTTPS with a hostname rather than an IP address, and StackOne doesn't follow redirects. A URL that has passed isn't checked again for that connection for 24 hours.

> [accordion] Failed deliveries
>
> A delivery that doesn't get a `2xx` response is tried up to 5 times over about 15 minutes. A `4xx` response other than `408`, `425` and `429` stops retries straight away. A `429` or `503` with a `Retry-After` header is retried after the time it asks for, within the same 15 minutes.
>
> A subscription whose deliveries keep failing for an hour is switched off and shows as **Inactive**. The client's next renewal switches it back on and tells the client how long it had been failing.

## Review and revoke subscriptions

Subscriptions are listed in two places, each showing the event, the subscriber, status, expiry and the last delivery:

* On a Linked Account's **Agent Subscriptions** tab, for every agent subscribed to that account.
* Under **Connected Apps**, on the **Agent Subscriptions** tab of an OAuth app or token app's details, for every account that app is subscribed to.

| Status | Means |
| - | - |
| **Active** | Delivering |
| **Failing** | Recent deliveries are failing and being retried |
| **Inactive** | Switched off after an hour of failed deliveries, until the client renews it |
| **Expired** | Not renewed in time |

Every **Project Admin**, **Project Member** and **Project Viewer** can see the lists. **Project Admins** who can update the Linked Account can revoke a subscription.

Revoking deletes one subscription, and a client that is still allowed the event can subscribe again. To stop an agent receiving an event for good, untick the event in its grant, revoke the connection under **Connected Apps**, or turn off **MCP Events**.

## Next steps

> [card] [StackOne MCP Server](https://docs.stackone.com/ai-platforms/mcp-server.md)
>
> Connect a client and grant it accounts, actions and events.

> [card] [ChatGPT](https://docs.stackone.com/ai-platforms/openai/overview.md#chatgpt)
>
> Add StackOne to ChatGPT, which supports MCP Events.

> [card] [Data Sync](https://docs.stackone.com/optimize/data-sync/overview)
>
> Turn on sync for the actions whose changes agents should hear about.

> [card] [Webhooks](https://docs.stackone.com/connect/webhooks.md)
>
> Send the same events to your own backend.

Building your own MCP client that receives events? See [MCP Events in Embed](https://docs.stackone.com/embed/call-actions/mcp/events.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.