Grep exposes research as an MCP server.
Agents can discover the public v2 MCP endpoint, negotiate OAuth through protected-resource metadata, and call focused tools for research jobs, files, attachments, quota, and billing.
{
"$schema": "https://static.modelcontextprotocol.io/schemas/mcp-server-card/v1.json",
"version": "1.0",
"protocolVersion": "2025-06-18",
"serverInfo": {
"name": "grep-public-api-v2",
"title": "Grep Public API v2 MCP",
"version": "1.0.0"
},
"transport": {
"type": "streamable-http",
"endpoint": "https://api.grep.ai/api/v2/mcp"
},
"auth": {
"type": "oauth2",
"resource_metadata_url": "https://api.grep.ai/.well-known/oauth-protected-resource/api/v2/mcp"
}
}Discovery
Where agents should look first.
The MCP Server Card is public, cacheable, and CORS-readable. OAuth metadata is separate so clients can discover authorization before sending a tool request.
Canonical public MCP discovery document for clients that probe the Cloudflare readiness path.
Compatibility alias for clients that still probe the draft mcp.json location.
RFC 9728 metadata for the MCP resource and accepted scopes.
Crawler-friendly MCP setup notes for agents that prefer Markdown.
Tools
The MCP surface maps to public v2.
Research jobs
Create, continue, cancel, list, and inspect Grep research jobs through MCP tool calls.
Files and artifacts
List generated files, read text artifacts inline, and hand off large artifacts through signed URLs.
Attachments
Create, read, and delete research attachments for file-backed research workflows.
Quota and billing
Check quota, usage, and billing transactions before launching expensive research.
Streamable HTTP
Use the public remote MCP endpoint over the current streamable HTTP transport.
OAuth resource metadata
Discover the protected resource, scopes, and authorization server before attempting connection.
Fetch the Server Card.
curl https://grep.ai/.well-known/mcp/server-card.json | jqResolve OAuth metadata.
curl https://grep.ai/.well-known/oauth-protected-resource/api/v2/mcp | jqPoint MCP clients at v2.
{
"mcpServers": {
"grep": {
"url": "https://api.grep.ai/api/v2/mcp"
}
}
}Give agents tool access without a browser.
Use REST and OpenAPI for direct integrations. Use MCP when an agent client wants tools, OAuth discovery, and a standard remote transport.