diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ce3fa22 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM python:3.11-slim + +WORKDIR /app + +# Install uv for package management +RUN pip install --no-cache-dir uv + +# Install the mcp-server-qdrant package +RUN uv pip install --system --no-cache-dir mcp-server-qdrant + +# Expose the default port for SSE transport +EXPOSE 8000 + +# Set environment variables with defaults that can be overridden at runtime +ENV QDRANT_URL="" +ENV QDRANT_API_KEY="" +ENV COLLECTION_NAME="default-collection" +ENV EMBEDDING_MODEL="sentence-transformers/all-MiniLM-L6-v2" + +# Run the server with SSE transport +CMD uvx mcp-server-qdrant --transport sse diff --git a/README.md b/README.md index ba8cb2e..b6e7c71 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,22 @@ Supported transport protocols: The default transport is `stdio` if not specified. +### Using Docker + +A Dockerfile is available for building and running the MCP server: + +```bash +# Build the container +docker build -t mcp-server-qdrant . + +# Run the container +docker run -p 8000:8000 \ + -e QDRANT_URL="http://your-qdrant-server:6333" \ + -e QDRANT_API_KEY="your-api-key" \ + -e COLLECTION_NAME="your-collection" \ + mcp-server-qdrant +``` + ### Installing via Smithery To install Qdrant MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/protocol/mcp-server-qdrant): @@ -144,8 +160,15 @@ descriptions: ```bash QDRANT_URL="http://localhost:6333" \ COLLECTION_NAME="code-snippets" \ -TOOL_STORE_DESCRIPTION="Store reusable code snippets for later retrieval. The 'information' parameter should contain a natural language description of what the code does, while the actual code should be included in the 'metadata' parameter as a 'code' property. The value of 'metadata' is a Python dictionary with strings as keys. Use this whenever you generate some code snippet." \ -TOOL_FIND_DESCRIPTION="Search for relevant code snippets based on natural language descriptions. The 'query' parameter should describe what you're looking for, and the tool will return the most relevant code snippets. Use this when you need to find existing code snippets for reuse or reference." \ +TOOL_STORE_DESCRIPTION="Store reusable code snippets for later retrieval. \ +The 'information' parameter should contain a natural language description of what the code does, \ +while the actual code should be included in the 'metadata' parameter as a 'code' property. \ +The value of 'metadata' is a Python dictionary with strings as keys. \ +Use this whenever you generate some code snippet." \ +TOOL_FIND_DESCRIPTION="Search for relevant code snippets based on natural language descriptions. \ +The 'query' parameter should describe what you're looking for, \ +and the tool will return the most relevant code snippets. \ +Use this when you need to find existing code snippets for reuse or reference." \ uvx mcp-server-qdrant --transport sse # Enable SSE transport ```