Conversation
Codex is sandboxed so hard that the cli tool needs a manual approval every time. Let's use the mcp to bypass that.
| default: 10, | ||
| }, | ||
| }, | ||
| required: ["path"], |
There was a problem hiding this comment.
Bug: Missing required query parameter in search tool schema
The MCP search tool schema marks only path as required but not query. When clients call the search tool without providing a query parameter, args?.query as string evaluates to undefined and gets passed to store.search(), resulting in a search with an undefined query. The query field is the essential search term and must be included in the required array.
| ? (args?.path as string) | ||
| : normalize(join(process.cwd(), (args?.path as string) ?? "")); | ||
|
|
||
| const store = await createStore(); |
There was a problem hiding this comment.
Bug: Interactive prompts corrupt MCP server communication stream
When createStore() is called from the MCP tool handler, it invokes ensureAuthenticated() which may trigger interactive prompts via @clack/prompts if the user isn't authenticated. Since the MCP server uses stdin/stdout for JSON-RPC communication via StdioServerTransport, these interactive prompts would corrupt the protocol stream, causing the MCP connection to break or behave unexpectedly.
| hookConfig, | ||
| ); | ||
| saveSettings(settingsPath, settings as Record<string, unknown>); | ||
| await execAsync("droid mcp add mgrep -- mgrep mcp", { |
There was a problem hiding this comment.
Bug: Droid installation missing --expose-tools flag for MCP
The droid installation command droid mcp add mgrep -- mgrep mcp is missing the --expose-tools flag that the codex installation includes. Without this flag, exposeTools defaults to false, causing the ListToolsRequestSchema handler to return an empty tools array. This means the search tool won't be available through the MCP server when installed via droid, contradicting the PR's purpose of exposing search tools.
Codex is sandboxed so hard that the cli tool needs a manual approval
every time. Let's use the mcp to bypass that.
Note
Adds an MCP server exposing a semantic search tool and updates Codex/Droid installers to register mgrep via MCP.
src/commands/watch_mcp.ts)--expose-toolsoption.searchtool (ListTools + CallTool) to run semantic search scoped to a path and return formatted results.startWatch.src/install/codex.ts): Register mgrep viacodex mcp add mgrep -- mgrep mcp --expose-tools; simplify SKILL text; improve install/uninstall cleanup and messaging.src/install/droid.ts): Replace hook-based setup withdroid mcp add/remove mgrep; remove Python hook management; keep skill file install; add exec utilities.src/commands/search.ts)formatSearchResponsefor reuse by MCP.Written by Cursor Bugbot for commit 07c5b9c. This will update automatically on new commits. Configure here.