# Connect BrainTube to Any AI

BrainTube ships a native Model Context Protocol (MCP) server, so any MCP-capable AI client can read your transcripts, summaries, and highlights as first-class context.

## What is MCP?

Model Context Protocol is an open standard from Anthropic that gives AI clients one uniform way to read external context. Instead of every tool building a bespoke integration, a client speaks MCP and the server exposes its data and tools through that shared interface.

BrainTube's MCP server is remote and hosted — there is nothing to install. You point a compliant client at the endpoint, authenticate, and your saved library becomes queryable from inside that client.

## Supported clients

- **Any MCP client** — Native Model Context Protocol. Same endpoint, same config. If your assistant speaks MCP, it works — no integration from us required.
- **Claude Desktop** — Read summaries, search transcripts, and ask Claude to reason over your library.
- **Cursor** — Pull engineering talks and tutorials into your coding workflow as live context.
- **ChatGPT** — Connects in Developer mode, or via OpenAPI for custom GPTs. Both paths in testing.
- **Perplexity** — Add BrainTube as a custom remote connector so answers can draw on your own saved material alongside the live web.
- **VS Code · GitHub Copilot** — Native MCP support in Copilot agent mode — pull saved talks and docs in as context beside the codebase.
- **Gemini CLI** — Add the endpoint to your settings.json and OAuth is discovered automatically. The Gemini chat app does not take custom connectors yet.
- **Codex CLI** — Remote streamable-HTTP is supported — add the URL, then sign in with codex mcp login.

## Setup

Endpoint: `https://mcp.brain-tube.com/mcp`

**Claude.ai (one-click, OAuth):** go to Settings → Connectors → Add custom connector. First type a name for it (e.g. BrainTube), then paste `https://mcp.brain-tube.com/mcp` in the URL field and sign in when prompted. No API key needed — Claude.ai connects via OAuth.

**Cursor, Claude Desktop, CLI tools, and other MCP clients:**

```json
{
  "mcpServers": {
    "braintube": {
      "type": "streamable-http",
      "url": "https://mcp.brain-tube.com/mcp",
      "headers": {
        "X-BrainTube-Token": "bt_your_key_here"
      }
    }
  }
}
```

1. Using Claude.ai? Connect with the one-click OAuth flow above and skip to step 4. For Cursor, Claude Desktop, CLI tools and any other MCP client, create an API key at Settings → API Keys (https://app.brain-tube.com/settings).
2. Paste the config above into your MCP client's config (or add the URL + X-BrainTube-Token header through the client's UI).
3. Replace bt_your_key_here with your real key and restart the client.
4. Try: "Summarize the last 5 videos I saved about pricing."

## Available MCP tools

