You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implementation of an MCP server for all [Apify Actors](https://apify.com/store).
7
-
This server enables interaction with one or more Apify Actors that can be defined in the MCP Server configuration.
6
+
Implementation of an MCP server for all [Apify Actors](https://apify.com/store) that enables interaction with Apify Actors.
8
7
9
-
The server can be used in two ways:
8
+
The server can be used in the following ways:
10
9
-**🇦 [MCP Server Actor](https://apify.com/apify/actors-mcp-server)** – HTTP server accessible via Server-Sent Events (SSE), see [guide](#-mcp-server-actor)
11
10
-**⾕ MCP Server Stdio** – Local server available via standard input/output (stdio), see [guide](#-mcp-server-at-a-local-host)
11
+
-**🇦 Apify MCP API (alpha)** – HTTP server accessible via Server-Sent Events (SSE), see [guide](#apify-mcp-api)
12
12
13
13
You can also interact with the MCP server using a chat-like UI with 💬 [Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client)
14
14
@@ -66,44 +66,28 @@ Interested in building and monetizing your own AI agent on Apify? Check out our
66
66
67
67
### Actors
68
68
69
-
Any [Apify Actor](https://apify.com/store) can be used as a tool.
69
+
Any [Apify Actor](https://apify.com/store) can be used as a tool via this MCP server.
70
70
By default, the server is pre-configured with the Actors specified below, but this can be overridden by providing Actor input.
71
71
72
72
```text
73
73
'apify/instagram-scraper'
74
74
'apify/rag-web-browser'
75
75
'lukaskrivka/google-maps-with-contact-details'
76
76
```
77
-
The MCP server loads the Actor input schema and creates MCP tools corresponding to the Actors.
78
-
See this example of input schema for the [RAG Web Browser](https://apify.com/apify/rag-web-browser/input-schema).
79
-
80
-
The tool name must always be the full Actor name, such as `apify/rag-web-browser`.
81
-
The arguments for an MCP tool represent the input parameters of the Actor.
82
-
For example, for the `apify/rag-web-browser` Actor, the arguments are:
83
-
84
-
```json
85
-
{
86
-
"query": "restaurants in San Francisco",
87
-
"maxResults": 3
88
-
}
89
-
```
90
-
You don't need to specify the input parameters or which Actor to call; everything is managed by an LLM.
91
-
When a tool is called, the arguments are automatically passed to the Actor by the LLM.
92
-
You can refer to the specific Actor's documentation for a list of available arguments.
93
77
94
78
### Helper tools
95
79
96
80
The server provides a set of helper tools to discover available Actors and retrieve their details:
97
81
-`get-actor-details`: Retrieves documentation, input schema, and details about a specific Actor.
98
-
-`discover-actors`: Searches for relevant Actors using keywords and returns their details.
82
+
-`search-actors`: Searches for relevant Actors using keywords and returns their details.
99
83
100
-
There are also tools to manage the available tools list. However, dynamically adding and removing tools requires the MCP client to have the capability to update the tools list (handle `ToolListChangedNotificationSchema`), which is typically not supported.
84
+
There are also tools to manage the available tools list. However, **dynamically adding and removing tools requires the MCP client to have the capability to update the tools list** (handle `ToolListChangedNotificationSchema`), which is typically not supported.
101
85
102
86
You can try this functionality using the [Apify Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client) Actor.
103
-
To enable it, set the `enableActorAutoLoading` parameter.
87
+
To enable it, set the `enableAddingActors` parameter.
104
88
105
-
-`add-actor-as-tool`: Adds an Actor by name to the available tools list without executing it, requiring user consent to run later.
106
-
-`remove-actor-from-tool`: Removes an Actor by name from the available tools list when it's no longer needed.
89
+
-`add-actor`: Adds an Actor by name to the available tools list without executing it, requiring user consent to run later.
90
+
-`remove-actor`: Removes an Actor by name from the available tools list when it's no longer needed.
107
91
108
92
## Prompt & Resources
109
93
@@ -112,94 +96,51 @@ We plan to add [Apify's dataset](https://docs.apify.com/platform/storage/dataset
112
96
113
97
# ⚙️ Usage
114
98
115
-
The Apify MCP Server can be used in two ways: **as an Apify Actor** running on the Apify platform
116
-
or as a **local server** running on your machine.
99
+
The Apify MCP Server can be used in the following ways: **as an Apify Actor** running on the Apify platform, as a **local server** running on your machine and experimentally as an **Apify MCP API** at [mcp.apify.com](https://mcp.apify.com).
117
100
118
101
## 🇦 MCP Server Actor
119
102
120
-
### Standby web server
103
+
### Standby web server over SSE
121
104
122
105
The Actor runs in [**Standby mode**](https://docs.apify.com/platform/actors/running/standby) with an HTTP web server that receives and processes requests.
123
106
124
-
To start the server with default Actors, send an HTTP GET request with your [Apify API token](https://console.apify.com/settings/integrations) to the following URL:
It is also possible to start the MCP server with a different set of Actors.
129
-
To do this, create a [task](https://docs.apify.com/platform/actors/running/tasks) and specify the list of Actors you want to use.
107
+
To use the server, connect your MCP client to the following URL with the `Authorization` header set to your [Apify API token](https://console.apify.com/settings/integrations):
108
+
```text
109
+
https://actors-mcp-server.apify.actor/sse
130
110
131
-
Then, run the task in Standby mode with the selected Actors:
You can find a list of all available Actors in the [Apify Store](https://apify.com/store).
137
-
138
-
#### 💬 Interact with the MCP Server over SSE
139
-
140
-
Once the server is running, you can interact with Server-Sent Events (SSE) to send messages to the server and receive responses.
141
-
The easiest way is to use [Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client) on Apify.
142
-
143
-
[Claude Desktop](https://claude.ai/download) currently lacks SSE support, but you can use it with Stdio transport; see [MCP Server at a local host](#-mcp-server-at-a-local-host) for more details.
144
-
Note: The free version of Claude Desktop may experience intermittent connection issues with the server.
145
-
146
-
In the client settings, you need to provide server configuration:
Alternatively, you can use [clientSse.ts](https://github.com/apify/actor-mcp-server/tree/main/src/examples/clientSse.ts) script or test the server using `curl` </> commands.
161
118
162
-
1. Initiate Server-Sent-Events (SSE) by sending a GET request to the following URL:
The server will respond with a `sessionId`, which you can use to send messages to the server:
167
-
```shell
168
-
event: endpoint
169
-
data: /message?sessionId=a1b
170
-
```
119
+
It is also possible to start the MCP server with a different set of Actors.
120
+
To do this, you can either specify Actors in the `actors` query parameter (comma-separated) or create a [task](https://docs.apify.com/platform/actors/running/tasks) and specify the list of Actors you want to use.
171
121
172
-
2. Send a message to the server by making a POST request with the `sessionId`:
173
-
```shell
174
-
curl -X POST "https://actors-mcp-server.apify.actor/message?token=<APIFY_TOKEN>&session_id=a1b" -H "Content-Type: application/json" -d '{
175
-
"jsonrpc": "2.0",
176
-
"id": 1,
177
-
"method": "tools/call",
178
-
"params": {
179
-
"arguments": { "searchStringsArray": ["restaurants in San Francisco"], "maxCrawledPlacesPerSearch": 3 },
3. Receive the response. The server will invoke the specified Actor as a tool using the provided query parameters and stream the response back to the client via SSE.
data: {"result":{"content":[{"type":"text","text":"{\"searchString\":\"restaurants in San Francisco\",\"rank\":1,\"title\":\"Gary Danko\",\"description\":\"Renowned chef Gary Danko's fixed-price menus of American cuisine ... \",\"price\":\"$100+\"...}}]}}
197
-
```
134
+
If you created a task instead, then use the task Actor URL with either the `Authorization` header or the `token` query parameter (the URL can be found in the task Standby tab in the Apify Console):
You can run the Apify MCP Server on your local machine by configuring it with Claude Desktop or any other [MCP client](https://modelcontextprotocol.io/clients).
202
142
You can also use [Smithery](https://smithery.ai/server/@apify/actors-mcp-server) to install the server automatically.
143
+
Note: The free version of Claude Desktop may experience intermittent connection issues with the server.
0 commit comments