Set up You Tube Analytics in Metorial for AI agents
Share You Tube Analytics with your team in Claude, ChatGPT and Cursor through Metorial: OAuth sign-in, 7 tools (4 read-only).
To give your team You Tube Analytics in Claude, ChatGPT, Cursor and other AI clients, an admin shares the You Tube Analytics integration in a Metorial portal, and each person signs in to You Tube Analytics with their own account. Agents can retrieve and analyze YouTube channel and video performance data. The integration has 7 tools, 4 read-only and 3 write, plus 2 triggers.
What you'll learn
- How an admin shares You Tube Analytics in a portal and how each person connects
- The 5 OAuth scopes You Tube Analytics can request, and what each one allows
- How to keep the 4 read-only tools and reject the other 3
Before you start
- A portal with at least one access group
- An account with You Tube Analytics for each person who connects
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in method
| Method | Type | What a person provides |
|---|---|---|
| Google OAuth | OAuth | Signs in to You Tube Analytics |
Google OAuth
People sign in to You Tube Analytics and approve the scopes you allow. The integration can request:
| Scope | Name | What it allows |
|---|---|---|
https://www.googleapis.com/auth/yt-analytics.readonly | Analytics Read-Only | View YouTube Analytics reports for your YouTube content |
https://www.googleapis.com/auth/yt-analytics-monetary.readonly | Analytics Monetary | View monetary and non-monetary YouTube Analytics reports for your YouTube content |
https://www.googleapis.com/auth/youtube | YouTube Manage | Manage your YouTube account (required for group management) |
https://www.googleapis.com/auth/youtube.readonly | YouTube Read-Only | View your YouTube account (required for reports.query) |
https://www.googleapis.com/auth/youtubepartner | YouTube Partner | View and manage your assets and associated content on YouTube |
The read-only tools need only https://www.googleapis.com/auth/youtube and https://www.googleapis.com/auth/yt-analytics.readonly. Allow just those in the Scopes picker when you create your own auth credentials, and the connection cannot change anything.
Use your own You Tube Analytics OAuth app
With your own OAuth app, people see your company's name on the You Tube Analytics consent screen, and the client ID and secret belong to you.
Start the credentials in Metorial
In the dashboard, select Settings, then Organization Settings. Under Integrations and MCP, select Provider Auth, then Create Auth Credentials. Choose You Tube Analytics and copy the Redirect URI.
Register the app
In the Google Cloud console, enable the API behind You Tube Analytics under APIs & Services, Library. Then go to Google Auth platform, Clients, click Create Client, choose Web application, and paste the redirect URI from Metorial under Authorized redirect URIs. Google shows the client secret only when you create the client.
The Google Workspace guide covers the consent screen and the OAuth client in Google Cloud step by step.
Finish in Metorial
Copy the app's client ID and client secret. Back in Metorial, enter a Name, the Client ID and the Client Secret, review Scopes, and select Create. Then pick these credentials for the You Tube Analytics integration.
Admin: share You Tube Analytics in a portal
In the dashboard
Open Shared Resources
Open Workforce, choose the portal, and select Shared Resources under Access.
Share a new integration
Select Share a Resource, then New Integration, and choose You Tube Analytics. For how members connect, choose Each person connects, so everyone signs in to You Tube Analytics as themselves.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from You Tube Analytics.
Choose who gets it
Add the access groups that should see You Tube Analytics. When a person asks for access from the portal, the request appears under Access Requests.
With the CLI
The CLI cannot create the per-user You Tube Analytics integration. Once it exists, check which groups have it:
Employee: connect You Tube Analytics
In the portal
Open You Tube Analytics in the catalog
Sign in to your portal and open You Tube Analytics. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. A You Tube Analytics sign-in tab opens. Sign in and approve the permissions listed.
Confirm
The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.
With the CLI
catalog search prints the catalog item ID.
Add it to your AI client
metorial install adds your You Tube Analytics connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.
For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.
Make it read-only
Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 4 read-only tools, such as query_analytics and list_bulk_reports, and lose the 3 write tools, such as manage_groups or manage_group_items.
Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.
Check it worked
metorial tools lists the 7 tools, minus any you rejected. list_report_types takes no input. It lists available YouTube Reporting API report types.
To see every input a tool takes, run metorial schema <integration-id> <tool-key>.
Tools
Read-only tools (4)
list_bulk_reports: List available bulk reports for a YouTube Reporting API job. NeedsjobId.download_bulk_report: Get the download URL for a YouTube bulk report. NeedsjobIdandreportId.query_analytics: Query YouTube Analytics to generate custom reports with specific metrics and dimensions. NeedsstartDate,endDateandmetrics.list_report_types: List available YouTube Reporting API report types.
Write tools (3)
manage_group_items: List, add, or remove items from a YouTube Analytics group. Needsaction.manage_groups: Create, update, delete, or list YouTube Analytics groups. Needsaction.manage_reporting_jobs: Create, list, get, or delete YouTube Reporting API bulk report jobs. Needsaction.
Triggers
You Tube Analytics has 2 triggers, which fire on events in You Tube Analytics:
new_bulk_reports: Polls for newly generated bulk reports across your YouTube Reporting API jobs.inbound_webhook
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use You Tube Analytics there
- Create custom OAuth credentials: the Provider Auth screens in more detail
- Tool permissions: tool filters and what employees see
- Google Workspace guide: the consent screen and the OAuth client in Google Cloud
- You Tube Analytics on metorial.com: the integration overview