diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ffc914b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Use an official Node.js runtime as a parent image +FROM node:18-alpine AS builder + +# Set the working directory +WORKDIR /app + +# Copy the package.json and package-lock.json into the container +COPY package.json package-lock.json ./ + +# Install the dependencies +RUN npm install + +# Copy the rest of the application code +COPY . . + +# Build the TypeScript code +RUN npm run build + +# Use a lighter image for running the app +FROM node:18-alpine + +# Set the working directory +WORKDIR /app + +# Copy the built application code from the builder stage +COPY --from=builder /app/build ./build +COPY --from=builder /app/package.json ./package.json +COPY --from=builder /app/node_modules ./node_modules + +# Set environment variable for Apify API Token +ENV APIFY_API_TOKEN=your-apify-api-token + +# Specify the command to run the app +ENTRYPOINT ["node", "build/index.js"] diff --git a/README.md b/README.md index 0030131..7287ac6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Model Context Protocol (MCP) Server for the RAG Web Browser Actor 🌐 +[![smithery badge](https://smithery.ai/badge/mcp-server-rag-web-browser)](https://smithery.ai/server/mcp-server-rag-web-browser) Implementation of an MCP server for the [RAG Web Browser Actor](https://apify.com/apify/rag-web-browser). This Actor serves as a web browser for large language models (LLMs) and RAG pipelines, similar to a web search in ChatGPT. @@ -47,6 +48,14 @@ The server does not provide any resources and prompts. ### Install +#### Installing via Smithery + +To install the MCP Server for the RAG Web Browser Actor for Claude Desktop automatically via [Smithery](https://smithery.ai/server/mcp-server-rag-web-browser): + +```bash +npx -y @smithery/cli install mcp-server-rag-web-browser --client claude +``` + Follow the steps below to set up and run the server on your local machine: First, clone the repository using the following command: diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..d6cf74a --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,18 @@ +# 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: + - apifyApiToken + properties: + apifyApiToken: + type: string + description: The API token for the Apify service, required to access RAG Web + Browser Actor functionality. + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + (config) => ({ command: 'node', args: ['build/index.js'], env: { APIFY_API_TOKEN: config.apifyApiToken } }) \ No newline at end of file