> ## Documentation Index
> Fetch the complete documentation index at: https://daily-hush-pcc-session-recordings-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Pipecat Context Hub

> A local index of Pipecat docs, examples, and API source for AI coding tools — available as a CLI and an MCP server.

[Pipecat Context Hub](https://github.com/pipecat-ai/pipecat-context-hub) indexes Pipecat documentation, code examples, and framework API source into a local vector database on your machine. It's built for coding workflows: queries return the actual source and snippets your AI tool needs to write working code, not synthesized prose.

Pipecat's docs, examples, and API surface change often and span several repositories, so a model working from training data goes stale fast. The hub keeps a fresh local index you query directly. You can also point it at your own repositories (public or private) to index private code alongside the framework.

Every tool runs two ways: as a one-shot CLI command and as an MCP server. Use the CLI for a quick lookup. Add the MCP server when a session needs repeated, exploratory queries.

<Note>
  This is a tool for *your* coding agent, not something your bot uses at
  runtime. For a bot that connects to MCP servers, see
  [`MCPClient`](/api-reference/server/utilities/mcp/mcp) and the
  `pipecat-ai[mcp]` extra.
</Note>

## Setup

The hub is published to PyPI as `pipecat-ai-context-hub`. Co-install it with the Pipecat CLI, then let it configure your coding agent and build the index in one step:

```bash theme={null}
uv tool install "pipecat-ai[cli]" --with pipecat-ai-context-hub
pipecat mcp install
```

`install` registers the MCP server with each coding agent it finds, echoing each command it runs, then builds the index — a few minutes the first time, since it downloads local embedding models. Every hub command is then available as `pipecat mcp <command>`; see the [`pipecat mcp` reference](/api-reference/cli/mcp) for the full flag surface.

<Warning>
  `--with` replaces the tool environment rather than adding to it. If you also
  use `pipecat cloud`, name both plugins: `uv tool install "pipecat-ai[cli]"   --with pipecatcloud --with pipecat-ai-context-hub`.
</Warning>

If the index gets corrupted, force a rebuild:

```bash theme={null}
pipecat mcp refresh --force
```

If your project targets an older Pipecat version, pin the hub to it so results match what you're running:

```bash theme={null}
pipecat mcp refresh --framework-version v0.0.96
```

### Without the Pipecat CLI

The hub runs standalone too. [`uvx`](https://docs.astral.sh/uv/), uv's one-shot runner, fetches and runs it on demand with nothing installed:

```bash theme={null}
uvx pipecat-ai-context-hub refresh   # build local index (~2 min first run)
```

Every command on this page works either way — `pipecat mcp refresh` and `uvx pipecat-ai-context-hub refresh` are the same command.

<Tip>
  To install it once instead of fetching on demand, run `uv tool install
      pipecat-ai-context-hub`. This puts the command on your `PATH`, so you drop the
  `uvx` prefix and call it directly, using the shorter `pipecat-context-hub`
  name.
</Tip>

### Which install to choose

The two installs expose different things, because a command is only visible inside the environment its package was installed into:

* **Co-installed with the CLI** (`--with`) gives you `pipecat mcp`, but does not put `pipecat-context-hub` on your `PATH`.
* **Installed on its own** (`uv tool install pipecat-ai-context-hub`) gives you `pipecat-context-hub` on your `PATH`, but not `pipecat mcp`.

Doing both works and gives you both names, at the cost of a second copy on disk — the hub's retrieval stack is around 1 GB, and the two environments share very little. Pick one unless you have a reason not to.

## Custom sources

Point the hub at your own repositories with `PIPECAT_HUB_EXTRA_REPOS`, a comma-separated list of GitHub `org/repo` slugs. These are indexed alongside the default Pipecat repos, so your private code is searchable next to the framework. Set the variable, then run `refresh`:

```bash theme={null}
PIPECAT_HUB_EXTRA_REPOS="your-org/your-repo,your-org/another-repo" \
  uvx pipecat-ai-context-hub refresh
```

The hub also reads a `.env` file from the directory you run the command in, so you can keep the list there instead of exporting it each time:

```bash theme={null}
# .env
PIPECAT_HUB_EXTRA_REPOS="your-org/your-repo,your-org/another-repo"
```

Slugs that duplicate a default repo are deduped automatically, so it's harmless to leave them in. Your custom repos then surface through the same `search_*` and `get_*` tools as the framework.

<Note>
  Only Python (`.py`/`.pyi`), TypeScript (`.ts`/`.tsx`), and RST (`docs/**.rst`)
  files are parsed into the searchable index. Other languages (for example
  Swift, Kotlin, or C++ SDKs) are cloned but won't surface in `search_api` or
  `get_code_snippet`.
</Note>

<Tip>
  The hub clones with standard git, so private repos index fine as long as your
  local git is already authenticated to GitHub — via an SSH key or a git
  credential helper. The hub itself adds no token configuration. See the repo's
  [`.env.example`](https://github.com/pipecat-ai/pipecat-context-hub/blob/main/.env.example)
  for ready-made repo bundles.
</Tip>

## Tools

| Tool                | Use it to                                                                                            |
| ------------------- | ---------------------------------------------------------------------------------------------------- |
| `search_docs`       | Find guides and conceptual docs ("how do I ...?")                                                    |
| `search_examples`   | Find working example code by task or component                                                       |
| `search_api`        | Find class definitions, method signatures, frame types, and inheritance                              |
| `get_doc`           | Fetch a full doc page by ID or path                                                                  |
| `get_example`       | Fetch the full source files for an example                                                           |
| `get_code_snippet`  | Fetch targeted code by symbol, intent, or file and line range                                        |
| `check_deprecation` | Check whether an import path is deprecated or removed (can evaluate lifecycle at a specific version) |
| `get_hub_status`    | Report index health, freshness, and the indexed Pipecat version                                      |

The three `search_*` tools return a ranked list of hits, each with a relevance `score`. Each response also carries an evidence report with an overall `confidence`, a `low_confidence` flag, and suggested follow-up queries. The agent triages that list, picks the best fit, then calls a `get_*` tool to pull the full content. The coding agent can pass your `pipecat_version` to score and filter results for compatibility with the version you target. The remaining two tools stand alone: `check_deprecation` reports a symbol's lifecycle, and `get_hub_status` reports index health.

To make your coding agent reach for these tools automatically, add the [recommended CLAUDE.md / AGENTS.md instructions](https://github.com/pipecat-ai/pipecat-context-hub/blob/main/docs/README.md#add-claudemd-instructions-recommended) to your project.

## CLI lookups

Every tool is also a one-shot CLI command, so you can query the index from a shell with no MCP setup. Reach for this when you need a single answer fast, like a deprecation check, an API signature, or an index health check. Each command prints the tool's JSON to stdout:

```bash theme={null}
pipecat mcp check-deprecation PipelineTask      # is this symbol deprecated?
pipecat mcp search-api "WebsocketServerParams"  # find an API signature
pipecat mcp status                              # index health / freshness
```

Or, without the Pipecat CLI, the same commands under `uvx pipecat-ai-context-hub`. The [`pipecat mcp` reference](/api-reference/cli/mcp) documents every command and flag.

## MCP server

For a longer build or debugging session where the model probes the index repeatedly, add the hub as an MCP server instead of shelling out per query. It keeps the index warm for the whole session and exposes the same tools to your coding tool directly.

`pipecat mcp install` does this for you wherever the client ships its own CLI, and prints the config to paste where it doesn't:

```bash theme={null}
pipecat mcp install                     # every detected client, then build the index
pipecat mcp install --client cursor     # print the config for one client
pipecat mcp install --print-config      # show what would be registered, change nothing
```

To register by hand instead:

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add pipecat-context-hub -- uvx pipecat-ai-context-hub serve
    ```
  </Tab>

  <Tab title="Codex">
    ```bash theme={null}
    codex mcp add pipecat-context-hub -- uvx pipecat-ai-context-hub serve
    ```
  </Tab>

  <Tab title="Cursor">
    Add to your Cursor MCP config:

    ```json theme={null}
    {
      "mcpServers": {
        "pipecat-context-hub": {
          "command": "uvx",
          "args": ["pipecat-ai-context-hub", "serve"]
        }
      }
    }
    ```
  </Tab>

  <Tab title="VS Code">
    Add to `.vscode/mcp.json`:

    ```json theme={null}
    {
      "servers": {
        "pipecat-context-hub": {
          "command": "uvx",
          "args": ["pipecat-ai-context-hub", "serve"]
        }
      }
    }
    ```
  </Tab>
</Tabs>

A newly added MCP server loads when your coding tool starts a session, so add it before opening the session you want to use it in.

See the [repo docs](https://github.com/pipecat-ai/pipecat-context-hub) for additional configuration options.

## Keeping the index current

A stale index is invisible: your agent answers just as confidently from month-old APIs, and you find out when the generated code doesn't match the version you're running. So the Pipecat CLI checks on the way past and prints a one-line notice on stderr when something needs attention:

```
⚠ Pipecat Context Hub index is 42 days old — run `pipecat mcp refresh` so coding agents don't cite stale APIs.
⚠ Pipecat Context Hub index was built for pipecat-ai 1.2.0, but this project uses 1.6.0 — run `pipecat mcp refresh` so coding agents match your version.
```

The version comparison is deliberately quiet. It compares only major and minor, so a patch or dev release never triggers it, and it stays silent when your project has an editable Pipecat checkout or when the index is *ahead* of your project — an index built from `main` legitimately runs ahead of a released version.

The notice is silent when no index exists, so it never appears for people who don't use the hub. Two environment variables tune it:

* `PIPECAT_HUB_STALE_AFTER_DAYS` — index age in days before it's called stale. Defaults to `7`; `0` disables the age check.
* `PIPECAT_HUB_CHECK=0` — turn the notice off entirely.

## Next steps

<Card title="Build with a Coding Agent" icon="sparkles" href="/pipecat/get-started/build-your-next-bot#build-with-a-coding-agent">
  The full agent-driven workflow: `pipecat init`, the Context Hub, and your
  first coding session
</Card>
