I've been testing OAuth MCP connections in Agent Canvas (GitLab, Atlassian Rovo, and Linear), and they're working pretty reliably.
One gap: MCP connections don't currently help us create event-driven automations. Most MCP servers don't expose tools for creating webhooks, so the agent needs to make raw API calls to the provider.
It would be interesting if the agent could reuse the OAuth access token from the MCP connection for those API calls, enabling an end-to-end flow for creating Event-driven Automations.
Potential flow:
1. User clicks on a "Linear Issue to PR" Automation Template
2. User connects a provider via OAuth MCP (e.g. Linear)
3. System stores the OAuth token as a Secret (e.g., LINEAR_ACCESS_TOKEN)
4. FastMCP refreshes the Secret with a new access token as needed
5. Agent uses the Secret to call the Linear API and create the webhook (<-- this is what storing the OAuth Access Token as a Secret solves)
6. OpenHands configures that webhook as the automation's event source
Is something like this possible with our current MCP/OAuth architecture?