diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0a48a6e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Use a Node.js image as the base image +FROM node:22-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 the dependencies +RUN npm install --ignore-scripts + +# Copy the entire project to the container +COPY . . + +# Run the build script to compile TypeScript to JavaScript +RUN npm run build + +# Use a smaller Node.js image for the runtime +FROM node:22-alpine AS runtime + +# Set the working directory +WORKDIR /app + +# Copy only the necessary files from the builder stage +COPY --from=builder /app/build /app/build +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json + +# Install only production dependencies +RUN npm ci --only=production --ignore-scripts + +# Environment variables +ENV OPENAI_API_KEY="" +ENV QDRANT_URL="" +ENV QDRANT_API_KEY="" + +# Command to run the server +ENTRYPOINT ["node", "build/index.js"] \ No newline at end of file diff --git a/README.md b/README.md index 3ad500b..ba399ce 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # RAG Documentation MCP Server +[![smithery badge](https://smithery.ai/badge/@hannesrudolph/mcp-ragdocs)](https://smithery.ai/server/@hannesrudolph/mcp-ragdocs) + An MCP server implementation that provides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation context. ## Features @@ -84,10 +86,18 @@ You'll need to provide values for the following environment variables: - `QDRANT_URL`: URL of your Qdrant vector database instance - `QDRANT_API_KEY`: API key for authenticating with Qdrant +### Installing via Smithery + +To install RAG Documentation for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@hannesrudolph/mcp-ragdocs): + +```bash +npx -y @smithery/cli install @hannesrudolph/mcp-ragdocs --client claude +``` + ## License This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. ## Acknowledgments -This project is a fork of [qpd-v/mcp-ragdocs](https://github.com/qpd-v/mcp-ragdocs), originally developed by qpd-v. The original project provided the foundation for this implementation. \ No newline at end of file +This project is a fork of [qpd-v/mcp-ragdocs](https://github.com/qpd-v/mcp-ragdocs), originally developed by qpd-v. The original project provided the foundation for this implementation. diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..e2af7bd --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,25 @@ +# 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: + - openaiApiKey + - qdrantUrl + - qdrantApiKey + properties: + openaiApiKey: + type: string + description: The API key for OpenAI embeddings generation. + qdrantUrl: + type: string + description: The URL of the Qdrant vector database instance. + qdrantApiKey: + type: string + description: The API key for authenticating with Qdrant. + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + (config) => ({ command: 'node', args: ['build/index.js'], env: { OPENAI_API_KEY: config.openaiApiKey, QDRANT_URL: config.qdrantUrl, QDRANT_API_KEY: config.qdrantApiKey } }) \ No newline at end of file