MCP Authentication

The MCP server uses API keys for authentication. Each request must include a valid key.

Creating an API Key

  1. Subscribe to the MCP + API plan
  2. Go to Profile → API
  3. Click "Generate API Key"
  4. Copy the key immediately — it's shown only once
Your API key is shown only once when generated. If you lose it, you can regenerate a new one (the old key will be revoked).

Key Format

API keys start with the tsk_ prefix followed by 48 characters:

tsk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4

How Authentication Works

When using the npm package (tube-search-mcp), pass the key via environment variable:

TUBE_API_KEY=tsk_... npx tube-search-mcp

When connecting directly via Streamable HTTP, include the key in the Authorization header:

Authorization: Bearer tsk_YOUR_KEY_HERE

Rotating Keys

To rotate your API key:

  1. Go to Profile → API
  2. Click "Regenerate"
  3. The old key is immediately revoked
  4. Copy the new key and update your client config

Security

Store your API key in environment variables, not in code or config files committed to version control.

← Back to MCP Guide