From 42d1fa662db2f88496feb6e929033e8f157cfafc Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Mon, 27 Jan 2025 12:02:46 +0800 Subject: [PATCH 1/3] Add Dockerfile --- Dockerfile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ba9de55 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,39 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Stage 1: Build the TypeScript project +FROM node:18-alpine AS builder + +# Set working directory +WORKDIR /app + +# Copy package files and install dependencies +COPY package.json package-lock.json ./ +RUN npm install + +# Copy source files +COPY src ./src +COPY tsconfig.json ./ + +# Build the project +RUN npm run build + +# Stage 2: Set up the runtime environment +FROM node:18-alpine + +# Set working directory +WORKDIR /app + +# Copy only the necessary files from the build stage +COPY --from=builder /app/dist ./dist +COPY package.json package-lock.json ./ + +# Install production dependencies only +RUN npm ci --omit=dev + +# Expose any necessary ports (example: 3000) +EXPOSE 3000 + +# Set the environment variable for the Apify token +ENV APIFY_TOKEN= + +# Set the entry point for the container +ENTRYPOINT ["node", "dist/main.js"] \ No newline at end of file From 5e80cb770d0abc53556bd9de8c991112d92ad811 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Mon, 27 Jan 2025 12:02:47 +0800 Subject: [PATCH 2/3] Add Smithery configuration --- smithery.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 smithery.yaml diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..0161659 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,17 @@ +# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml + +startCommand: + type: stdio + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + required: + - apifyToken + properties: + apifyToken: + type: string + description: The API token for accessing Apify's services. + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + (config) => ({ command: 'node', args: ['dist/main.js'], env: { APIFY_TOKEN: config.apifyToken } }) \ No newline at end of file From 49beaec4fde308a6cdb97157a043219172c8e034 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Mon, 27 Jan 2025 12:02:48 +0800 Subject: [PATCH 3/3] Update README --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 99a2139..454b765 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Apify Model Context Protocol (MCP) Server [![Actors MCP Server](https://apify.com/actor-badge?actor=apify/actors-mcp-server)](https://apify.com/apify/actors-mcp-server) +[![smithery badge](https://smithery.ai/badge/@apify/actors-mcp-server)](https://smithery.ai/server/@apify/actors-mcp-server) Implementation of an MCP server for all [Apify Actors](https://apify.com/store). This server enables interaction with one or more Apify Actors that can be defined in the MCP Server configuration. @@ -171,6 +172,14 @@ Alternatively, you can use simple python [client_see.py](https://github.com/apif ## ⾕ MCP Server at a local host +### Installing via Smithery + +To install Apify Actors MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@apify/actors-mcp-server): + +```bash +npx -y @smithery/cli install @apify/actors-mcp-server --client claude +``` + ### Prerequisites - MacOS or Windows