惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
大猫的无限游戏
大猫的无限游戏
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
月光博客
月光博客
Last Week in AI
Last Week in AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
IT之家
IT之家
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
S
SegmentFault 最新的问题
宝玉的分享
宝玉的分享
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
博客园 - 司徒正美
爱范儿
爱范儿

Vercel News

Vercel Open Source Program: Winter 2026 cohort How Notion Workers run untrusted code at scale with Vercel Sandbox How we run Vercel's CDN in front of Discourse From idea to secure checkout in minutes with Stripe Building Slack agents can be easy Scaling redirects to infinity on Vercel Advancing Python typing Gamma builds design-first agents with Vercel How Avalara turns pipe dreams into patent-pending with v0 Keeping community human while scaling with agents How OpenEvidence built a healthcare AI that physicians actually trust Security boundaries in agentic architectures Skills Night: 69,000+ ways agents are getting smarter Video Generation with AI Gateway We Ralph Wiggumed WebStreams to make them 10x faster How Stably ships AI testing agents in hours, not weeks How we built AEO tracking for coding agents Anyone can build agents, but it takes a platform to run them Introducing Geist Pixel The Vercel AI Accelerator is back with $6m in credits Making agent-friendly pages with content negotiation The Vercel OSS Bug Bounty program is now available Introducing the new v0 Run untrusted code with Vercel Sandbox, now generally available How Stripe built a game-changing app in a single flight with v0 How Sensay went from zero to product in six weeks AGENTS.md outperforms skills in our agent evals Agent skills explained: An FAQ Testing if "bash is all you need" AWS databases are now live on the Vercel Marketplace and v0
Grep a million GitHub repositories via MCP - Vercel – Vercel
2025-07-17 · via Vercel News

2 min read

Grep now supports the Model Context Protocol (MCP), enabling AI apps to query a million public GitHub repositories using a standard interface. Whether you're building in Cursor, using Claude, or integrating your own agent, Grep can now serve as a searchable code index over HTTP.

Link to headingWhat is the Grep MCP server

MCP is a protocol for exposing tools to large language models (LLMs). Grep’s new MCP server provides an endpoint that searches public GitHub repositories. Through the Grep MCP server, AI agents can issue search queries and retrieve code snippets that match specific patterns or regular expressions, filtered by language, repository, and file path.

It's backed by the same infrastructure as grep.app. Results typically return in a fraction of a second, with snippets ranked for relevance.

Link to headingHow to configure it in your AI client

Setting up MCP servers is generally straightforward. Once your client is aware of the MCP endpoint, it can introspect the available tools and invoke them directly. Each tool is defined in a machine-readable schema, which makes integration predictable for agents and apps.

To connect an AI client to Grep’s MCP server, use the following configurations.

Link to headingIn Cursor:

{

"mcpServers": {

"grep": {

"url": "https://mcp.grep.app"

}

}

}

Link to headingWith Claude Code:

claude mcp add --transport http grep https://mcp.grep.app

Link to headingAn example of how to use it

Let’s say you're writing an MCP server of your own. As you’re implementing it, you have to handle some cases where there’s an error and you want to communicate that to the client. You’re not sure the right way to do that, so you might ask your AI agent how to handle it.

What's the right way for this MCP tool to return an error message to the client?

If you have the Grep MCP server configured, your agent may decide to run some code searches to help it answer the question. It may try a few different queries, and eventually arrive at this one, which is looking for a server.tool function call that includes a catch block.

{

"query": "(?s)server\\.tool.*catch",

"language": [

"TypeScript",

"JavaScript"

],

"useRegexp": true

}

The Grep MCP server returns a list of results, which look like this:

Repository: microsoft/rushstack

Path: apps/rush-mcp-server/src/tools/base.tool.ts

URL: https://github.com/microsoft/rushstack/blob/main/apps/rush-mcp-server/src/tools/base.tool.ts

License: Unknown

Snippets:

--- Snippet 1 (Line 39) ---

public register(server: McpServer): void {

// TODO: remove ts-ignore

// @ts-ignore

server.tool(this._options.name, this._options.description, this._options.schema, async (...args) => {

try {

const result: CallToolResult = await this.executeAsync(...(args as Parameters<ToolCallback<Args>>));

return result;

} catch (error: unknown) {

return {

isError: true,

content: [

This result in particular suggests the answer: when returning an error response from an MCP tool call, you should set isError: true .

To confirm the answer, the LLM runs another query.

{

"query": "isError: true",

"language": [

"TypeScript",

"JavaScript"

]

}

That query provides more examples of how MCP servers return error responses.

Based on these search results, the AI agent is able to respond with the answer and offer to update your project to properly handle errors.

Link to headingFrom zero to MCP in minutes

We built Grep's MCP server in an afternoon. Using the mcp-handler package, we turned Grep’s existing API into a fully compliant MCP server. The adapter handles schema, request routing, and response formatting so the only work needed was mapping the search endpoint to the MCP contract.

If you're exposing an existing tool or API to AI clients, Vercel's MCP adapter abstracts the boilerplate and makes development and deployment simple on Vercel.

Try Grep or Grep's MCP server today.

MCP Server with Next.js

Get started building your first MCP server on Vercel.

Deploy now