Skip to content

Commit e14b4eb

Browse files
Dusan VystrcilDusan Vystrcil
authored andcommitted
Added tooling info + cleanup
1 parent 323ffdc commit e14b4eb

File tree

1 file changed

+6
-74
lines changed

1 file changed

+6
-74
lines changed

README.md

Lines changed: 6 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,13 @@ When a tool is called, the arguments are automatically passed to the Actor by th
9595
You can refer to the specific Actor's documentation for a list of available arguments.
9696

9797
### Helper tools
98+
One of the powerful features of MCP with Apify is dynamic actor tooling – the ability for an AI agent to find new tools (Actors) as needed and incorporate them. Here are some special MCP operations and how Apify MCP Server supports them:
9899

99-
The server provides a set of helper tools to discover available Actors and retrieve their details:
100-
- `get-actor-details`: Retrieves documentation, input schema, and details about a specific Actor.
101-
- `discover-actors`: Searches for relevant Actors using keywords and returns their details.
102-
103-
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.
104-
105-
You can try this functionality using the [Apify Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client) Actor.
106-
To enable it, set the `enableAddingActors` parameter.
107-
108-
- `add-actor-as-tool`: Adds an Actor by name to the available tools list without executing it, requiring user consent to run later.
109-
- `remove-actor-from-tool`: Removes an Actor by name from the available tools list when it's no longer needed.
100+
- Actor discovery and management: Search for Actors (`search-actors`), view details (`get-actor-details`), and dynamically add or remove tools (`add-actor`, `remove-actor`).
101+
- Actor execution and monitoring: Start Actor runs, fetch run results (`get-actor-run`), logs (`get-actor-log`), and abort runs (`abort-actor-run`).
102+
- Dataset access: List datasets, retrieve dataset info and items (`get-dataset`, `get-dataset-list`, `get-dataset-items`).
103+
- Key-value store access: List key-value stores, view keys, and retrieve records (`get-key-value-store-list`, `get-key-value-store`, `get-key-value-store-keys`, `get-key-value-store-record`).
104+
- Built-in help tool: A static helper (`apify-actor-help-too`) that returns usage info for the Apify MCP Server.
110105

111106
## Prompt & Resources
112107

@@ -160,44 +155,6 @@ In the client settings, you need to provide server configuration:
160155
}
161156
}
162157
```
163-
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.
164-
165-
1. Initiate Server-Sent-Events (SSE) by sending a GET request to the following URL:
166-
```
167-
curl https://actors-mcp-server.apify.actor/sse?token=<APIFY_TOKEN>
168-
```
169-
The server will respond with a `sessionId`, which you can use to send messages to the server:
170-
```shell
171-
event: endpoint
172-
data: /message?sessionId=a1b
173-
```
174-
175-
2. Send a message to the server by making a POST request with the `sessionId`:
176-
```shell
177-
curl -X POST "https://actors-mcp-server.apify.actor/message?token=<APIFY_TOKEN>&session_id=a1b" -H "Content-Type: application/json" -d '{
178-
"jsonrpc": "2.0",
179-
"id": 1,
180-
"method": "tools/call",
181-
"params": {
182-
"arguments": { "searchStringsArray": ["restaurants in San Francisco"], "maxCrawledPlacesPerSearch": 3 },
183-
"name": "lukaskrivka/google-maps-with-contact-details"
184-
}
185-
}'
186-
```
187-
The MCP server will start the Actor `lukaskrivka/google-maps-with-contact-details` with the provided arguments as input parameters.
188-
For this POST request, the server will respond with:
189-
190-
```text
191-
Accepted
192-
```
193-
194-
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.
195-
The response will be returned as JSON text.
196-
197-
```text
198-
event: message
199-
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+\"...}}]}}
200-
```
201158

202159
## ⾕ MCP Server at a local host
203160

@@ -405,31 +362,6 @@ export APIFY_TOKEN=your-apify-token
405362
npx @modelcontextprotocol/inspector npx -y @apify/actors-mcp-server
406363
```
407364

408-
### Installing via Smithery
409-
410-
To install Apify Actors MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@apify/actors-mcp-server):
411-
412-
```bash
413-
npx -y @smithery/cli install @apify/actors-mcp-server --client claude
414-
```
415-
416-
#### Stdio clients
417-
418-
Create an environment file `.env` with the following content:
419-
```text
420-
APIFY_TOKEN=your-apify-token
421-
```
422-
In the `examples` directory, you can find an example client to interact with the server via
423-
standard input/output (stdio):
424-
425-
- [`clientStdio.ts`](https://github.com/apify/actor-mcp-server/tree/main/src/examples/clientStdio.ts)
426-
This client script starts the MCP server with two specified Actors.
427-
It then calls the `apify/rag-web-browser` tool with a query and prints the result.
428-
It demonstrates how to connect to the MCP server, list available tools, and call a specific tool using stdio transport.
429-
```bash
430-
node dist/examples/clientStdio.js
431-
```
432-
433365
# 👷🏼 Development
434366

435367
## Prerequisites

0 commit comments

Comments
 (0)