| Tool | Description |
| --- | --- |
| `search_knowledge` | Full-text search over your personal BrainTube knowledge corpus. Searches across YouTube, Instagram, web, LinkedIn, GitHub, Twitter and more. |
| `get_video` | Get full details for a specific saved item including transcript, description, summary, key takeaways. Pass YouTube video ID or internal UUID. |
| `list_recent` | List your most recently saved items across all source types. |
| `get_stats` | Get your personal corpus statistics: total items saved, breakdown by source type, taint distribution. |
| `get_related` | Find items semantically similar to a given item using vector similarity. |
| `search_by_source` | Search your corpus filtered to a specific source type (youtube, web, notion, twitter, pdf, etc). |
| `search_by_date_range` | Semantic search scoped to items saved between two dates. |
| `tag_item` | Add or remove tags on a saved item. |
| `list_bookmarks` | List saved bookmarks from your corpus. Filter by read/unread status. |
| `toggle_bookmark` | Bookmark an item, remove a bookmark, or toggle its read/unread state. |
| `connect_readwise` | Connect your Readwise account to BrainTube by saving your Readwise API token. |
| `sync_readwise` | Import highlights from your Readwise library into your BrainTube corpus. |
| `ingest_notion_page` | Ingest a single Notion page into your BrainTube corpus. |
| `add_note` | Write a note or AI-generated synthesis back to a specific item in your corpus. |
| `get_recent_conversations` | Retrieve your most recently saved Claude and ChatGPT conversations. |
| `get_expertise_profile` | Analyse your corpus to build a knowledge expertise profile — expert, intermediate, surface, and blind spots by topic. |
| `get_session_brief` | One-shot session bootstrap: expertise profile, last 5 AI conversations, and corpus stats in a single call. |
| `ingest_content` | Ingest a single piece of content (note, article, document, etc.) into your BrainTube corpus. |
| `bulk_ingest` | Ingest up to 50 items in a single call with dedup and embedding. |
| `random_resurface` | Surface forgotten items from your corpus using weighted randomness. |
| `ingest_notion_database` | Ingest all pages from a Notion database into your BrainTube corpus. |
| `set_notion_api_key` | Save your Notion integration API key for ingest_notion_page and ingest_notion_database. |
| `backfill_embeddings` | Generate vector embeddings for all items that are missing them. Required before semantic search. |
| `generate_api_key` | Generate a personal API key for Obsidian Sync CLI or other integrations. Key shown once only. |
| `search_obsidian` | Search your local Obsidian vault via the Obsidian Local REST API plugin. |
| `chat_with_brain` | Ask a question to a public BrainTube Brain (curated knowledge base). Returns answer + source citations. |
| `list_brains` | List all Brains you have created with slug, name, item count, and visibility. |
| `get_knowledge_graph` | Build a knowledge graph around a specific item, showing how it connects to others via knowledge_edges. |
| `knowledge_health` | Run a health check on your knowledge corpus: missing embeddings, stale items, gaps, overall score out of 100. |
| `get_knowledge_index` | Get a topic-level index of your entire knowledge corpus grouped by primary topic. |
| `export_corpus` | Export your entire BrainTube knowledge corpus as a ZIP of Markdown files. Returns a signed download URL. |
| `compile_knowledge` | Generate concept articles from a topic cluster or Brain via the compile-knowledge edge function. |
| `get_concept_articles` | Query compiled concept articles from your knowledge base, filter by cluster, brain, or search text. |
| `tag_cooccurrence` | Find tags that frequently appear together across your corpus. |
| `entity_cooccurrence` | Find named entities (people, orgs, tools) that frequently co-appear across your corpus. |
| `detect_gaps` | Detect knowledge gaps: thin topics, entities without depth, stale high-value items. |
| `most_retrieved` | Return the items you retrieve most often, ranked by retrieval_count. |
| `export_claude_md` | Generate a CLAUDE.md-compatible knowledge context file for any Claude Code project. |
| `recompute_salience` | Trigger a salience score recompute across your corpus. |
| `deep_search` | Multi-hop knowledge search: semantic search + graph traversal from top results. |
| `retrieval_quality` | Get a retrieval quality dashboard: search hit rates, zero-result queries, top terms. |
| `find_path` | Find the shortest path between two items in your knowledge graph. |
| `compute_centrality` | Recompute graph centrality scores across your corpus. |
| `get_edge_history` | Get temporal history of knowledge edges between two specific items. |

## Endpoint & authentication

Endpoint: `https://mcp.brain-tube.com/mcp` (MCP streamable-http)

Authentication accepts either an `X-BrainTube-Token: bt_your_key_here` header or an `Authorization: Bearer bt_your_key_here` header. Claude.ai can use OAuth instead of an API key.

Create and rotate keys at https://app.brain-tube.com/settings.

## Frequently asked

**What is MCP and why does BrainTube use it?**

Model Context Protocol is an open standard from Anthropic that lets AI clients read external context through a unified interface. BrainTube ships a native MCP server so any compliant client — Claude Desktop, Cursor, Zed — can query your library without bespoke integrations.

**Which AI clients work with BrainTube today?**

Any client that speaks MCP. That's the point of building on an open standard instead of one integration at a time — when a new assistant ships MCP support, it reaches your library without us shipping anything. Claude Desktop and Cursor are the ones walked through step by step below; ChatGPT support is in testing. Anything speaking MCP streamable-http uses the same endpoint and the same config.

**Do I need to be on a paid plan to use the MCP server?**

No. MCP access is included on every plan, including Free. What differs by tier is the BrainToken allowance: saving items, running searches and asking your brain all spend BrainTokens, and higher tiers get more of them. Free starts with 30 BrainTokens a month.

**Where is my API key stored and how do I rotate it?**

Keys are created in the BrainTube app under Settings → API Keys. They are shown once at creation, hashed at rest, and can be rotated or revoked at any time. Each key has its own audit log.

**Can BrainTube read my private notes or only public videos?**

BrainTube reads only what you save into your own library — public YouTube videos, articles you ingest, PDFs you upload. It never crawls third-party accounts on your behalf.

**What happens to my data if I disconnect a client?**

Disconnecting an MCP client removes its access. Your library, summaries, and highlights remain in BrainTube untouched. You can reconnect or export everything at any time.
