Skip to content

feat(mcp): add codebase exploration tools - #308

Open
ethansara92-beep wants to merge 1 commit into
cocoindex-io:mainfrom
ethansara92-beep:feat/mcp-codebase-tools
Open

ethansara92-beep wants to merge 1 commit into
cocoindex-io:mainfrom
ethansara92-beep:feat/mcp-codebase-tools

Conversation

@ethansara92-beep

@ethansara92-beep ethansara92-beep commented Oct 13, 2026 •

Copy link
Copy Markdown

Closes #309

Summary

  • add MCP grep, status, and codebase_overview tools
  • add persistent source-tree freshness tracking and return freshness.stale / freshness.indexed_at from MCP search and status responses
  • surface freshness in ccc status and remove its derived state with ccc reset

Motivation

MCP previously exposed only semantic search. Agents could not use ccc's AST-based structural search, inspect index state, or cheaply orient in an unfamiliar repository. They also had no signal that a non-refreshed semantic search could be using an outdated index.

Implementation notes

  • Freshness fingerprints indexable paths, mtimes, sizes, and project settings after every successful index update.
  • The fingerprint and index timestamp are stored in the derived index_state.json, so they survive daemon restarts.
  • A source or settings mismatch, an indexing run in progress, an index error, or missing legacy state reports stale: true.
  • Structural grep is constrained to paths inside the configured project and returns exact matched spans with line ranges.

Validation

  • uv run prek run --all-files
  • uv run pytest tests/ -q
  • uv run mypy .

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(mcp): expose codebase exploration and index freshness tools

1 participant