Skip to content

Commit dcd1a91

Browse files
Deployment: Dockerfile and Smithery config (#29)
* Add Dockerfile * Add Smithery configuration * Update README --------- Co-authored-by: Jiří Spilka <[email protected]>
1 parent b0b4952 commit dcd1a91

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

Dockerfile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2+
# Stage 1: Build the TypeScript project
3+
FROM node:18-alpine AS builder
4+
5+
# Set working directory
6+
WORKDIR /app
7+
8+
# Copy package files and install dependencies
9+
COPY package.json package-lock.json ./
10+
RUN npm install
11+
12+
# Copy source files
13+
COPY src ./src
14+
COPY tsconfig.json ./
15+
16+
# Build the project
17+
RUN npm run build
18+
19+
# Stage 2: Set up the runtime environment
20+
FROM node:18-alpine
21+
22+
# Set working directory
23+
WORKDIR /app
24+
25+
# Copy only the necessary files from the build stage
26+
COPY --from=builder /app/dist ./dist
27+
COPY package.json package-lock.json ./
28+
29+
# Install production dependencies only
30+
RUN npm ci --omit=dev
31+
32+
# Expose any necessary ports (example: 3000)
33+
EXPOSE 3000
34+
35+
# Set the environment variable for the Apify token
36+
ENV APIFY_TOKEN=<your-apify-token>
37+
38+
# Set the entry point for the container
39+
ENTRYPOINT ["node", "dist/main.js"]

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Apify Model Context Protocol (MCP) Server
22

33
[![Actors MCP Server](https://apify.com/actor-badge?actor=apify/actors-mcp-server)](https://apify.com/apify/actors-mcp-server)
4+
[![smithery badge](https://smithery.ai/badge/@apify/actors-mcp-server)](https://smithery.ai/server/@apify/actors-mcp-server)
45

56
Implementation of an MCP server for all [Apify Actors](https://apify.com/store).
67
This server enables interaction with one or more Apify Actors that can be defined in the MCP Server configuration.
@@ -197,8 +198,9 @@ Alternatively, you can use simple python [client_see.py](https://github.com/apif
197198
```
198199
199200
## ⾕ MCP Server at a local host
200-
201+
``
201202
You can run the Apify MCP Server on your local machine by configuring it with Claude Desktop or any other [MCP clients](https://modelcontextprotocol.io/clients).
203+
You can also use [Smithery](https://smithery.ai/server/@apify/actors-mcp-server) to install the server automatically.
202204
203205
### Prerequisites
204206
@@ -291,6 +293,14 @@ To configure Claude Desktop to work with the MCP server, follow these steps. For
291293
Find and analyze instagram profile of the Rock.
292294
```
293295

296+
### Installing via Smithery
297+
298+
To install Apify Actors MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@apify/actors-mcp-server):
299+
300+
```bash
301+
npx -y @smithery/cli install @apify/actors-mcp-server --client claude
302+
```
303+
294304
#### Stdio clients
295305

296306
Create environment file `.env` with the following content:

smithery.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml
2+
3+
startCommand:
4+
type: stdio
5+
configSchema:
6+
# JSON Schema defining the configuration options for the MCP.
7+
type: object
8+
required:
9+
- apifyToken
10+
properties:
11+
apifyToken:
12+
type: string
13+
description: The API token for accessing Apify's services.
14+
commandFunction:
15+
# A function that produces the CLI command to start the MCP on stdio.
16+
|-
17+
(config) => ({ command: 'node', args: ['dist/main.js'], env: { APIFY_TOKEN: config.apifyToken } })

0 commit comments

Comments
 (0)