diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..ba9de55e --- /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 diff --git a/README.md b/README.md index 1d69190c..0cd28b28 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. @@ -197,8 +198,9 @@ Alternatively, you can use simple python [client_see.py](https://github.com/apif ``` ## ⾕ MCP Server at a local host - +`` 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). +You can also use [Smithery](https://smithery.ai/server/@apify/actors-mcp-server) to install the server automatically. ### Prerequisites @@ -291,6 +293,14 @@ To configure Claude Desktop to work with the MCP server, follow these steps. For Find and analyze instagram profile of the Rock. ``` +### 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 +``` + #### Stdio clients Create environment file `.env` with the following content: diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 00000000..01616594 --- /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