Skip to content

Developers

Use Grep from your own agent

Grep's MCP server, so Claude Code, Codex or ChatGPT can run research and build agents for you.

Step 1

What the MCP server is

One URL that gives another agent Grep's tools.

Grep publishes an MCP server, so an agent you already use — Claude Code, Codex, Claude.ai, ChatGPT for Work — can start Grep research, read the results, and build and maintain Grep agents without you opening the app.

DetailValue
Server URLhttps://api.grep.ai/mcp
Transportstreamable-http
AuthOAuth 2.0, in the browser
Server namegrep-public-api-v2
Protocol version2025-06-18
Open the MCP page

Checked against the product on October 15, 2026

Step 2

Connect your client

One command, or one pasted URL.

ClientHow
Claude Codeclaude mcp add --transport http grep https://api.grep.ai/mcp, then claude mcp login grep. Run /mcp to check the connection.
Codex CLIcodex mcp add grep --url https://api.grep.ai/mcp, then codex mcp login grep.
Claude.ai, Desktop, CoworkCustomize → Connectors → + → Add custom connector, name it Grep AI, paste the server URL, then Add and Connect.
ChatGPTNeeds Developer mode, switched on by your workspace admin. Settings → Apps → Create, name it Grep AI, paste the URL, choose OAuth, then Scan tools.

Authentication happens in your browser and is tied to your Grep account, so the runs an agent starts come out of your credits and land in your job history.

Copy-ready snippets for every client

Checked against the product on October 15, 2026

Step 3

What it can do

Seven groups, from runs to keys.

GroupWhat the tools cover
RunsStart, continue, cancel, list and inspect runs, and read the live timeline.
Files and artifactsList the files a job produced and read text ones inline.
AttachmentsCreate, read and delete attachments for file-backed research, including files up to 25 MB moved without passing through the agent.
Custom agents and skillsCreate and maintain agents headlessly: skills, tools, context files, structured output, versions and sharing. Browse and write skills.
SwarmsRun up to 1,000 questions as one swarm: estimate the cost, follow progress, retry failed rows.
Quota and billingCheck quota, usage and transactions before starting something expensive.
KeysCreate, list and revoke API keys.

Checked against the product on October 15, 2026

Step 4

Building an agent through it

Describe the job; the client writes the manifest and applies it.

The agent tools are the interesting half. Describe the job you want to a connected coding agent and it can pick the skills from Grep's catalogue, choose the tools, write the agent's instructions, and apply the whole manifest through MCP. The agent then exists in Grep like any other.

  • Open the new agent under Agents and read what was written for it — the instructions, the skills, the tools.
  • Check the INPUT step: those fields are what callers will have to provide.
  • Check the OUTPUT step, and the schema if a system will consume the result.
  • Run it once on a case you know the answer to before scheduling it or sharing it.

Step 5

When a connection stops a run

A named reason to show the person, not an error to retry.

An agent can have connections assigned to it: accounts and saved websites it signs in with. Before a run starts, Grep checks that the person running it can use each one. When one cannot be used, the run stops before any work and nothing is charged. run_get (research_get in older clients) shows the run as failed, with error_kind naming the reason and error_message saying what to do.

error_kindWhat happened
needs_connectionThe agent needs a connection the person running it cannot use. Its owner shares the agent with them, or they connect their own account and assign it.
needs_reconnectA connection needs reconnecting: the person who connected it left the team, or its sign-in expired.
connection_revokedA connection was revoked. Someone who can edit the agent assigns another one.
agent_not_runnableThe person running it may not run this agent, so its connections cannot be used.

Saving an agent is checked too. When agent_create or agent_update adds a connection you may not assign, the call is refused with a named code and retryable: false. not_team_builder means only a builder or admin of the agent's team can assign the team's connections; outside_agent_team means a team connection can only go on that team's agents.

Open Connections

Checked against the product on October 28, 2026