Skip to content

Deployment: Dockerfile and Smithery config #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.
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.
25 changes: 25 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -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 } })