MCP Server
Connect agents to TubeAnalytics with MCP
Use the streamable HTTP transport for remote clients or the stdio transport for local agents. The server exposes discovery resources, authenticated account tools, and canonical product metadata.
Explore related pages
MCP Transport
LiveUse the streamable HTTP transport at /api/mcp for remote MCP clients.
MCP discovery manifest
Machine-readable model context protocol manifest with tool schemas.
OpenAPI specification
REST API contract for channels, analytics, videos, audience, and competitors.
AI Guidance
Crawler and agent discovery policy in plain text.
AI Pricing Manifest
Machine-readable pricing, trial, and checkout details for agents.
Agent Discovery Index
Compact discovery index that points at the pricing and protocol surfaces.
Product API Hub
Product-facing overview of API keys, allowances, and integration entry points.
Developer Hub
Implementation guides, webhooks, SDKs, and rate-limit references.
What the MCP server exposes
The TubeAnalytics MCP server is the agent-facing layer for discovery and account-aware actions. It is backed by the same product contract used by pricing, the OpenAPI document, and the billing surfaces, so plan availability and access rules stay consistent across the site and runtime.
The server exposes four discovery resources: the canonical product contract, ai.txt guidance, the AgentKA manifest, and the streamable HTTP transport endpoint. That keeps the machine-readable surface small, stable, and easy for tools to cache.
- 6 published resources
- 9 registered tools
- Streamable HTTP transport at /api/mcp
- Local stdio transport via `npm run mcp:stdio`
Available tools
The tool surface is intentionally narrow so agents can do useful work without needing to scrape the dashboard. Public discovery tools are available for planning and validation, while authenticated tools return account-specific state and channel data.
- list_channels - List connected YouTube channels
- get_channel_analytics - Get channel analytics for a time range
- list_videos - List and paginate channel videos
- get_audience_insights - Get audience demographics and segments
- list_competitors - List tracked competitor channels
- get_product_contract - Read the canonical product contract
- get_openapi_spec - Read the OpenAPI specification
- find_citation_gaps - Find AI citation gaps
- get_canonical_content - Get canonical content details for a citation gap
Authentication and access
Discovery-oriented tools such as the product contract, OpenAPI spec, and AI guidance do not require a user token. Any tool that returns account-specific or channel-specific data requires a TubeAnalytics API key in the Authorization header.
That split lets agents inspect the contract before they authenticate, while still keeping private workspace data behind the same API key rules as the REST API.
When to use MCP versus REST
Use MCP when an agent needs to discover the available tools, inspect metadata, or execute a multi-step task with a structured tool call. Use the REST API when a developer needs straightforward programmatic access to channels, analytics, videos, and competitor data from a custom application or backend job.
The two surfaces are complementary: MCP is optimized for agents, while the REST API is optimized for direct integration code. Both point at the same canonical product contract and discovery source of truth.
Need a human-readable starting point?
Use the MCP page to understand the transport, resources, and tool surface before wiring a client.