@mhalder/qdrant-mcp-server 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,315 +1,140 @@
1
- # Qdrant MCP Server Examples
1
+ # Examples
2
2
 
3
- Practical examples demonstrating how to use the Qdrant MCP Server for various use cases.
3
+ Practical examples demonstrating Qdrant MCP Server usage.
4
4
 
5
- ## Quick Start
5
+ ## Prerequisites
6
6
 
7
- Before running these examples, ensure you have:
7
+ Before running examples:
8
8
 
9
- 1. **Qdrant and Ollama running**: `docker compose up -d`
10
- 2. **Ollama model pulled**: `docker exec ollama ollama pull nomic-embed-text`
11
- 3. **MCP Server configured**: See main [README](../README.md) for setup
12
- 4. **Optional - Alternative providers**: Configure API key for OpenAI, Cohere, or Voyage AI if not using Ollama
9
+ ```bash
10
+ # Start services
11
+ docker compose up -d
12
+
13
+ # Pull embedding model
14
+ docker exec ollama ollama pull nomic-embed-text
15
+ ```
16
+
17
+ Configure MCP server as described in [main README](../README.md).
13
18
 
14
19
  ## Available Examples
15
20
 
16
21
  ### 🎯 [Basic Usage](./basic/)
17
22
 
18
- **Start here if you're new to the MCP server.**
19
-
20
- Learn fundamental operations:
23
+ **Start here** - fundamental operations
21
24
 
22
25
  - Creating collections
23
26
  - Adding documents
24
- - Performing semantic searches
25
- - Managing resources
27
+ - Semantic search
28
+ - Resource management
26
29
 
27
- **Time:** 5-10 minutes
28
- **Difficulty:** Beginner
30
+ **Time:** 5-10 minutes | **Difficulty:** Beginner
29
31
 
30
32
  ---
31
33
 
32
- ### [Rate Limiting](./rate-limiting/)
34
+ ### 🔀 [Hybrid Search](./hybrid-search/)
33
35
 
34
- **Understand automatic rate limit handling for batch operations.**
36
+ Combine semantic and keyword search for better results
35
37
 
36
- Topics covered:
38
+ - Understanding hybrid search benefits
39
+ - Creating hybrid-enabled collections
40
+ - Comparing semantic vs hybrid search
41
+ - Best practices for technical content
37
42
 
38
- - Configuring rate limits for your embedding provider
39
- - Batch document processing
40
- - Exponential backoff retry behavior
41
- - Monitoring and troubleshooting
42
-
43
- **Use cases:**
44
-
45
- - High-volume document ingestion
46
- - Free tier optimization
47
- - Production reliability
48
- - Batch operations
43
+ **Use cases:** Technical docs, product search, legal documents, code search
49
44
 
50
- **Time:** 10-15 minutes
51
- **Difficulty:** Beginner to Intermediate
45
+ **Time:** 15-20 minutes | **Difficulty:** Intermediate
52
46
 
53
47
  ---
54
48
 
55
- ### 📚 [Knowledge Base](./knowledge-base/)
56
-
57
- **Build a searchable documentation system with metadata.**
49
+ ### [Rate Limiting](./rate-limiting/)
58
50
 
59
- Topics covered:
51
+ Automatic rate limit handling for batch operations
60
52
 
61
- - Structuring documents with rich metadata
62
- - Organizing content by team, topic, and difficulty
63
- - Filtering searches by categories
64
- - Scaling and maintenance strategies
65
-
66
- **Use cases:**
53
+ - Configuring provider rate limits
54
+ - Batch document processing
55
+ - Exponential backoff retry
56
+ - Monitoring and troubleshooting
67
57
 
68
- - Company documentation
69
- - Help centers
70
- - Internal wikis
71
- - Educational content
58
+ **Use cases:** High-volume ingestion, free tier optimization, production reliability
72
59
 
73
- **Time:** 15-20 minutes
74
- **Difficulty:** Intermediate
60
+ **Time:** 10-15 minutes | **Difficulty:** Beginner to Intermediate
75
61
 
76
62
  ---
77
63
 
78
- ### 🔍 [Advanced Filtering](./filters/)
79
-
80
- **Master complex search filters with boolean logic.**
81
-
82
- Learn to:
64
+ ### 📚 [Knowledge Base](./knowledge-base/)
83
65
 
84
- - Combine multiple filter conditions (AND, OR, NOT)
85
- - Filter by categories, prices, ratings, and availability
86
- - Use range filters for numeric values
87
- - Build sophisticated e-commerce searches
66
+ Searchable documentation system with metadata
88
67
 
