> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipecat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# context-hub

> Query the Pipecat Context Hub from the CLI, and register it as an MCP server for your coding agent

Run the [Pipecat Context Hub](/api-reference/context-hub) through the Pipecat CLI. `pipecat context-hub install` registers the hub as an MCP server with your coding agent and builds the local index; the query commands print the same JSON the MCP tools return, for one-shot lookups from a shell.

## Installation

`pipecat context-hub` comes from the `pipecat-ai-context-hub` package, which you co-install with the CLI:

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

Without it, `pipecat context-hub` still lists in `pipecat --help` and prints how to enable it when run. The hub also runs standalone, without the Pipecat CLI — see the [Context Hub reference](/api-reference/context-hub) for that path, the tool list, and custom sources.

<Tip>
  Every command below also works as `pipecat ch`, e.g. `pipecat ch status`.
</Tip>

## context-hub install

Register the MCP server with a coding agent and build the index. Configures every detected client CLI (Claude Code, Codex) unless `--client` is given, then runs the first refresh.

Clients that ship their own CLI are configured through it, so they own the edit to their config file. For clients configured by hand (Cursor, VS Code, Zed) the command prints the JSON and where it goes rather than writing a file it doesn't own.

**Usage:**

```shell theme={null}
pipecat context-hub install [OPTIONS]
```

**Options:**

<ParamField path="--client" type="string">
  Client to configure: `claude-code`, `codex`, `cursor`, `vscode`, or `zed`.
  Repeatable. Defaults to every detected client CLI.
</ParamField>

<ParamField path="--no-refresh" type="flag">
  Skip building the index. Run `pipecat context-hub refresh` before your first
  query.
</ParamField>

<ParamField path="--print-config" type="flag">
  Only print the MCP config and the server command; change nothing.
</ParamField>

<Tip>
  MCP servers load when your coding tool starts a session, so run this before
  opening the session you want to use it in.
</Tip>

## context-hub refresh

Rebuild the index, skipping unchanged sources when possible. The first run downloads local embedding models and indexes every source, so allow several minutes.

**Usage:**

```shell theme={null}
pipecat context-hub refresh [OPTIONS]
```

**Options:**

<ParamField path="--force" type="flag">
  Force a full refresh, ignoring cached state.
</ParamField>

<ParamField path="--reset-index" type="flag">
  Delete local index state before rebuilding. Use this when the persisted index
  is unhealthy.
</ParamField>

<ParamField path="--framework-version" type="string">
  Pin the framework repo to a specific git tag, e.g. `v0.0.96`. Source chunks
  come from that version instead of `HEAD`, so results match an older project.
  Also settable with `PIPECAT_HUB_FRAMEWORK_VERSION`.
</ParamField>

## context-hub status

Report index health: freshness, record counts, the pipecat version the index was built from, and reranker state. Prints JSON.

**Usage:**

```shell theme={null}
pipecat context-hub status
```

## context-hub serve

Start the MCP server over stdio. `pipecat context-hub start` is an alias. You rarely run this by hand — your coding tool starts it, using the config `pipecat context-hub install` wrote.

Exits `2` if the index is empty or cannot be opened, rather than starting against an index that would answer every query with nothing.

**Usage:**

```shell theme={null}
pipecat context-hub serve
```

## context-hub search-docs

Semantic search over the indexed Pipecat docs.

**Usage:**

```shell theme={null}
pipecat context-hub search-docs [OPTIONS] QUERY
```

**Arguments:**

<ParamField path="QUERY" type="string" required>
  What to search for. Use `+` or `&` to search several concepts at once,
  e.g. `"TTS + STT"` — each is searched separately and the results interleaved.
</ParamField>

**Options:**

<ParamField path="--area" type="string">
  Docs path prefix, e.g. `guides` or `server/services`.
</ParamField>

<ParamField path="--limit" type="integer" default="10">
  Maximum hits to return (1-50).
</ParamField>

## context-hub search-api

Search framework internals: classes, signatures, frames, inheritance.

**Usage:**

```shell theme={null}
pipecat context-hub search-api [OPTIONS] QUERY
```

**Arguments:**

<ParamField path="QUERY" type="string" required>
  What to search for.
</ParamField>

**Options:**

<ParamField path="--module" type="string">
  Module path prefix, e.g. `pipecat.services`.
</ParamField>

<ParamField path="--class-name" type="string">
  Class name prefix, e.g. `DailyTransport`.
</ParamField>

<ParamField path="--chunk-type" type="string">
  One of `module_overview`, `class_overview`, `method`, `function`,
  `type_definition`.
</ParamField>

<ParamField path="--is-dataclass" type="flag">
  Only dataclass types.
</ParamField>

<ParamField path="--yields" type="string">
  Methods yielding a frame type.
</ParamField>

<ParamField path="--calls" type="string">
  Methods calling a specific method.
</ParamField>

<ParamField path="--pipecat-version" type="string">
  Score results for compatibility with this `pipecat-ai` version.
</ParamField>

<ParamField path="--compatible-only" type="flag">
  Exclude results requiring a newer version. Needs `--pipecat-version`.
</ParamField>

<ParamField path="--limit" type="integer" default="10">
  Maximum hits to return (1-50).
