Gemini CLI: Bundled Ripgrep for Offline Code Search and New MCP Resource Tools
Gemini CLI v0.40.0 bundles ripgrep binaries directly into its Single Executable Application (SEA), removing the external dependency on a system-installed ripgrep for code search to function. This means the grep_search tool works reliably in offline environments, Docker containers, and systems without ripgrep installed. The same release adds two new MCP tools β list_mcp_resources and read_mcp_resource β enabling the agent to discover and read contextual resources exposed by connected MCP servers, expanding what the agent can access during a session without any manual /context injection.
Sources & Mentions
4 external resources covering this update
Gemini CLI v0.40.0: Offline Code Search and Expanded MCP Access
Gemini CLI v0.40.0, released April 28, 2026, addresses two practical limitations that developers have encountered in constrained or offline environments: the dependency on an externally-installed ripgrep binary for code search, and the inability for the agent to autonomously access resources exposed by MCP servers.
Bundled Ripgrep: Reliable Code Search Without External Dependencies
Gemini CLI has long used ripgrep as the engine behind its grep_search tool β the agent's primary mechanism for fast regex and text search across large codebases. Until v0.40.0, if the system ripgrep binary was missing or inaccessible, this tool would fail silently or fall back to slower search methods.
Starting with v0.40.0, ripgrep binaries are bundled directly into the CLI's Single Executable Application package. The agent no longer relies on the environment's PATH for ripgrep availability. This change matters most in three scenarios: offline environments where package installation is not possible; containerized development (Docker, devcontainers, CI pipelines) where minimizing installed dependencies is a priority; and managed enterprise workstations where developers lack permission to install system tools. The bundled binary is used as a fallback when no system ripgrep is found, so existing installations that already have ripgrep available are unaffected.
New MCP Resource Tools: list_mcp_resources and read_mcp_resource
MCP servers can expose three categories of capabilities: tools, prompts, and resources. Resources are contextual data objects β documentation pages, configuration files, project schemas, database records β that MCP server authors want to make available to AI agents. Until v0.40.0, Gemini CLI could discover MCP tools and prompts but had no agent-accessible path to MCP resources; developers had to manually reference them via /context or file references.
Version 0.40.0 adds two new built-in tools:
list_mcp_resources: During a session, the agent can call this tool to enumerate all resources exposed by connected MCP servers, discovering what contextual data is available.read_mcp_resource: The agent can fetch the content of a specific resource by URI, injecting it into the conversation context for reasoning.
This means the agent can autonomously consult MCP-served documentation, configuration, or data during task execution β without the developer needing to explicitly point to it. For teams running internal MCP servers that expose things like API specs, runbooks, or project state, this makes Gemini CLI a significantly more capable autonomous actor within their toolchain.
Summary
These two changes reflect a broader theme in v0.40.0: making Gemini CLI more self-sufficient. Bundled ripgrep removes an environmental dependency that caused silent failures in constrained systems, while MCP resource access removes a manual step that limited how much the agent could autonomously gather from the developer's connected context.