Skip to content

Commit 1109776

Browse files
committed
Update docs
1 parent 5f235c3 commit 1109776

File tree

1 file changed

+36
-29
lines changed

1 file changed

+36
-29
lines changed

README.md

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ We plan to add Apify's dataset and key-value store as resources in the future.
7777
The Apify MCP Server can be used in two ways: **as an Apify Actor** running at Apify platform
7878
or as a **local server** running on your machine.
7979

80-
## MCP Server Actor
80+
## 🇦 MCP Server Actor
8181

8282
### Standby web server
8383

@@ -95,7 +95,7 @@ https://mcp-server.apify.actor?token=<APIFY_API_TOKEN>&actors=junglee/free-amazo
9595
```
9696
Find list of all available Actors in the [Apify Store](https://apify.com/store).
9797

98-
#### Interact with the MCP Server
98+
#### 💬 Interact with the MCP Server
9999

100100
Once the server is running, you can interact with Server-Sent Events (SSE) to send messages to the server and receive responses.
101101
You can use MCP clients such as [Superinference.ai](https://superinterface.ai/) or [LibreChat](https://www.librechat.ai/).
@@ -115,7 +115,7 @@ In the client settings you need to provide server configuration:
115115
}
116116
}
117117
```
118-
Alternatively, you can use simple python [client_see.py](https://github.com/apify/actor-mcp-server/tree/main/src/examples/client_sse.py) or test the server using curl commands.
118+
Alternatively, you can use simple python [client_see.py](https://github.com/apify/actor-mcp-server/tree/main/src/examples/client_sse.py) or test the server using `curl` </> commands.
119119

120120
1. Initiate Server-Sent-Events (SSE) by sending a GET request to the following URL:
121121
```
@@ -154,7 +154,7 @@ Alternatively, you can use simple python [client_see.py](https://github.com/apif
154154
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+\"...}}]}}
155155
```
156156
157-
## MCP Server at local host
157+
## MCP Server at a local host
158158
159159
### Prerequisites
160160
@@ -195,7 +195,7 @@ Configure Claude Desktop to recognize the MCP server.
195195

196196
```text
197197
"mcpServers": {
198-
"apify-mcp-server": {
198+
"apify": {
199199
"command": "npx",
200200
"args": [
201201
"/path/to/actor-mcp-server/dist/index.js"
@@ -214,7 +214,7 @@ Configure Claude Desktop to recognize the MCP server.
214214
"args": [
215215
"/path/to/actor-mcp-server/dist/index.js",
216216
"--actors",
217-
"lukaskrivka/google-maps-with-contact-details,apify/facebook-posts-scraper"
217+
"lukaskrivka/google-maps-with-contact-details,apify/instagram-scraper"
218218
]
219219
"env": {
220220
"APIFY-API-TOKEN": "your-apify-api-token"
@@ -238,49 +238,56 @@ Configure Claude Desktop to recognize the MCP server.
238238
Find and analyze instagram profile of the Rock.
239239
```
240240
241-
# 👷🏼 Development
242-
243-
## Prerequisites
244-
245-
- [Node.js](https://nodejs.org/en) (v18 or higher)
246-
- Python 3.6 or higher
241+
#### Stdio clients
247242
248243
Create environment file `.env` with the following content:
249244
```text
250245
APIFY_API_TOKEN=your-apify-api-token
246+
# ANTHROPIC_API_KEY is only required when you want to run examples/clientStdioChat.js
247+
ANTHROPIC_API_KEY=your-anthropic-api-token
251248
```
249+
In the `examples` directory, you can find two clients that interact with the server via
250+
standard input/output (stdio):
251+
1. [`clientStdio.ts`](https://github.com/apify/actor-mcp-server/tree/main/src/examples/clientStdio.ts):
252+
This client script starts the MCP server with two specified Actors.
253+
It then calls the `apify/rag-web-browser` tool with a query and prints the result.
254+
It demonstrates how to connect to the MCP server, list available tools, and call a specific tool using stdio transport.
255+
```bash
256+
node dist/examples/clientStdio.js
257+
```
252258

253-
## Local client (stdio)
254-
255-
To test the server locally, you can use `examples/clientStdio.ts`:
259+
2. [`clientStdioChat.ts`](https://github.com/apify/actor-mcp-server/tree/main/src/examples/clientStdioChat.ts):
260+
This client script also starts the MCP server but provides an interactive command-line chat interface.
261+
It prompts the user to interact with the server, allowing for dynamic tool calls and responses.
262+
This example is useful for testing and debugging interactions with the MCP server in conversational manner.
256263

257-
```bash
258-
node dist/examples/clientStdio.js
259-
```
264+
```bash
265+
node dist/examples/clientStdioChat.js
266+
```
260267

261-
The script will start the MCP server with two Actors (`lukaskrivka/google-maps-with-contact-details` and `apify/rag-web-browser`).
262-
Then it will call `apify/rag-web-browser` tool with a query and will print the result.
268+
# 👷🏼 Development
263269

264-
## Chat local client (stdio)
270+
## Prerequisites
265271

266-
To run simple chat client, you can use `examples/clientSdioChat.ts`:
272+
- [Node.js](https://nodejs.org/en) (v18 or higher)
273+
- Python 3.6 or higher
267274

268-
```bash
269-
node dist/examples/clientStdioChat.js
275+
Create environment file `.env` with the following content:
276+
```text
277+
APIFY_API_TOKEN=your-apify-api-token
278+
# ANTHROPIC_API_KEY is only required when you want to run examples/clientStdioChat.js
279+
ANTHROPIC_API_KEY=your-anthropic-api-token
270280
```
271-
Here you can interact with the server using the chat interface.
272-
273281
## Local client (SSE)
274282

275283
To test the server with the SSE transport, you can use python script `examples/client_sse.py`:
276284
Currently, the node.js client does not support to establish a connection to remote server witch custom headers.
285+
You need to change URL to your local server URL in the script.
277286

278287
```bash
279-
node dist/clientSse.js
288+
python src/examples/client_sse.py
280289
```
281290

282-
The script will start the MCP server with default Actors.
283-
284291
## Debugging
285292

286293
Since MCP servers operate over standard input/output (stdio), debugging can be challenging.

0 commit comments

Comments
 (0)