How to use Apify Actors with Claude Code

You get a one-line claude mcp add command that gives Claude Code the tools of the Google Maps Actors in this catalogue, so a prompt such as 'find coffee shops in Denver with phone and website' returns rows from a schema-backed Actor instead of a web summary. If you want all of Apify in Claude Code instead, install the Apify plugin; the scoped URL on this page loads only the Actors you pick, which keeps the tool list short.

Do it now

The config for every Google Maps Actor in the catalogue (6 in this bundle), for each client. Claude Code is first.

Claude Code configterminal or .mcp.json

claude mcp add --transport http apify-google "https://mcp.apify.com/?tools=fetch-actor-details,vexaloom-labs/google-maps-business-lead-finder-with-email,nimbryxo-studio/google-maps-review-and-contributor-activity,vexaloom-labs/google-maps-business-finder-with-hours-ratings,dataspryva/google-maps-business-lead-and-email-finder,dataspryva/google-maps-related-place-and-competitor-finder,nimbryxo-studio/google-maps-popular-times-and-live-busyness"

  1. Run the command in your project folder. Add --scope user to make it available in every project.
  2. Start Claude Code, type /mcp, pick the server and sign in to Apify in the browser window.
  3. No browser sign-in? Add --header "Authorization: Bearer YOUR_APIFY_TOKEN" to the command instead.

Sign-in: OAuth sign-in on first use, or a token header.

Validated, not executed: 7 of 7 checks pass
  • Uses Apify's hosted MCP endpoint over HTTPS
  • The tools parameter lists exactly the chosen Actors as owner/name
  • JSON configs parse and use the client's top-level key and the same URL
  • Codex TOML has a [mcp_servers.<name>] table with url and bearer_token_env_var
  • CLI commands quote the same URL and use the streamable HTTP transport
  • One-click install links decode back to the same URL and carry no token
  • Only placeholders, no real token

Claude Code talks to Apify through the hosted MCP server at https://mcp.apify.com. You sign in with OAuth or pass an Apify API token, and the tools parameter in the URL decides which Actors Claude Code can call. The server allows up to 30 requests per second per user, which is far more than an interactive session needs.

What you need

  • Claude Code installed and signed in.
  • An Apify account: sign in through OAuth when Claude Code asks, or export an APIFY_TOKEN from Apify Console, Settings, API and integrations.
  • The scoped server URL from the Do it now block, which lists fetch-actor-details plus the Google Maps Actors.
  • Optional: the Apify plugin for Claude Code, if you would rather load every Apify tool and the Apify Agent Skills in one install.

Where it breaks

The usual failure is a missing or wrong token: Claude Code shows the server as failed or the first tool call answers unauthorized. Run /mcp, check that the apify server is connected, and sign in again or re-export APIFY_TOKEN before starting Claude Code. A second failure is asking for data the Actor does not return; open the Actor page here first and check its output fields, then name those fields in your prompt.

Method

  1. Copy the claude mcp add command from the Do it now block and run it in your terminal; it registers the hosted server with fetch-actor-details and the Google Maps Actors in its tools list.

  2. Start Claude Code, run /mcp and confirm the apify server is connected; if it asks you to authenticate, complete the Apify sign-in in your browser.

  3. Ask for a structured dataset and name the fields you want, for example: use the Google Maps lead finder to list bakeries in Lyon with name, address, phone and website as a table.

  4. Read the Actor run that Claude Code starts, then ask it to save the rows as CSV or JSON in your project so you can reuse them without a second run.

  5. If you want every Apify tool instead of a scoped list, run /plugin marketplace add apify/apify-claude-code-plugin, then /plugin install apify@apify and /reload-plugins, and enable and authenticate plugin:apify:apify in /mcp.

Troubleshooting

Why does the client say Unauthorized or invalid token?

Every Apify Actor tool needs a signed-in Apify account. Reconnect the server so the OAuth sign-in runs again, or switch to the token variant: an Authorization: Bearer header with an API token from Apify Console, Settings, API and integrations. For a local server the token must be in the server's own env block, not only in your shell.

Source: Apify MCP server README

Why did my agent's tool list change after an update?

Without a tools parameter Apify's server loads its default tool set, which changes between releases. The URLs on this site pin the tools with ?tools=, so the agent always gets the same Actor tool plus fetch-actor-details. Apify's README gives the same advice for production.

Source: Apify MCP server README

What happens when the agent sends input the Actor rejects?

The server answers with the Actor's input schema, so the agent can fix the arguments and call again. The fetch-actor-details tool in every scoped URL lets it read that schema before the first call.

Source: Apify MCP server README

Claude Code shows Needs authentication. Why?

The server is added but not signed in. Type /mcp in an interactive session and authenticate, or run claude mcp login with the server name. Headless runs with claude -p cannot complete OAuth, so sign in once interactively or use the --header token variant.

Source: Claude Code MCP documentation

Claude Code warns that a tool result is too large. What can I change?

Claude Code warns above 10,000 tokens of tool output and caps it at 25,000 by default (MAX_MCP_OUTPUT_TOKENS raises it). Ask the agent for fewer results per call, for example a lower result limit for the Actor.

Source: Claude Code MCP documentation

Questions

Should I use the Apify plugin or the scoped URL?

Use the plugin when you want all of Apify, including its Agent Skills, in Claude Code. Use the scoped URL when you want one or a few Actors, which keeps the tool list and the token use small.

Do I have to paste an API token?

No. The hosted server supports OAuth, so Claude Code can open the Apify sign-in in your browser. A token in the APIFY_TOKEN variable works too, for example on a server.

Why does Claude Code not see the Actor?

The Actor is missing from the tools list in the server URL, or the server did not connect. Run /mcp to check the connection and compare the URL with the one on the Actor's page.

Who pays for the runs?

Your Apify account. Each Actor page shows its Store price and the start fee per run, plus Apify platform usage.

Sources