March 28, 2026
3 pull requests merged across 1 repo
bahdotsh/indxr
--globalflag:indxr init --globalinstalls MCP config and rules into user-level directories so indxr is available for all projects without per-project setup- Claude Code:
~/.claude.json(MCP merge) +~/.claude/CLAUDE.md(append) - Cursor:
~/.cursor/mcp.json(MCP merge) - Windsurf:
~/.codeium/windsurf/mcp_config.json(MCP merge) +~/.codeium/windsurf/memories/global_rules.md(append) - Modern rules format: Migrates deprecated
.cursorrules→.cursor/rules/indxr.mdcand.windsurfrules→.windsurf/rules/indxr.mdwith proper frontmatter - Safe MCP merge: Reads existing JSON, adds/updates only the
indxrserver entry, preserves all other servers and fields - 36 init tests (16 new), all 308 tests passing, clippy clean
Test plan
-
cargo test init::tests— all 36 tests pass -
indxr init --cursorcreates.cursor/rules/indxr.mdc(not.cursorrules) -
indxr init --windsurfcreates.windsurf/rules/indxr.md(not.windsurfrules) -
indxr init --global --cursormerges into~/.cursor/mcp.json -
indxr init --globalwith existing MCP config preserves other servers -
indxr init --helpshows--globalflag
- Workspace detection for Cargo (
[workspace].members), npm ("workspaces"), and Go (go.work) with automatic glob expansion and member name resolution - New
WorkspaceIndexdata model wrapping per-memberCodebaseIndexinstances — non-workspace projects flow through the same path as a single-member workspace (zero branching) - All 22 MCP tools updated to accept an optional
memberparam for scoping; cross-member tools search transparently, path-specific tools auto-resolve the member - New
list_workspace_memberstool (23 total) and CLI additions:indxr members,--member,--no-workspace - Workspace-aware
serve,watch, HTTP transport, INDEX.md generation, and auto-reindex
Test plan
-
cargo fmt— clean -
cargo clippy --all-features— clean -
cargo test— 278 tests pass (14 new workspace tests) -
cargo test --all-features— 301 tests pass (includes HTTP transport tests) - Manual:
indxr memberson a Cargo workspace, npm monorepo, and Go workspace - Manual:
indxr serveon a monorepo, verifylist_workspace_membersandmember-scoped tool calls - Manual:
indxr serve --no-workspaceon a monorepo, verify single-root behavior
- Implements MCP Streamable HTTP transport (spec 2025-03-26) alongside the existing stdio transport, enabling multi-client scenarios via
indxr serve --http :8080 - Feature-gated behind
--features http(axum, tokio, etc.) to keep the default binary lean — no bloat for stdio-only users - Extracts a transport-agnostic
process_jsonrpc_message()handler from the existing code, shared by both stdio and HTTP transports
HTTP Transport Details
- Single
/mcpendpoint: POST for JSON-RPC requests, GET for SSE notification stream, DELETE for session termination - Full session enforcement via
Mcp-Session-Idheader (assigned oninitialize, required for all subsequent requests) - File watcher integration (
--watch) broadcasts change notifications to all connected SSE clients RwLock-based shared state for concurrent multi-client access- Sync-to-async bridge via
spawn_blocking— all existing tool execution stays synchronous
Files Changed
| File | Change |
|---|---|
src/mcp/http.rs | New — full HTTP transport + 8 in-crate tests |
src/mcp/mod.rs | Extract process_jsonrpc_message(), add Transport enum, widen visibility |
src/mcp/tests.rs | 6 new tests for the shared handler |
Cargo.toml | http feature flag + optional deps (axum, tokio, tokio-stream, tower-http, uuid, async-stream) |
src/cli.rs | --http <ADDR> flag on serve command |
src/main.rs | HTTP vs stdio dispatch logic |
CLAUDE.md, docs/mcp-server.md, roadmap.md | Documentation |
Test plan
-
cargo test— 264 tests pass (no regression, no http feature) -
cargo test --features http— 272 tests pass (+14 new tests) -
cargo checkandcargo check --features httpboth compile cleanly - Manual:
cargo run --features http -- serve --http :8080 --watch+ curl requests