Where agents should look first.
Discovery 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.
The MCP surface maps to public v2.
Tools Create, continue, cancel, list, and inspect Grep research jobs through MCP tool calls. List generated files, read text artifacts inline, and hand off large artifacts through signed URLs. Create, read, and delete research attachments for file-backed research workflows. Create, configure, and maintain custom experts headlessly: skills, tools, context files, structured output, versions, and sharing. Check quota, usage, and billing transactions before launching expensive research. Use the public remote MCP endpoint over the current streamable HTTP transport. Discover the protected resource, scopes, and authorization server before attempting connection.
Add Grep to your agent.
Connect Choose your client below. Every option connects to the same streamable HTTP endpoint and uses the same browser-based OAuth flow. Anthropic's terminal-based coding agent. One remote connector works across Claude's web and desktop clients. Custom MCP apps for supported ChatGPT workspaces. OpenAI's terminal coding agent.
bash
claude mcp add --transport http grep https://api.grep.ai/api/v2/mcp
claude mcp login grepbash
https://api.grep.ai/api/v2/mcpbash
https://api.grep.ai/api/v2/mcpbash
codex mcp add grep --url https://api.grep.ai/api/v2/mcp
codex mcp login grep- Open a terminal in the project where you want Grep available.
- Run both commands below to add the remote HTTP server and start OAuth.
- Complete sign-in in your browser, then run /mcp in Claude Code to verify the connection.
- Open Customize → Connectors, select +, then choose Add custom connector.
- Name the connector Grep AI and paste the server URL below.
- Select Add, then Connect, and complete OAuth in your browser.
- Enable Grep AI from the Connectors menu when you start a conversation.
- Confirm that your workspace admin has enabled Developer mode for your account.
- Open Settings → Apps → Create and enter Grep AI as the app name.
- Paste the server URL below, select OAuth, then choose Scan tools and complete authorization.
- Select Create, then enable Grep AI from the Apps menu in a new chat.
- Open a terminal in the project where you want Grep available.
- Run both commands below to add the streamable HTTP server and start OAuth.
- Complete sign-in in your browser, then run codex mcp list or /mcp in Codex to verify the connection.
Build an expert headlessly.
Experts Everything the Agent Builder UI does is available as MCP tools (and mirrored at /api/v2/experts), gated by the experts:read and experts:write scopes. Browse the skill catalog, read any SKILL.md, and author custom skills. List the MCP tools an expert can be granted. Declarative Terraform-style sync: one manifest, one call — diffs desired vs current state (skills, config, context files) and performs the minimal delta. Idempotent; dry_run returns the plan. Imperative lifecycle with the complete Builder config: output schema, SOP, input form, defaults, cost cap. Alternative entry point: describe a domain and a builder agent designs the expert; poll to completion. Attach reference documents — by source_url (server-side SSRF-guarded fetch, preferred), attachment_id, or inline base64. Archives are rejected (upload the members). Every change is snapshotted; restores are reversible. Preview config extraction, workflow authoring, and the research plan your SOP would produce — planning phase only, cents instead of full runs. Share with a user, an email domain, or a team. Mint, inspect, and revoke your own parcha- API keys headlessly. A key's scopes are a subset of your OAuth token's; the secret is returned once, at creation. Run research at scale: one batch fans out up to 100 questions as parallel research jobs under one handle — estimate the credit cost, poll progress, read each row's report via research_get, retry failed rows. Filter server-side (query/category/server/limit) — the response's total tells you when to refine instead of paging. Tools flagged always_on ride with every run and need no grant. Author a bespoke skill if the catalog lacks one: Supplying output_schema / output_sop makes structured output deterministic — no LLM extraction pass. Prefer source_url — the server fetches it (public http(s) only, SSRF-guarded, size-capped), so the bytes never transit your context window. attachment_id copies from a research attachment you own; content_base64/content_text remain for small inline files. Expand .zip archives client-side — the server rejects them. validate_only runs every check (skill/tool names, output_schema validity, template existence) without persisting; expert_plan_preview runs only the planning phase so SOP edits cost cents, not runs. The MCP schemas enumerate valid input_form types and output_type keys — no 422 archaeology. expert_update is a partial patch and every change lands in the version history. expert_apply replaces steps 1–4: it diffs the manifest against current state and performs the minimal create/update/upload/delete set — custom skills included. Re-applying an unchanged manifest is a no-op; drop dry_run to apply. The run stages the expert's context files into the sandbox and returns structured output matching the schema.
bash
skills_list { "query": "financial analysis", "limit": 20 }
mcp_tools_list { "category": "screening" }bash
skill_create {
"name": "credit-memo-writer",
"description": "Writes a five-field credit memo from spread financials.",
"content": "# Credit Memo Writer\n\nMethodology..."
}bash
expert_create {
"name": "Merchant Credit Analyst",
"system_prompt": "You are a credit analyst. Spread the financials...",
"skill_names": ["credit-memo-writer", "financial-data-research"],
"mcp_tool_names": ["parallel:web_search"],
"output_schema": {
"type": "object",
"properties": { "icr": { "type": "integer", "minimum": 1, "maximum": 10 } },
"required": ["icr"]
},
"input_form": [{ "label": "Company name", "type": "text", "required": true }],
"max_cost_usd": 5.0
}bash
expert_context_file_upload {
"expert_id": "<id from step 2>",
"source_url": "https://acme.example/chart-of-accounts.pdf"
}
expert_context_file_upload {
"expert_id": "<id>",
"attachment_id": "<research attachment id>"
}
expert_context_files_list { "expert_id": "<id>" }bash
expert_create { ..., "validate_only": true }
expert_update { "expert_id": "<id>", "system_prompt": "...v2...", "validate_only": true }
expert_plan_preview { "expert_id": "<id>", "question": "Spread FY2025 for Acme" }
expert_update { "expert_id": "<id>", "system_prompt": "...v2..." }bash
expert_apply {
"manifest": {
"name": "Merchant Credit Analyst",
"system_prompt": "You are a credit analyst...",
"skills": ["credit-memo-writer", "financial-data-research"],
"custom_skills": [{ "name": "credit-memo-writer", "description": "...", "content": "# ..." }],
"mcp_tool_names": ["parallel:web_search"],
"output_schema": { "type": "object", "properties": { "icr": { "type": "integer" } } },
"context_files": [
{ "name": "chart-of-accounts.pdf", "source_url": "https://acme.example/chart.pdf" },
{ "name": "icr-scale.md", "content": "1 to 10..." }
]
},
"dry_run": true
}bash
research_create {
"question": "Spread FY2025 financials for Acme Corp",
"expert_id": "<id>",
"effort": "high"
}Fetch the Server Card.
bash
curl https://grep.ai/.well-known/mcp/server-card.json | jqbash
curl https://grep.ai/.well-known/oauth-protected-resource/api/v2/mcp | jqbash
{
"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.