89
- **Use cases:**
68
+ - Structuring documents with rich metadata
69
+ - Organizing by team, topic, difficulty
70
+ - Filtering searches by categories
71
+ - Scaling and maintenance
90
72
 
91
- - Product catalogs
92
- - Inventory management
93
- - Content filtering
94
- - Access control
73
+ **Use cases:** Company docs, help centers, internal wikis, education
95
74
 
96
- **Time:** 20-30 minutes
97
- **Difficulty:** Intermediate to Advanced
75
+ **Time:** 15-20 minutes | **Difficulty:** Intermediate
98
76
 
99
77
  ---
100
78
 
101
- ## Example Structure
102
-
103
- Each example includes:
104
-
105
- - **README.md** - Step-by-step tutorial with commands
106
- - **Sample data** - Documents with metadata to copy/paste
107
- - **Search examples** - Real queries you can try
108
- - **Best practices** - Tips and recommendations
109
-
110
- ## How to Use These Examples
111
-
112
- ### Option 1: Interactive with Claude Code
113
-
114
- Copy commands directly into Claude Code:
115
-
116
- ```
117
- Create a collection named "test"
118
- Add documents...
119
- Search for...
120
- ```
121
-
122
- ### Option 2: Understand the Concepts
123
-
124
- Read through examples to understand:
79
+ ### 🔍 [Advanced Filtering](./filters/)
125
80
 
126
- - Metadata design patterns
127
- - Filter syntax and structure
128
- - Search result ranking
129
- - Collection organization
81
+ Complex search filters with boolean logic
130
82
 
131
- ### Option 3: Adapt for Your Use Case
83
+ - Multiple filter conditions (AND, OR, NOT)
84
+ - Filtering by categories, ratings, availability
85
+ - Range filters for numeric values
86
+ - E-commerce search patterns
132
87
 
133
- Use examples as templates:
88
+ **Use cases:** Product catalogs, inventory, content filtering, access control
134
89
 
135
- 1. Start with the closest matching example
136
- 2. Modify metadata structure for your data
137
- 3. Adjust search queries for your needs
138
- 4. Scale up with your own documents
90
+ **Time:** 20-30 minutes | **Difficulty:** Intermediate to Advanced
139
91
 
140
92
  ## Learning Path
141
93
 
142
94
  ```
143
- ┌─────────────┐
144
- │ Basic │ Start here - core operations
145
- └──────┬──────┘
146
-
147
- ├──────────┐
148
- │ ▼
149
- │ ┌─────────────┐
150
- │ │ Rate │ Learn automatic rate limit handling
151
- │ │ Limiting │ (especially for batch operations)
152
- │ └─────────────┘
153
-
154
-
155
- ┌─────────────┐
156
- │ Knowledge │ Add structure with metadata
157
- │ Base │
158
- └──────┬──────┘
159
-
160
-
161
- ┌─────────────┐
162
- │ Advanced │ Master complex filtering
163
- │ Filtering │
164
- └─────────────┘
95
+ Basic → Hybrid Search → Rate Limiting → Knowledge Base → Advanced Filtering
165
96
  ```
166
97
 
167
98
  ## Common Patterns
168
99
 
169
- ### Pattern 1: Content Organization
170
-
171
- ```
172
- metadata: {
173
- "category": "type",
174
- "topic": "subject",
175
- "author": "creator",
176
- "date": "2024-01-15"
177
- }
178
- ```
179
-
180
- Good for: Blogs, documentation, articles
181
-
182
- ### Pattern 2: E-commerce
183
-
184
- ```
185
- metadata: {
186
- "category": "electronics",
187
- "price": 99.99,
188
- "rating": 4.5,
189
- "in_stock": true,
190
- "brand": "BrandName"
191
- }
192
- ```
193
-
194
- Good for: Product catalogs, inventory systems
195
-
196
- ### Pattern 3: Access Control
197
-
198
- ```
199
- metadata: {
200
- "visibility": "internal",
201
- "department": "engineering",
202
- "sensitivity": "confidential"
203
- }
204
- ```
205
-
206
- Good for: Enterprise knowledge bases, secure documents
207
-
208
- ### Pattern 4: Temporal Data
209
-
210
- ```
211
- metadata: {
212
- "created_at": "2024-01-15",
213
- "updated_at": "2024-03-20",
214
- "status": "published",
215
- "version": "2.1"
216
- }
217
- ```
218
-
219
- Good for: Versioned content, time-series data
220
-
221
- ## Tips for All Examples
222
-
223
- ### 1. Start Small
224
-
225
- Test with 5-10 documents before scaling to thousands.
226
-
227
- ### 2. Design Metadata First
228
-
229
- Plan your metadata structure before adding documents:
230
-
231
- - What fields do you need?
232
- - What will you filter by?
233
- - What types (string, number, boolean)?
234
-
235
- ### 3. Use Consistent IDs
236
-
237
- Choose an ID scheme:
238
-
239
- - Sequential: `1`, `2`, `3`
240
- - Prefixed: `doc-001`, `doc-002`
241
- - Semantic: `eng-api-auth`, `sales-pricing`
242
- - UUIDs: Generated automatically
100
+ | Pattern | Metadata Structure | Use Case |
101
+ | -------------------- | -------------------------------------------------- | --------------------- |
102
+ | Content Organization | `category`, `topic`, `author`, `date` | Blogs, docs, articles |
103
+ | E-commerce | `category`, `price`, `rating`, `in_stock`, `brand` | Product catalogs |
104
+ | Access Control | `visibility`, `department`, `sensitivity` | Enterprise knowledge |
105
+ | Temporal Data | `created_at`, `updated_at`, `status`, `version` | Versioned content |
243
106
 
