mgrep
A calm, CLI-native way to semantically grep everything, like code, images, pdfs and more.
mgrep is a CLI-based AI sub-agent that brings semantic search capabilities to coding agents and developers. It enables natural-language queries across code, images, PDFs, and other file types, replacing exact-pattern matching with intent-based retrieval. Powered by Mixedbread Search, it indexes repositories in the background and maintains sync via file watchers, reducing token usage in agent workflows by up to 2x while improving search relevance. The tool includes web search integration, agentic multi-query refinement, and native support for popular coding agents.
Key Features
Use Cases
- 01Enabling coding agents to find relevant code snippets using natural language instead of hundreds of grep attempts
- 02Onboarding developers to large codebases by answering questions like 'where do we set up auth?' semantically
- 03Searching across multiple file types including code, documentation PDFs, and diagrams in a single query
- 04Combining local repository search with web documentation lookup without leaving the terminal
- 05Reducing agent token consumption by performing targeted semantic retrieval before reasoning tasks
- 06Keeping team-shared search indexes synchronized across distributed development environments
Related Agents
View morehermes-agent
The agent that grows with you
agency-agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables.
openinterpreter
A coding agent for open models like Kimi K3
cline
Autonomous coding agent as an SDK, IDE extension, or CLI assistant.
mgrep — FAQ
What is mgrep?+
mgrep is a semantic search AI sub-agent that enables natural-language queries across code, images, PDFs, and other files. It's designed to complement grep by understanding intent rather than requiring exact pattern matches, and integrates directly with coding agents like Claude Code, OpenCode, Codex, and Factory Droid.
How do I install mgrep?+
Install mgrep globally with 'npm install -g @mixedbread/mgrep', authenticate using 'mgrep login', and index your project with 'mgrep watch'. For coding agents, use dedicated install commands like 'mgrep install-claude-code' or 'mgrep install-opencode' to configure automatic integration.
Which coding agents work with mgrep?+
mgrep currently supports Claude Code, OpenCode, Codex, and Factory Droid with assisted installation commands. Additional agents like Cursor and Windsurf are planned for future releases.
Do I need an API key to use mgrep?+
Yes, you need a Mixedbread account. Authentication is handled via a browser-based device login flow with 'mgrep login', or you can set the MXBAI_API_KEY environment variable for headless or CI/CD environments.
Is mgrep free to use?+
mgrep is open-source under the Apache 2.0 license. It relies on Mixedbread's cloud search service, which may have usage limits or pricing; check your usage on the Mixedbread platform dashboard.
What are the default file size and count limits?+
By default, mgrep limits uploads to 1MB per file and 1,000 files per directory. You can customize these limits using --max-file-size and --max-file-count CLI flags, environment variables, or config files.
How do I install mgrep?+
Open the source repository on GitHub and follow its README. mgrep is a agent — MCP Agents Market links you directly to the official repo.
Is mgrep free?+
mgrep is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.