---
title: Agent quickstart
url: https://docs.apify.com/agents/quickstart.md
parents:
  - [Apify documentation](https://docs.apify.com/llms.txt)
  - [Connect your AI agent to Apify](https://docs.apify.com/agents.md)
previous: [Overview](https://docs.apify.com/agents.md)
next: [Plugins](https://docs.apify.com/agents/plugins.md)
---

> ## Documentation index
> Fetch the complete documentation index at: https://docs.apify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent quickstart

Connect your AI agent to the Apify MCP server and run your first Actor. For how the MCP server, plugins, and Agent Skills compare, and for the setup guide for your agent, see [For AI agents](https://docs.apify.com/agents.md).

Apify also serves a quickstart for agents to read directly at [apify.com/agents.md](https://apify.com/agents.md).

## Prerequisites

Sign up for an [Apify account](https://console.apify.com/sign-up). The free plan includes monthly platform usage credits with no credit card required. Get your API token from **[Console > Settings > Integrations](https://console.apify.com/settings/integrations)**.

Allow Apify in Claude Code on the web

If you're using Claude Code on the web, your cloud sessions run inside a network-restricted sandbox. By default, the sandbox blocks outbound requests to `*.apify.com`, making documentation, the API, and the MCP server unreachable.

To grant access, add `*.apify.com` to a cloud environment's allowed domains:

1. Open the environment selector and select **Add environment**.
2. Set **Network access** to **Custom**.
3. Check **Also include default list of common package managers** so existing functionality stays intact.
4. Add `*.apify.com` to the **Allowed domains** list.

Alternatively, set **Network access** to **Full** to allow any domain.

For more details, see [Claude Code on the web: Network access](https://code.claude.com/docs/en/claude-code-on-the-web#network-access).

Codex Cloud uses a similar default-deny sandbox. See [Codex Cloud internet access](https://developers.openai.com/codex/cloud/internet-access) for the equivalent configuration.

## Connect the MCP server

The [Apify MCP server](https://docs.apify.com/mcp.md) connects your agent to the Apify platform via the [Model Context Protocol](https://modelcontextprotocol.io/). No local installation needed for remote-capable clients.

If you don't have an Apify account yet, connect to `https://mcp.apify.com/?tools=search-actors,fetch-actor-details,search-apify-docs,fetch-apify-docs`. These tools search Actors and the documentation without an API token, but can't run Actors. For details, see [using the MCP server without an account](https://docs.apify.com/mcp.md#use-without-an-account).

To connect a client that supports remote MCP servers, such as Claude Code, Cursor, VS Code, or GitHub Copilot, to `https://mcp.apify.com`:

1. Add the following to your MCP client's configuration:


   ```json
   {

     "mcpServers": {

       "apify": {

         "type": "http",

         "url": "https://mcp.apify.com"

       }

     }

   }
   ```


2. Restart your client and sign in when prompted. OAuth handles authentication automatically.

Claude Desktop doesn't accept a remote server URL in its configuration file. Add `https://mcp.apify.com` as a custom connector instead. For details, see [Claude Desktop integration guide](https://docs.apify.com/integrations/claude-desktop.md).

For client-specific steps, use the [MCP Configurator](https://mcp.apify.com), which generates ready-to-paste configs.

## Run your first Actor

Every Apify Actor follows the same pattern: send input as JSON, get structured data back. With the MCP server connected, ask your agent to use the agent-optimized [RAG Web Browser](https://apify.com/apify/rag-web-browser) Actor:

Ready-to-use prompt for your AI assistant

Copy prompt


```prompt
Use Apify's RAG Web Browser to find the top 3 pages about Apify documentation, then summarize.
```


Your agent calls [search-actors](https://docs.apify.com/mcp.md#available-tools), [call-actor](https://docs.apify.com/mcp.md#available-tools), and reads the resulting dataset items - all through MCP, no code required.

Cost controls

When an agent calls Actors automatically, set run limits to prevent surprise bills. Pass them in the `callOptions` argument of [call-actor](https://docs.apify.com/mcp.md#available-tools). Fields with these names in the Actor `input` don't cap the run, because the Actor's input schema decides how it handles them.

* `maxTotalChargeUsd` - cap the total amount charged for the run. Works for all pricing models.
* `maxItems` - cap how many results you pay for on an Actor priced per result.
* `timeout` (seconds) - cap how long a single run can last.
* `memory` (MB) - set memory as a power of 2, minimum 128. Lower memory means lower cost per second.

For details, see [Usage and resources](https://docs.apify.com/actors/running/usage-and-resources.md) and [Billing](https://docs.apify.com/account/billing.md).

## Next steps

* [For AI agents](https://docs.apify.com/agents.md) - pick the setup guide for your agent, or install the plugin that bundles the MCP server and Agent Skills in one step.
* [Apify MCP server](https://docs.apify.com/mcp.md) - run the server locally, choose which tools to load, and authenticate with a Bearer token instead of OAuth.
* [API client libraries](https://docs.apify.com/api.md) - call the same Actor from JavaScript or Python when the caller is your own code rather than an agent.