244
- ### 4. Test Searches
107
+ ## Tips
245
108
 
246
- Try various queries to validate:
247
-
248
- - Semantic matching works correctly
249
- - Filters return expected results
250
- - Result ranking makes sense
251
-
252
- ### 5. Clean Up
253
-
254
- Delete test collections when done:
255
-
256
- ```
257
- Delete collection "collection-name"
258
- ```
109
+ 1. **Start Small** - Test with 5-10 documents before scaling
110
+ 2. **Design Metadata First** - Plan fields, types, and filters
111
+ 3. **Use Consistent IDs** - Choose a scheme (sequential, prefixed, semantic, UUIDs)
112
+ 4. **Test Searches** - Validate semantic matching and filters
113
+ 5. **Clean Up** - Delete test collections when done
259
114
 
260
115
  ## Troubleshooting
261
116
 
262
- ### Collection Already Exists
263
-
264
- ```
265
- Delete collection "name"
266
- Create a collection named "name"
267
- ```
268
-
269
- ### No Search Results
270
-
271
- - Check collection has documents: `Get info about "collection-name"`
272
- - Verify filter syntax matches metadata exactly
273
- - Try search without filters first
274
-
275
- ### Unexpected Results
276
-
277
- - Check document metadata structure
278
- - Validate filter conditions
279
- - Review semantic similarity scores
280
-
281
- ### Error Messages
282
-
283
- - **"Collection not found"**: Create the collection first
284
- - **"Bad Request"**: Check filter JSON syntax
285
- - **"API error"**: Verify your embedding provider API key and credits
117
+ | Issue | Solution |
118
+ | ---------------------- | --------------------------------------------------- |
119
+ | Collection exists | `Delete collection "name"` then recreate |
120
+ | No search results | Check collection has documents, try without filters |
121
+ | Unexpected results | Validate metadata and filter syntax |
122
+ | "Collection not found" | Create collection first |
123
+ | "Bad Request" | Check filter JSON syntax |
124
+ | API errors | Verify provider API key and credits |
286
125
 
287
126
  ## Next Steps
288
127
 
289
- After completing these examples:
290
-
291
- 1. **Read the main [README](../README.md)** - Full tool documentation
292
- 2. **Explore your own data** - Apply concepts to real use cases
293
- 3. **Check out advanced features** - Quantization, hybrid search (future)
294
- 4. **Join the community** - Contribute examples and improvements
295
-
296
- ## Contributing
297
-
298
- Have a great example to share? Please open a PR!
299
-
300
- We're especially interested in:
301
-
302
- - Domain-specific use cases (legal, medical, finance)
303
- - Integration examples (RAG pipelines, chatbots)
304
- - Performance optimization patterns
305
- - Novel metadata structures
128
+ 1. Review [main README](../README.md) for full tool documentation
129
+ 2. Apply patterns to your own use cases
130
+ 3. Explore advanced features and configurations
131
+ 4. Share your examples via [CONTRIBUTING.md](../CONTRIBUTING.md)
306
132
 
307
133
  ## Additional Resources
308
134
 
