Skip to content

feat(mcp): add grep_code MCP tool and backend-agnostic line-accurate vector file reconstruction - #105

Merged
spelech merged 4 commits into
mainfrom
feat/mcp-grep-code-issue-98
Nov 11, 2026
Merged

spelech merged 4 commits into
mainfrom
feat/mcp-grep-code-issue-98

Conversation

@spelech

@spelech spelech commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Closes #98

Summary

  • Implements backend-agnostic get_file_chunks(path, repo) and grep_chunks(...) across QdrantStore, PgVectorStore, and ChromaStore with zero extra database storage.
  • Updates FileReaderService.read_file to check local disk/shallow clones first and fall back to line-coordinate (start_line..end_line) chunk reconstruction from the vector store when a repository is ephemeral (keep_shallow=0).
  • Adds grep_code to FileReaderService and exposes grep_code on the MCP server with AST symbol and Git permalink enrichment in compact JSON.

Comment thread app/services/file_reader.py Fixed
Comment thread app/api/routers/files.py Fixed
@spelech
spelech merged commit 88b1a39 into main Nov 11, 2026
9 of 11 checks passed
@spelech
spelech deleted the feat/mcp-grep-code-issue-98 branch November 11, 2026 15:09
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): add grep_code MCP tool and backend-agnostic line-accurate vector file reconstruction

2 participants