Roo Code Index Bridge MCP
A client-neutral, local-first semantic code indexing and search MCP. Version 0.5.1 owns the whole indexing pipeline — file discovery, structural chunking, embeddings, Qdrant storage, incremental sync, and watching — so Roo Code is not required. It works from any MCP-compatible client. One-click setup targets: Codex, Claude Code, ZCode, VS Code, VS Code (workspace), and OpenCode. ChatGPT desktop can use the bridge through a local Codex host that shares Codex's MCP configuration — see docs/installation.md. ChatGPT web / remote MCP endpoints are not local-stdio targets and are out of scope.
Legacy Roo Code ws-* indexes remain searchable read-only for backward compatibility.
Architecture in One Page
MCP client (Codex/ZCode/Claude Code/VS Code/...)
│ stdio
▼
FastMCP server (server.py — registration only)
▼
IndexBridgeService (service.py — policy + orchestration)
│
├─ FileDiscovery → git ls-files / safe walk, .gitignore + .rooignore, size/binary/symlink guards
├─ Chunker → tree-sitter structural chunks, markdown headings, line fallback
├─ EmbeddingClient→ Ollama /api/embed batches (also OpenAI-compatible, Gemini, Mistral)
├─ QdrantStore → rci-* collections, batched upserts, ownership checks, alias swaps
├─ StateDB → SQLite (platform data dir, see docs/configuration.md)
└─ WatchManager → debounced watchfiles → one incremental sync
Details: docs/architecture.md · Tools: docs/mcp-tools.md · Installation & setup: docs/installation.md · Configuration: docs/configuration.md · Problems: docs/troubleshooting.md
Requirements
- Python 3.11+ and uv
- Ollama at
http://127.0.0.1:11434with an embedding model, e.g.ollama pull nomic-embed-text-v2-moe:latest(768 dimensions) - Qdrant at
http://127.0.0.1:6333(e.g.docker run -p 6333:6333 qdrant/qdrant)
No Roo Code extension, no cloud services, no accounts. Remote providers are supported (see Privacy) but everything defaults to loopback.
Quick Start
Download and run setup
After downloading and extracting this repository, double-click SETUP.cmd on
Windows. On macOS/Linux run sh setup.sh from the extracted folder. The
launcher installs uv for the current user if needed, obtains Python through uv,
and runs the published version's setup and verification. It configures detected Codex,
Claude Code, ZCode, OpenCode and VS Code installations, installs supported agent
skills, backs up changes, and reports verification and restart instructions.
Preview without changing client files: SETUP.cmd --dry-run or
sh setup.sh --dry-run. Client apps, Qdrant and Ollama are not installed by the
launcher; missing components receive installation links and commands.
Semantic indexing/search requires healthy Qdrant and an embedding backend.
ChatGPT desktop support is through its local Codex agent, not ordinary hosted
ChatGPT chats. See the complete one-click guide.
Automatically installed search skill
Setup includes roo-code-search: agents search the semantic code index before
reading unfamiliar code. There is no separate skill installation step. Setup
renders the packaged skill
with your version, embedding provider and freshness policy, then installs it for
the current user. See skill locations and verification.
Previous release verification: v0.5.0 completion and recheck (2026-09-29). See v0.5.1 fixes.
Terminal setup
The recommended setup uses the published package — never a source checkout,
never repo-coupled --directory invocations. The canonical command is the
version-pinned published package — exactly what setup writes into client
registrations:
uv --system-certs tool run --from roo-code-index-bridge-mcp==0.5.1 roo-code-index-bridge-mcp
A pin is only usable when that version is actually published — setup refuses to
write any registration pinned to a version that fails the cold-cache publication
proof (see
docs/installation.md).
(If your uv build rejects --system-certs, drop that flag; setup detects this and adapts.)
# 0. Pull a model and start Qdrant (defaults assume loopback)
ollama pull nomic-embed-text-v2-moe:latest
docker run -p 6333:6333 qdrant/qdrant
# 1. Run the published package (no install step required)
uv --system-certs tool run --from roo-code-index-bridge-mcp==0.5.1 roo-code-index-bridge-mcp --help
# 2. Check the stack (Qdrant, embedder, SQLite, parsers, registrations)
uv --system-certs tool run --from roo-code-index-bridge-mcp==0.5.1 roo-code-index-bridge-mcp doctor
# 3. Preview what setup would change — writes NOTHING
uv --system-certs tool run --from roo-code-index-bridge-mcp==0.5.1 roo-code-index-bridge-mcp setup --dry-run
# 4. Configure every detected client + install agent skills + verify (add --json for machine output)
uv --system-certs tool run --from roo-code-index-bridge-mcp==0.5.1 roo-code-index-bridge-mcp setup --all
# 5. RESTART your MCP clients — they only re-read registrations at startup
# 6. Live verification after restart
uv --system-certs tool run --from roo-code-index-bridge-mcp==0.5.1 roo-code-index-bridge-mcp doctor --registrations
setup refuses to write anything unless the pinned version can be installed from a genuinely
cold cache, so step 4 fails safely (exit 1, target-version-unavailable, zero writes) if the
version is not actually published. Exit 0 with verification: ok means every required target
was verified. Full details: docs/installation.md.
Tip:
uv tool install roo-code-index-bridge-mcpputsroo-code-index-bridge-mcponPATH, shortening every command above. Theuv tool run --from ...==<version>form is what setup writes into client registrations, so both are shown.
What setup writes (and how to undo it)
Per client (Codex, Claude Code, ZCode, VS Code, OpenCode), setup writes a pinned registration
that resolves from the package index — no repo paths, no --offline, no venv coupling:
# ~/.codex/config.toml (Codex)
[mcp_servers.roo_code_index_bridge]
command = "uv"
args = ["--system-certs", "tool", "run", "--from", "roo-code-index-bridge-mcp==0.5.1", "roo-code-index-bridge-mcp"]
startup_timeout_sec = 60.0
The pin is the version of the package that is running setup (0.5.1 above); it is
written only after that version passes the cold-cache publication proof, so a
setup-written registration never points at an unpublished version.
Every write is backed up, recorded in a setup manifest (SHA-256 before/after), validated before
an atomic replace, and rolled back hash-guarded if a later write fails. setup --remove
restores pre-setup bytes from the manifest. Rollback, manifest, and uninstall semantics:
docs/installation.md.
Indexing from the CLI
uv --system-certs tool run roo-code-index-bridge-mcp index D:/some/repo
uv --system-certs tool run roo-code-index-bridge-mcp search D:/some/repo "configuration loading and secret resolution"
Browser UI
roo-code-index-bridge-mcp ui --open
Serves a localhost-only browser interface (default http://127.0.0.1:8765) for
inspecting index health, browsing bridge-managed indexes, running semantic
searches, and exploring a bounded semantic-similarity graph. Read-only: the
browser exposes no delete or rebuild operations, no telemetry, and no external
assets. See docs/ui.md and
docs/adr/0001-browser-ui.md.
MCP registrations (what setup configures)
Running setup (above) is the recommended way to register clients — it detects, repairs,
backs up, and verifies. The entries it writes, per client:
| Client | File (current user's profile) | Container |
|---|---|---|
| Codex | ~/.codex/config.toml |
[mcp_servers.roo_code_index_bridge] |
| Claude Code | ~/.claude.json (or CLAUDE_CONFIG_DIR/.claude.json) |
mcpServers root entry (+ existing projects.*.mcpServers entries) |
| ZCode | ~/.zcode/cli/setting.json (existing legacy config.json also maintained) |
mcp.servers |
| VS Code | platform path, see installation.md | servers |
| OpenCode | ~/.config/opencode/opencode.json (XDG) |
Stable v1 mcp; existing v2 mcp.servers preserved |
All of them run the same canonical command: uv --system-certs tool run --from roo-code-index-bridge-mcp==<version> roo-code-index-bridge-mcp, plus a single
ROO_INDEX_BRIDGE_CONFIG_PATH env entry when a bridge config file actually exists (a dead
config path is never registered; with no config the server uses built-in loopback defaults).
Prefer manual editing? Point the client at the canonical command exactly as written above — pinned, from the package index. Full copy-paste blocks per client and per platform are in docs/installation.md.
The default (no subcommand) invocation starts the stdio server — identical to 0.1.0.
CLI
| Command | Purpose |
|---|---|
roo-code-index-bridge-mcp serve |
Run the MCP server (default; --transport stdio|sse|streamable-http) |
... setup |
Register clients, install agent skills, self-heal (see docs/installation.md) |
... doctor |
Probe Qdrant, embedder, SQLite, parsers (+ --registrations, --fix) |
... index <workspace> [--force] [--watch] |
Build or rebuild the standalone index |
... sync <workspace> |
Incremental sync of changed/added/deleted files |
... search <workspace> [query] [--prefix P] [--limit N] [--min-score S] [--language L] [--glob G] |
Semantic search (omit workspace = federated) |
... status <workspace> |
Collection, counts, watcher, jobs, last error |
... delete <workspace> --confirm <workspace> |
Ownership-checked deletion |
... enrich <workspace> |
Backfill import/similarity edges and communities |
... ui [--open] [--host H] [--port P] |
Local browser UI |
All commands print JSON. Exit code 0 = success (doctor/setup also exit nonzero on drift or refusals — that is the verification working, not a crash).
Index Lifecycle
- build — discovers files, chunks structurally, embeds in batches, writes a staging
collection
rci-<hash>-vN, then swaps therci-<hash>alias atomically. A failed build deletes staging and leaves the previous index searchable. Without--force, a healthy index is updated incrementally instead of rebuilt. - sync — hashes files; only changed/added files are re-chunked and re-embedded; deleted files' points are removed. An unchanged sync performs zero embedding calls.
- watch / auto-sync — debounced bursts coalesce into one sync. Watchers live only while the
MCP process runs. Additionally, a search against an index older than
auto_sync_stale_after_secondstriggers one lock-safe sync first (scope-aware default and privacy rules: docs/installation.md). - delete — requires the confirmation to equal the normalized workspace path and verifies
owner/workspace_idpayload metadata before removing anything.
Collections: alias rci-<hash16> (stable per workspace) over physical rci-<hash16>-v1, -v2, …
See docs/configuration.md for the hash rules.
Rebuilding after embedding-model changes
The embedder fingerprint (provider|model|dimension) is stored per workspace. If it changes,
code-index-sync returns status: "needs-rebuild" and the next code-index-build (or
build --force) re-embeds everything through a fresh staging collection.
Watch-mode limitations
- Watchers are in-process: stopping the MCP server stops watching (state is kept; re-run
code-index-syncafter restart). - Network shares and virtualized filesystems may not deliver reliable events; poll with
code-index-syncinstead. - A watcher that fails three times stops in an
errorstate rather than restarting forever.
Ignore-File Behavior
- Git repositories:
git ls-files --cached --others --exclude-standard(respects.gitignore), plus a root.rooignoreon top. - Non-Git directories: safe walk honoring nested
.gitignoreand root.rooignore. - Always excluded:
node_modules,dist,build,.venv,__pycache__, lockfiles, binaries (NUL-byte sniff), files > 1 MB (configurable), and anything symlinked outside the workspace.
Security and Privacy
- Local-first by default: everything stays on your machine — Ollama, Qdrant, SQLite. No telemetry.
- Secrets are resolved by environment-variable name (
qdrant_api_key_env,api_key_env) and are never printed; health/status output is passed through a redaction guard. - Destructive operations are namespace-restricted (
rci-*only) and ownership-verified from point payload metadata.ca_*and legacyws-*collections are never created, updated, listed as owned, or deleted. - Autonomous sync is scope-aware. With a loopback (local) embedder the default policy
auto-syncs stale indexes at 900 s. With a remote/cloud embedder (OpenAI, Gemini, Mistral,
OpenRouter, Vercel, Bedrock, or any non-loopback base URL) autonomous sync stays disabled
until you explicitly set
auto_sync_stale_after_seconds— because a sync sends source code chunks to that provider. Setup prints this classification and the egress answer for your configuration on every run (source code may leave this machine: YES/NO), never rewrites your config to enable syncing, and renders the installedroo-code-searchskill with the matching consent policy. See docs/installation.md. - Your code is sent only to the embedding provider you configure (Ollama = fully local) and stored only in the Qdrant you configure (remote Qdrant also counts as egress).
Legacy Roo Compatibility
roo-code-index-search, roo-code-index-resolve-collection, and roo-code-index-health
keep their 0.1.0 behavior. Search prefers a standalone rci-* index when present and otherwise
resolves the Roo ws-* collection (multiple path-string hash candidates) with the Roo
local-cache lexical fallback as a last resort. Every result reports index_family
(standalone or legacy-roo).
Upgrading from 0.4.0
- Registrations that still point at a repo checkout (repo-coupled
--directorycommands) or carry--offline/--project/UV_PROJECT_ENVIRONMENTare reported aslegacy-commanddrift bydoctorand structurally repaired bysetupto the pinned published command. - Existing indexes, collections, and config files are untouched; configuration remains additive.
- The new scope-aware auto-sync default applies only when your config does not set the key:
local embedder → on at 900 s, remote embedder → off until you opt in. Explicit values,
including
0, are always preserved. - Accidentally pinned clients to an unpublished 0.5.1? See docs/installation.md.
Development (source checkout)
Everything above uses the published package. To hack on the bridge itself:
git clone https://github.com/prakashgarg91/roo-code-index-bridge-mcp.git
cd roo-code-index-bridge-mcp
uv sync
uv run roo-code-index-bridge-mcp --help # run from the checkout (development only)
uv run ruff check . && uv run pytest -q # lint + tests
Source-checkout registrations (uv run --directory <checkout> roo-code-index-bridge-mcp) are
development-only — they couple clients to a directory on your disk. To test unreleased code
in real clients, build a wheel and use the development-only setup mode:
uv run roo-code-index-bridge-mcp setup --from-wheel <absolute-wheel-path> (registrations are
labelled temporary-by-path). See docs/installation.md
and RELEASING.md.
License
MIT — see LICENSE. Third-party grammars are consumed via
tree-sitter-language-pack; no Roo Code extension code is included.
Behavior-compatible protocol details were implemented from public documentation.
Metadata
Release files for roo-code-index-bridge-mcp 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| roo_code_index_bridge_mcp-0.5.1.tar.gz | 337.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| roo_code_index_bridge_mcp-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 461.8 kB
Release files / roo_code_index_bridge_mcp-0.5.1.tar.gz
| Download URL | roo_code_index_bridge_mcp-0.5.1.tar.gz |
|---|---|
| Size | 337.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c130675147724243bf8ff2481dc02a4195f08c7cd8d120bbc45cdb5b58dada21
|
|
BLAKE2b-256 checksum How to use checksums |
65a5730615df3fb16fc37fdd4edabe3be3f9365b37cc0fb84f20d97dbf98367e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logRelease files / roo_code_index_bridge_mcp-0.5.1-py3-none-any.whl
| Download URL | roo_code_index_bridge_mcp-0.5.1-py3-none-any.whl |
|---|---|
| Size | 123.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34343fb32ed0ca97efc4181ea2b1c22e92e4ff1f27d6f459e0e505f1ac9b42fa
|
|
BLAKE2b-256 checksum How to use checksums |
0414f9baedaffd349c004d786b0be021cce124f1da5d854515aebb7dac192851
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency log