Grep a million GitHub repositories via MCP
Blog post from Vercel
Grep has integrated support for the Model Context Protocol (MCP), allowing AI applications to query a vast number of public GitHub repositories through a standardized interface. This development enables AI agents to perform search queries and retrieve code snippets from repositories, filtered by language, repository, and file path, with results typically delivered in milliseconds. The Grep MCP server provides an endpoint for these searches, leveraging the same infrastructure as grep.app, and offers ranked snippets based on relevance. Setting up MCP servers is straightforward, as each tool is defined in a machine-readable schema that facilitates predictable integration for agents and applications. For instance, when implementing an MCP server, developers can use Grep's MCP server to find and handle error messages effectively by using specific query patterns. The server's development was streamlined using the mcp-handler package, which adapted Grep's existing API into an MCP server, simplifying both development and deployment.