</ParamField>

## context-hub search-examples

Find working Pipecat examples for a capability.

**Usage:**

```shell theme={null}
pipecat context-hub search-examples [OPTIONS] QUERY
```

**Arguments:**

<ParamField path="QUERY" type="string" required>
  The capability to find examples for.
</ParamField>

**Options:**

<ParamField path="--repo" type="string">
  Filter by repo slug, e.g. `pipecat-ai/pipecat-examples`.
</ParamField>

<ParamField path="--language" type="string">
  `python` or `typescript` — the only parsed languages.
</ParamField>

<ParamField path="--domain" type="string">
  `backend` (Python bot/pipeline code), `frontend` (JS/TS client), `config`, or
  `infra`.
</ParamField>

<ParamField path="--tag" type="string">
  Capability tag. Repeatable.
</ParamField>

<ParamField path="--execution-mode" type="string">
  `local` or `cloud`, inferred from capability tags.
</ParamField>

<ParamField path="--pipecat-version" type="string">
  Score results for compatibility with this `pipecat-ai` version.
</ParamField>

<ParamField path="--compatible-only" type="flag">
  Exclude results requiring a newer version. Needs `--pipecat-version`.
</ParamField>

<ParamField path="--limit" type="integer" default="10">
  Maximum hits to return (1-50).
</ParamField>

<ParamField path="--foundational-class" type="string">
  Legacy filter, deprecated. Only pre-reorg examples carry it, so filtering on
  it silently excludes new-layout examples. Prefer `--domain` and `--tag`.
</ParamField>

## context-hub get-doc

Fetch a full docs page, or one section of it, by ID or path. Use after `search-docs`.

**Usage:**

```shell theme={null}
pipecat context-hub get-doc [OPTIONS]
```

**Options:**

<ParamField path="--doc-id" type="string">
  Chunk ID from a `search-docs` hit.
</ParamField>

<ParamField path="--path" type="string">
  Docs path, e.g. `/guides/telephony/overview`.
</ParamField>

<ParamField path="--section" type="string">
  Return only this section heading.
</ParamField>

## context-hub get-example

Fetch the full source files of an example. Use after `search-examples`.

**Usage:**

```shell theme={null}
pipecat context-hub get-example [OPTIONS] EXAMPLE_ID
```

**Arguments:**

<ParamField path="EXAMPLE_ID" type="string" required>
  Example ID from a `search-examples` hit.
</ParamField>

**Options:**

<ParamField path="--no-readme" type="flag">
  Skip the example's README content.
</ParamField>

## context-hub get-code-snippet

Get a targeted code snippet by symbol, by intent, or by path and line range.

**Usage:**

```shell theme={null}
pipecat context-hub get-code-snippet [OPTIONS]
```

**Options:**

<ParamField path="--symbol" type="string">
  Symbol name, e.g. `DailyTransport.send_dtmf`.
</ParamField>

<ParamField path="--intent" type="string">
  Intent description; searches example code.
</ParamField>

<ParamField path="--path" type="string">
  File path. Combine with `--line-start` for a range lookup.
</ParamField>

<ParamField path="--line-start" type="integer">
  First line of the range.
</ParamField>

<ParamField path="--line-end" type="integer">
  Last line of the range.
</ParamField>

<ParamField path="--module" type="string">
  Module path prefix filter, in symbol mode.
</ParamField>

<ParamField path="--class-name" type="string">
  Class name prefix filter, in symbol mode.
</ParamField>

<ParamField path="--content-type" type="string">
  `source` for framework code, `code` for examples.
</ParamField>

<ParamField path="--pipecat-version" type="string">
  Score results for compatibility with this `pipecat-ai` version.
</ParamField>

<ParamField path="--max-lines" type="integer" default="100">
  Maximum lines to return (1-500).
</ParamField>

## context-hub check-deprecation

Check whether a module path, class, or method is deprecated. The fastest way to catch a symbol that moved or was replaced.

**Usage:**

```shell theme={null}
pipecat context-hub check-deprecation [OPTIONS] SYMBOL
```

**Arguments:**

<ParamField path="SYMBOL" type="string" required>
  Module path, class, or method, e.g. `PipelineTask` or
  `pipecat.services.grok.llm`.
</ParamField>

**Options:**

<ParamField path="--at-version" type="string">
  Evaluate the symbol's lifecycle at this version, e.g. `2.0.0`. A symbol can be
  current, deprecated, or removed at different versions. Defaults to the version
  the index was built from.
</ParamField>

## Examples

```shell theme={null}
# Set the hub up for your coding agent, then keep it current
pipecat context-hub install
pipecat context-hub refresh

# Is this symbol still the right one?
pipecat context-hub check-deprecation PipelineTask

# Find a working example, then read it
pipecat context-hub search-examples "twilio bot" --domain backend
pipecat context-hub get-example <example-id>

# Look up an exact signature
pipecat context-hub search-api "WebsocketServerParams" --limit 3

# Index health, including the pipecat version it was built from
pipecat context-hub status
```

## Next Steps

<Card title="Pipecat Context Hub" icon="database" href="/api-reference/context-hub">
  What the hub indexes, the MCP tool list, custom sources, and setup without the
  Pipecat CLI
</Card>
