diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..81e73a0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,38 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Use Node.js LTS version as the base image +FROM node:18-alpine AS builder + +# Set the working directory +WORKDIR /app + +# Copy package.json and package-lock.json to the working directory +COPY package.json package-lock.json ./ + +# Install dependencies +RUN npm install + +# Copy the rest of the application code to the working directory +COPY . . + +# Build the TypeScript files +RUN npm run build + +# Use a clean Node.js image for the production environment +FROM node:18-alpine AS release + +# Set the working directory +WORKDIR /app + +# Copy built files and node_modules from the builder stage +COPY --from=builder /app/build ./build +COPY --from=builder /app/node_modules ./node_modules +COPY --from=builder /app/package.json ./ + +# Set environment variables (replace YOUR_API_KEY_HERE with the actual key) +ENV PERPLEXITY_API_KEY=YOUR_API_KEY_HERE + +# Expose the port the app runs on +EXPOSE 3000 + +# Command to run the application +ENTRYPOINT ["node", "build/index.js"] diff --git a/README.md b/README.md index 1608788..af6b015 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ We got an article about perpelxity mcp! https://cline.bot/blog/supercharge-cline-3-ways-to-build-better-with-perplexity-mcp # MCP-researcher Server +[![smithery badge](https://smithery.ai/badge/@DaInfernalCoder/perplexity-mcp)](https://smithery.ai/server/@DaInfernalCoder/perplexity-mcp) Your own research assistant inside of Cline! Utilizes Perplexity's new Sonar Pro API to get docs, create up-to-date api routes, and check deprecated code while you create features with Cline. @@ -26,6 +27,14 @@ Analyzes code for deprecated features or patterns, providing migration guidance. ## Installation +### Installing via Smithery + +To install MCP-researcher Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@DaInfernalCoder/perplexity-mcp): + +```bash +npx -y @smithery/cli install @DaInfernalCoder/perplexity-mcp --client claude +``` + ### paste this part into claude directly if you want to, the ai can install it for you 1. First install Node.js if not already installed (from nodejs.org) diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..41747ad --- /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: + - perplexityApiKey + properties: + perplexityApiKey: + type: string + description: The API key for the Perplexity API. + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + (config) => ({ command: 'node', args: ['build/index.js'], env: { PERPLEXITY_API_KEY: config.perplexityApiKey } })