Skip to content

Commit 1336dc8

Browse files
committed
simplify readme, update usage section
1 parent 433aca7 commit 1336dc8

File tree

1 file changed

+34
-93
lines changed

1 file changed

+34
-93
lines changed

README.md

Lines changed: 34 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
[![Actors MCP Server](https://apify.com/actor-badge?actor=apify/actors-mcp-server)](https://apify.com/apify/actors-mcp-server)
44
[![smithery badge](https://smithery.ai/badge/@apify/actors-mcp-server)](https://smithery.ai/server/@apify/actors-mcp-server)
55

6-
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.
87

9-
The server can be used in two ways:
8+
The server can be used in the following ways:
109
- **🇦 [MCP Server Actor](https://apify.com/apify/actors-mcp-server)** – HTTP server accessible via Server-Sent Events (SSE), see [guide](#-mcp-server-actor)
1110
- **⾕ 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)
1212

1313
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)
1414

@@ -66,44 +66,28 @@ Interested in building and monetizing your own AI agent on Apify? Check out our
6666

6767
### Actors
6868

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.
7070
By default, the server is pre-configured with the Actors specified below, but this can be overridden by providing Actor input.
7171

7272
```text
7373
'apify/instagram-scraper'
7474
'apify/rag-web-browser'
7575
'lukaskrivka/google-maps-with-contact-details'
7676
```
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.
9377

9478
### Helper tools
9579

9680
The server provides a set of helper tools to discover available Actors and retrieve their details:
9781
- `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.
9983

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.
10185

10286
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.
10488

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.
10791

10892
## Prompt & Resources
10993

@@ -112,94 +96,51 @@ We plan to add [Apify's dataset](https://docs.apify.com/platform/storage/dataset
11296

11397
# ⚙️ Usage
11498

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).
117100

118101
## 🇦 MCP Server Actor
119102

120-
### Standby web server
103+
### Standby web server over SSE
121104

122105
The Actor runs in [**Standby mode**](https://docs.apify.com/platform/actors/running/standby) with an HTTP web server that receives and processes requests.
123106

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:
125-
```
126-
https://actors-mcp-server.apify.actor?token=<APIFY_TOKEN>
127-
```
128-
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
130110
131-
Then, run the task in Standby mode with the selected Actors:
132-
```shell
133-
https://USERNAME--actors-mcp-server-task.apify.actor?token=<APIFY_TOKEN>
111+
Authorization: Bearer <APIFY_TOKEN>
134112
```
135113

136-
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:
147-
```json
148-
{
149-
"mcpServers": {
150-
"apify": {
151-
"type": "sse",
152-
"url": "https://actors-mcp-server.apify.actor/sse",
153-
"env": {
154-
"APIFY_TOKEN": "your-apify-token"
155-
}
156-
}
157-
}
158-
}
114+
In case your client does not support setting the `Authorization` header, you can use the `token` query parameter instead:
115+
```text
116+
https://actors-mcp-server.apify.actor/sse?token=<APIFY_TOKEN>
159117
```
160-
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.
161118

162-
1. Initiate Server-Sent-Events (SSE) by sending a GET request to the following URL:
163-
```
164-
curl https://actors-mcp-server.apify.actor/sse?token=<APIFY_TOKEN>
165-
```
166-
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.
171121

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 },
180-
"name": "lukaskrivka/google-maps-with-contact-details"
181-
}
182-
}'
183-
```
184-
The MCP server will start the Actor `lukaskrivka/google-maps-with-contact-details` with the provided arguments as input parameters.
185-
For this POST request, the server will respond with:
122+
To specify the Actors in the `actors` query parameter, use the following URL:
123+
```text
124+
https://actors-mcp-server.apify.actor/sse?actors=apify/instagram-scraper,apify/rag-web-browser
186125
187-
```text
188-
Accepted
189-
```
126+
Authorization: Bearer <APIFY_TOKEN>
127+
```
190128

191-
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.
192-
The response will be returned as JSON text.
129+
Or with the `token` query parameter:
130+
```text
131+
https://actors-mcp-server.apify.actor/sse?token=<APIFY_TOKEN>&actors=apify/instagram-scraper,apify/rag-web-browser
132+
```
193133

194-
```text
195-
event: message
196-
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):
135+
```text
136+
https://USERNAME--actors-mcp-server-task.apify.actor/sse
137+
```
198138

199139
## ⾕ MCP Server at a local host
200140

201141
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).
202142
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.
203144

204145
### Prerequisites
205146

0 commit comments

Comments
 (0)