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 and the
pipecat-ai[mcp] extra.Setup
The hub is published to PyPI aspipecat-ai-context-hub. Co-install it with the Pipecat CLI, then let it configure your coding agent and build the index in one step:
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 for the full flag surface.
If the index gets corrupted, force a rebuild:
Without the Pipecat CLI
The hub runs standalone too.uvx, uv’s one-shot runner, fetches and runs it on demand with nothing installed:
pipecat mcp refresh and uvx pipecat-ai-context-hub refresh are the same command.
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 youpipecat mcp, but does not putpipecat-context-hubon yourPATH. - Installed on its own (
uv tool install pipecat-ai-context-hub) gives youpipecat-context-hubon yourPATH, but notpipecat mcp.
Custom sources
Point the hub at your own repositories withPIPECAT_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:
.env file from the directory you run the command in, so you can keep the list there instead of exporting it each time:
search_* and get_* tools as the framework.
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.Tools
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 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:uvx pipecat-ai-context-hub. The pipecat mcp reference 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:
- Claude Code
- Codex
- Cursor
- VS Code
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: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 to7;0disables the age check.PIPECAT_HUB_CHECK=0— turn the notice off entirely.
Next steps
Build with a Coding Agent
The full agent-driven workflow:
pipecat init, the Context Hub, and your
first coding session