Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
fix(mcp): force grep filename prefix in scoped search_code
Martin Vogel32bb56ef3f12
diff --git a/src/mcp/mcp.c b/src/mcp/mcp.cindex 434446488..03e33d584 100644--- a/src/mcp/mcp.c+++ b/src/mcp/mcp.c@@ -3013,10 +3013,10 @@ static void build_grep_cmd(char *cmd, size_t cmd_sz, bool use_regex, bool scopedconst char *flag = use_regex ? "-E" : "-F";if (scoped) {if (file_pattern) {- snprintf(cmd, cmd_sz, "xargs grep -n %s --include='%s' -f '%s' < '%s' 2>/dev/null",+ snprintf(cmd, cmd_sz, "xargs grep -Hn %s --include='%s' -f '%s' < '%s' 2>/dev/null",flag, file_pattern, tmpfile, filelist);} else {- snprintf(cmd, cmd_sz, "xargs grep -n %s -f '%s' < '%s' 2>/dev/null", flag, tmpfile,+ snprintf(cmd, cmd_sz, "xargs grep -Hn %s -f '%s' < '%s' 2>/dev/null", flag, tmpfile,filelist);}} else {