309
135
  - [Qdrant Documentation](https://qdrant.tech/documentation/)
310
- - [OpenAI Embeddings Guide](https://platform.openai.com/docs/guides/embeddings)
311
- - [Cohere Embeddings Guide](https://docs.cohere.com/docs/embeddings)
312
- - [Voyage AI Documentation](https://docs.voyageai.com/)
313
- - [Ollama Documentation](https://ollama.ai/docs)
136
+ - [OpenAI Embeddings](https://platform.openai.com/docs/guides/embeddings)
137
+ - [Cohere Embeddings](https://docs.cohere.com/docs/embeddings)
138
+ - [Voyage AI](https://docs.voyageai.com/)
139
+ - [Ollama](https://ollama.ai/docs)
314
140
  - [Model Context Protocol](https://modelcontextprotocol.io/)
315
- - [Main Project README](../README.md)
@@ -1,94 +1,39 @@
1
- # Basic Usage Example
1
+ # Basic Usage
2
2
 
3
- This example demonstrates the fundamental operations of the Qdrant MCP Server.
3
+ Learn fundamental operations: create collections, add documents, search, and manage resources.
4
4
 
5
- ## What You'll Learn
5
+ **Time:** 5-10 minutes | **Difficulty:** Beginner
6
6
 
7
- - Creating a collection
8
- - Adding documents with metadata
9
- - Performing semantic search
10
- - Cleaning up resources
11
-
12
- ## Prerequisites
13
-
14
- - Qdrant and Ollama running via Docker Compose
15
- - Ollama model pulled (nomic-embed-text)
16
- - Qdrant MCP Server configured
17
- - Claude Code or another MCP client
18
-
19
- **Optional**: Configure OpenAI, Cohere, or Voyage AI if not using Ollama (default)
20
-
21
- ## Example Workflow
22
-
23
- ### 1. Create a Collection
7
+ ## Workflow
24
8
 
25
9
  ```
10
+ # 1. Create collection
26
11
  Create a collection named "basic-example"
27
- ```
28
-
29
- This creates a new vector collection with default settings (Cosine distance, 768 dimensions for Ollama's nomic-embed-text model).
30
12
 
31
- ### 2. Add Documents
32
-
33
- ```
13
+ # 2. Add documents (auto-embedded with Ollama)
34
14
  Add these documents to basic-example:
35
15
  - id: 1, text: "The quick brown fox jumps over the lazy dog"
36
16
  - id: 2, text: "Machine learning is a subset of artificial intelligence"
37
17
  - id: 3, text: "Python is a popular programming language"
38
- ```
39
-
40
- Documents are automatically embedded using Ollama (or your configured alternative provider).
41
-
42
- ### 3. Search for Similar Documents
43
18
 
44
- ```
19
+ # 3. Search
45
20
  Search basic-example for "AI and computer programs"
46
- ```
21
+ # Expected: Doc 2 ranks highest (ML/AI), Doc 3 lower (programming)
47
22
 
48
- Expected results:
49
-
50
- - Document 2 (ML/AI) should rank highest
51
- - Document 3 (Python/programming) may appear with lower score
52
-
53
- ### 4. Get Collection Information
54
-
55
- ```
23
+ # 4. Get info
56
24
  Get info about "basic-example" collection
57
- ```
58
-
59
- Returns:
60
-
61
- - Vector dimensions
62
- - Number of documents
63
- - Distance metric used
64
25
 
65
- ### 5. View All Collections
66
-
67
- ```
26
+ # 5. List all
68
27
  List all collections
69
- ```
70
-
71
- Shows all available collections in your Qdrant instance.
72
28
 
73
- ### 6. Delete Documents (Optional)
74
-
75
- ```
29
+ # 6. Delete documents (optional)
76
30
  Delete documents [1, 3] from basic-example
77
- ```
78
-
79
- Removes specific documents by ID.
80
31
 
81
- ### 7. Clean Up
82
-
83
- ```
32
+ # 7. Clean up
84
33
  Delete collection "basic-example"
85
34
  ```
86
35
 
87
- Removes the collection and all its data.
88
-
89
- ## Try It Yourself
90
-
91
- Copy these commands into Claude Code:
36
+ ## Try It
92
37
 
93
38
  ```
94
39
  Create a collection named "my-first-collection"
@@ -100,12 +45,14 @@ Add these documents to my-first-collection:
100
45
 
101
46
  Search my-first-collection for "healthy drinks"
102
47
 
103
- Get info about "my-first-collection" collection
104
-
105
48
  Delete collection "my-first-collection"
106
49
  ```
107
50
 
108
51
  ## Next Steps
109
52
 
110
- - [Knowledge Base Example](../knowledge-base/) - Learn about metadata and organization
111
- - [Advanced Filtering](../filters/) - Discover powerful search filtering
53
+ Continue learning with these examples:
54
+
55
+ - **[Hybrid Search](../hybrid-search/)** - Combine semantic and keyword search
56
+ - **[Knowledge Base](../knowledge-base/)** - Metadata and content organization
57
+ - **[Advanced Filtering](../filters/)** - Complex search queries
58
+ - **[Rate Limiting](../rate-limiting/)** - Batch processing patterns