pgvector vs Qdrant MCP Server · Scriptiii AI Tools
pgvector vs Qdrant MCP Server
In short
pgvector vs Qdrant MCP Server: both are coding tools on Scriptiii AI Tools. pgvector pricing: Free. Free to use. (reported by the maker) Qdrant MCP Server pricing: Free. Free to use. (reported by the maker) Both have 0 upvotes.
COPY items (embedding) FROM STDIN WITH (FORMAT BINARY);
Upsert vectors
INSERT INTO items (id, embedding) VALUES (1, '[1,2,3]'), (2, '[4,5,6]')
ON CONFLICT (id) DO UPDATE SET embedding = EXCLUDED.embedding;
Update vectors
UPDATE items SET embedding = '[1,2,3]' WHERE id = 1;
Delete vectors
DELETE FROM items WHERE id = 1;
Querying
Get the nearest neighbors to a vector
SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5;
Supported distance functions are:
<-> - L2 distance
<#> - (negative) inner product
<=> - cosine distance
<+> - L1 distance
<~> - Hamming distance (binary vectors)
<%> - Jaccard distance (binary vectors)
Get the nearest neighbors to a row
SELECT * FROM items WHERE id != 1 ORDER BY embedding <-> (SELECT embedding FROM items WHERE id = 1) LIMIT 5;
Get rows within a certain distance
SELECT * FROM items WHERE embedding <-> '[3,1,2]' < 5;
Note: Combine with ORDER BY and LIMIT to use an index
Distances
Get the distance
SELECT embedding <-> '[3,1,2]' AS distance FROM items;
For inner product, multiply by -1 (since <#> returns the negative inner product)
SELECT (embedding <#> '[3,1,2]') * -1 AS inner_product FROM items;
For cosine similarity, use 1 - cosine distance
SELECT 1 - (embedding <=> '[3,1,2]') AS cosine_similarity FROM items;
Aggregates
Average vectors
SELECT AVG(embedding) FROM items;
Average groups of vectors
SELECT category_id, AVG(embedding) FROM items GROUP BY category_id;
Indexing
By default, pgvector performs exact nearest neighbor search, which provides perfect recall.
You can add an index to use approximate nearest neighbor search, which trades some recall for speed. Unlike typical indexes, you will see different results for queries after adding an approximate index.
An HNSW index creates a multilayer graph. It has better query performance than IVFFlat (in terms of speed-recall tradeoff), but has slower build times and uses more memory. Also, an index can be created without any data in the table since there isn’t a training step like IVFFlat.
Add an index for each distance function you want to use.
L2 distance
CREATE INDEX ON items USING hnsw (embedding vector_l2_ops);
Note: Use halfvec_l2_ops for halfvec and sparsevec_l2_ops for sparsevec (and similar with the other distance functions)
Inner product
CREATE INDEX ON items USING hnsw (embedding vector_ip_ops);
Cosine distance
CREATE INDEX ON items USING hnsw (embedding vector_cosine_ops);
L1 distance
CREATE INDEX ON items USING hnsw (embedding vector_l1_ops);
Hamming distance
CREATE INDEX ON items USING hnsw (embedding bit_hamming_ops);
Jaccard distance
CREATE INDEX ON items USING hnsw (embedding bit_jaccard_ops);
Supported types are:
vector - up to 2,000 dimensions
halfvec - up to 4,000 dimensions
bit - up to 64,000 dimensions
sparsevec - up to 1,000 non-zero elements
Index Options
Specify HNSW parameters
m - the max number of connections per layer (16 by default)
ef_construction - the size of the dynamic candidate list for constructing the graph (64 by default)
CREATE INDEX ON items USING hnsw (embedding vector_l2_ops) WITH (m = 16, ef_construction = 64);
A higher value of ef_construction provides better recall at the cost of index build time / insert speed.
Query Options
Specify the size of the dynamic candidate list for search (40 by default)
SET hnsw.ef_search = 100;
A higher value provides better recall at the cost of speed.
Use SET LOCAL inside a transaction to set it for a single query
BEGIN;
SET LOCAL hnsw.ef_search = 100;
SELECT ...
COMMIT;
Index Build Time
Indexes build significantly faster when the graph fits into maintenance_work_mem
SET maintenance_work_mem = '8GB';
A notice is shown when the graph no longer fits
NOTICE: hnsw graph no longer fits into maintenance_work_mem after 100000 tuples
DETAIL: Building will take significantly more time.
HINT: Increase maintenance_work_mem to speed up builds.
Note: Do not set maintenance_work_mem so high that it exhausts the memory on the server
Like other index types, it’s faster to create an index after loading your initial data
You can also speed up index creation by increasing the number of parallel workers (2 by default)
SET max_parallel_maintenance_workers = 7; -- plus leader
For a large number of workers, you may need to increase max_parallel_workers (8 by default)
The index options also have a significant impact on build time (use the defaults unless seeing low recall)
SELECT phase, round(100.0 * blocks_done / nullif(blocks_total, 0), 1) AS "%" FROM pg_stat_progress_create_index;
The phases for HNSW are:
initializing
loading tuples
IVFFlat
An IVFFlat index divides vectors into lists, and then searches a subset of those lists that are closest to the query vector. It has faster build times and uses less memory than HNSW, but has lower query performance (in terms of speed-recall tradeoff).
Three keys to achieving good recall are:
Create the index after the table has some data
Choose an appropriate number of lists - a good place to start is rows / 1000 for up to 1M rows and sqrt(rows) for over 1M rows
When querying, specify an appropriate number of probes (higher is better for recall, lower is better for speed) - a good place to start is sqrt(lists)
Add an index for each distance function you want to use.
L2 distance
CREATE INDEX ON items USING ivfflat (embedding vector_l2_ops) WITH (lists = 100);
Note: Use halfvec_l2_ops for halfvec (and similar with the other distance functions)
Inner product
CREATE INDEX ON items USING ivfflat (embedding vector_ip_ops) WITH (lists = 100);
Cosine distance
CREATE INDEX ON items USING ivfflat (embedding vector_cosine_ops) WITH (lists = 100);
Hamming distance
CREATE INDEX ON items USING ivfflat (embedding bit_hamming_ops) WITH (lists = 100);
Supported types are:
vector - up to 2,000 dimensions
halfvec - up to 4,000 dimensions
bit - up to 64,000 dimensions
Query Options
Specify the number of probes (1 by default)
SET ivfflat.probes = 10;
A higher value provides better recall at the cost of speed, and it can be set to the number of lists for exact nearest neighbor search (at which point the planner won’t use the index)
Use SET LOCAL inside a transaction to set it for a single query
BEGIN;
SET LOCAL ivfflat.probes = 10;
SELECT ...
COMMIT;
Index Build Time
Speed up index creation on large tables by increasing the number of parallel workers (2 by default)
SET max_parallel_maintenance_workers = 7; -- plus leader
For a large number of workers, you may also need to increase max_parallel_workers (8 by default)
SELECT phase, round(100.0 * tuples_done / nullif(tuples_total, 0), 1) AS "%" FROM pg_stat_progress_create_index;
The phases for IVFFlat are:
initializing
performing k-means
assigning tuples
loading tuples
Note: % is only populated during the loading tuples phase
Filtering
There are a few ways to index nearest neighbor queries with a WHERE clause.
SELECT * FROM items WHERE category_id = 123 ORDER BY embedding <-> '[3,1,2]' LIMIT 5;
A good place to start is creating an index on the filter column. This can provide fast, exact nearest neighbor search in many cases. Postgres has a number of index types for this: B-tree (default), hash, GiST, SP-GiST, GIN, and BRIN.
Exact indexes work well for conditions that match a low percentage of rows. Otherwise, approximate indexes can work better.
CREATE INDEX ON items USING hnsw (embedding vector_l2_ops);
With approximate indexes, filtering is applied after the index is scanned. If a condition matches 10% of rows, with HNSW and the default hnsw.ef_search of 40, only 4 rows will match on average. For more rows, enable iterative index scans, which will automatically scan more of the index when needed.
SET hnsw.iterative_scan = strict_order;
If filtering by only a few distinct values, consider partial indexing.
CREATE INDEX ON items USING hnsw (embedding vector_l2_ops) WHERE (category_id = 123);
If filtering by many different values, consider partitioning.
CREATE TABLE items (embedding vector(3), category_id int) PARTITION BY LIST(category_id);
Multitenancy
For applications with multiple tenants, sharing an approximate index between tenants means vectors from one tenant can affect recall (and speed) for other tenants.
CREATE TABLE items (customer_id int, embedding vector(3)) PARTITION BY LIST(customer_id);
Iterative Index Scans
With approximate indexes, queries with filtering can return less results since filtering is applied after the index is scanned. Starting with 0.8.0, you can enable iterative index scans, which will automatically scan more of the index until enough results are found (or it reaches hnsw.max_scan_tuples or ivfflat.max_probes).
Iterative scans can use strict or relaxed ordering.
Strict ensures results are in the exact order by distance
SET hnsw.iterative_scan = strict_order;
Relaxed allows results to be slightly out of order by distance, but provides better recall
SET hnsw.iterative_scan = relaxed_order;
## or
SET ivfflat.iterative_scan = relaxed_order;
With relaxed ordering, you can use a materialized CTE to get strict ordering
WITH relaxed_results AS MATERIALIZED (
SELECT id, embedding <-> '[1,2,3]' AS distance FROM items WHERE category_id = 123 ORDER BY distance LIMIT 5
) SELECT * FROM relaxed_results ORDER BY distance + 0;
Note: + 0 is needed for Postgres 17+
For queries that filter by distance, use a materialized CTE and place the distance filter outside of it for best performance (due to the current behavior of the Postgres executor)
WITH nearest_results AS MATERIALIZED (
SELECT id, embedding <-> '[1,2,3]' AS distance FROM items ORDER BY distance LIMIT 5
) SELECT * FROM nearest_results WHERE distance < 5 ORDER BY distance;
Note: Place any other filters inside the CTE
Iterative Scan Options
Since scanning a large portion of an approximate index is expensive, there are options to control when a scan ends.
HNSW
Specify the max number of tuples to visit (20,000 by default)
SET hnsw.max_scan_tuples = 20000;
Note: This is approximate and does not affect the initial scan
Specify the max amount of memory to use, as a multiple of work_mem (1 by default)
SET hnsw.scan_mem_multiplier = 2;
Note: Try increasing this if increasing hnsw.max_scan_tuples does not improve recall
IVFFlat
Specify the max number of probes
SET ivfflat.max_probes = 100;
Note: If this is lower than ivfflat.probes, ivfflat.probes will be used
Half-Precision Vectors
Use the halfvec type to store half-precision vectors
CREATE TABLE items (id bigserial PRIMARY KEY, embedding halfvec(3));
Half-Precision Indexing
Index vectors at half precision for smaller indexes
CREATE INDEX ON items USING hnsw ((embedding::halfvec(3)) halfvec_l2_ops);
Get the nearest neighbors
SELECT * FROM items ORDER BY embedding::halfvec(3) <-> '[1,2,3]' LIMIT 5;
Binary Vectors
Use the bit type to store binary vectors (example)
CREATE TABLE items (id bigserial PRIMARY KEY, embedding bit(3));
INSERT INTO items (embedding) VALUES ('000'), ('111');
Get the nearest neighbors by Hamming distance
SELECT * FROM items ORDER BY embedding <~> '101' LIMIT 5;
Also supports Jaccard distance (<%>)
Binary Quantization
Use expression indexing for binary quantization
CREATE INDEX ON items USING hnsw ((binary_quantize(embedding)::bit(3)) bit_hamming_ops);
Get the nearest neighbors by Hamming distance
SELECT * FROM items ORDER BY binary_quantize(embedding)::bit(3) <~> binary_quantize('[1,-2,3]') LIMIT 5;
Re-rank by the original vectors for better recall
SELECT * FROM (
SELECT * FROM items ORDER BY binary_quantize(embedding)::bit(3) <~> binary_quantize('[1,-2,3]') LIMIT 20
) ORDER BY embedding <=> '[1,-2,3]' LIMIT 5;
Sparse Vectors
Use the sparsevec type to store sparse vectors
CREATE TABLE items (id bigserial PRIMARY KEY, embedding sparsevec(5));
Insert vectors
INSERT INTO items (embedding) VALUES ('{1:1,3:2,5:3}/5'), ('{1:4,3:5,5:6}/5');
The format is {index1:value1,index2:value2}/dimensions and indices start at 1 like SQL arrays
Get the nearest neighbors by L2 distance
SELECT * FROM items ORDER BY embedding <-> '{1:3,3:1,5:2}/5' LIMIT 5;
CREATE INDEX ON items USING hnsw ((subvector(embedding, 1, 3)::vector(3)) vector_cosine_ops);
Get the nearest neighbors by cosine distance
SELECT * FROM items ORDER BY subvector(embedding, 1, 3)::vector(3) <=> subvector('[1,2,3,4,5]'::vector, 1, 3) LIMIT 5;
Re-rank by the full vectors for better recall
SELECT * FROM (
SELECT * FROM items ORDER BY subvector(embedding, 1, 3)::vector(3) <=> subvector('[1,2,3,4,5]'::vector, 1, 3) LIMIT 20
) ORDER BY embedding <=> '[1,2,3,4,5]' LIMIT 5;
Performance
Tuning
Use a tool like PgTune to set initial values for Postgres server parameters. For instance, shared_buffers should typically be 25% of the server’s memory. You can find the config file with:
SHOW config_file;
And check individual settings with:
SHOW shared_buffers;
Be sure to restart Postgres for changes to take effect.
Storing
Use the halfvec type instead of vector for a smaller working set.
The query needs to have an ORDER BY and LIMIT, and the ORDER BY must be the result of a distance operator (not an expression) in ascending order.
-- index
ORDER BY embedding <=> '[3,1,2]' LIMIT 5;
-- no index
ORDER BY 1 - (embedding <=> '[3,1,2]') DESC LIMIT 5;
You can encourage the planner to use an index for a query with:
BEGIN;
SET LOCAL enable_seqscan = off;
SELECT ...
COMMIT;
Also, if the table is small, a table scan may be faster.
Why isn’t a query using a parallel table scan?
The planner doesn’t consider out-of-line storage in cost estimates, which can make a serial scan look cheaper. You can reduce the cost of a parallel scan for a query with:
BEGIN;
SET LOCAL min_parallel_table_scan_size = 1;
SET LOCAL parallel_setup_cost = 1;
SELECT ...
COMMIT;
or choose to store vectors inline:
ALTER TABLE items ALTER COLUMN embedding SET STORAGE PLAIN;
Why are there less results for a query after adding an HNSW index?
Results are limited by the size of the dynamic candidate list (hnsw.ef_search), which is 40 by default. There may be even less results due to dead tuples or filtering conditions in the query. Enabling iterative index scans can help address this.
Also, note that NULL vectors are not indexed (as well as zero vectors for cosine distance).
Why are there less results for a query after adding an IVFFlat index?
The index was likely created with too little data for the number of lists. Drop the index until the table has more data.
DROP INDEX index_name;
Results can also be limited by the number of probes (ivfflat.probes). Enabling iterative index scans can address this.
Also, note that NULL vectors are not indexed (as well as zero vectors for cosine distance).
Each vector takes 4 * dimensions + 8 bytes of storage. Each element is a single-precision floating-point number (like the real type in Postgres), and all elements must be finite (no NaN, Infinity or -Infinity). Vectors can have up to 16,000 dimensions.
Each half vector takes 2 * dimensions + 8 bytes of storage. Each element is a half-precision floating-point number, and all elements must be finite (no NaN, Infinity or -Infinity). Half vectors can have up to 16,000 dimensions.
Each bit vector takes dimensions / 8 + 8 bytes of storage. See the Postgres docs for more info.
Bit Operators
Operator
Description
Added
<~>
Hamming distance
0.7.0
<%>
Jaccard distance
0.7.0
Bit Functions
Function
Description
Added
hamming_distance(bit, bit) → double precision
Hamming distance
0.7.0
jaccard_distance(bit, bit) → double precision
Jaccard distance
0.7.0
Sparsevec Type
Each sparse vector takes 8 * non-zero elements + 16 bytes of storage. Each element is a single-precision floating-point number, and all elements must be finite (no NaN, Infinity or -Infinity). Sparse vectors can have up to 16,000 non-zero elements.
Note: Replace 18 with your Postgres server version
Missing Header
If compilation fails with fatal error: postgres.h: No such file or directory, make sure Postgres development files are installed on the server.
For Ubuntu and Debian, use:
sudo apt install postgresql-server-dev-18
Note: Replace 18 with your Postgres server version
Missing SDK
If compilation fails and the output includes warning: no such sysroot directory on Mac, your Postgres installation points to a path that no longer exists.
pg_config --cppflags
Reinstall Postgres to fix this.
Portability
By default, pgvector compiles with -march=native on some platforms for best performance. However, this can lead to Illegal instruction errors if trying to run the compiled extension on a different machine.
To compile for portability, use:
make OPTFLAGS=""
Installation Notes - Windows
Missing Header
If compilation fails with Cannot open include file: 'postgres.h': No such file or directory, make sure PGROOT is correct.
Mismatched Architecture
If compilation fails with error C2196: case value '4' already used, make sure you’re using the x64 Native Tools Command Prompt. Then run nmake /F Makefile.win clean and re-run the installation instructions.
Missing Symbol
If linking fails with unresolved external symbol float_to_shortest_decimal_bufn with Postgres 17.0-17.2, upgrade to Postgres 17.3+.
Permissions
If installation fails with Access is denied, re-run the installation instructions as an administrator.
The Model Context Protocol (MCP) is an open protocol that enables
seamless integration between LLM applications and external data sources and tools. Whether you're building an
AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to
connect LLMs with the context they need.
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Overview
An official Model Context Protocol server for keeping and retrieving memories in the Qdrant vector search engine.
It acts as a semantic memory layer on top of the Qdrant database.
Questions
Do pgvector and Qdrant MCP Server list the same price?
Both listings report Free. Free to use. Pricing is reported by the maker and is not independently verified.
Which has more upvotes, pgvector or Qdrant MCP Server?
Both have 0 upvotes.
What does each maker say pgvector and Qdrant MCP Server are for?
pgvector: Postgres extension for vector similarity search. Qdrant MCP Server: Official Qdrant MCP server that stores and retrieves memories in a Qdrant vector database.
collection_name (string): Name of the collection to store the information in. This field is required if there are no default collection name.
If there is a default collection name, this field is not enabled.
Returns: Confirmation message
qdrant-find
Retrieve relevant information from the Qdrant database
Input:
query (string): Query to use for searching
collection_name (string): Name of the collection to store the information in. This field is required if there are no default collection name.
If there is a default collection name, this field is not enabled.
Returns: Information stored in the Qdrant database as separate messages
Environment Variables
Configuration is done via environment variables. The only command-line argument is --transport, used to select the transport protocol.
[!NOTE]
You cannot provide both QDRANT_URL and QDRANT_LOCAL_PATH at the same time.
Name
Description
Default Value
QDRANT_URL
URL of the Qdrant server
None
QDRANT_API_KEY
API key for the Qdrant server
None
COLLECTION_NAME
Name of the default collection to use.
None
QDRANT_LOCAL_PATH
Path to the local Qdrant database (alternative to QDRANT_URL)
None
EMBEDDING_PROVIDER
Embedding provider to use (currently only "fastembed" is supported)
Since mcp-server-qdrant is based on FastMCP, it also supports all the FastMCP environment variables. The most
important ones are listed below:
Environment Variable
Description
Default Value
FASTMCP_LOG_LEVEL
Set logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
INFO
FASTMCP_DEBUG
Enable debug mode
false
FASTMCP_HOST
Host address to bind the server to (SSE and HTTP transports)
127.0.0.1
FASTMCP_PORT
Port to run the server on (SSE and HTTP transports)
8000
FASTMCP_MASK_ERROR_DETAILS
Hide exception details from tool error messages sent to clients
false
[!NOTE]
Before version 0.9.0, these settings used the FASTMCP_SERVER_ prefix, for example FASTMCP_SERVER_HOST.
The old FASTMCP_SERVER_HOST, FASTMCP_SERVER_PORT, and FASTMCP_SERVER_DEBUG names still work but are deprecated
and will be removed in a future release. If both names are set, the new one wins.
Installation
Using uvx
When using uvx no specific installation is needed to directly run mcp-server-qdrant.
stdio (default): Standard input/output transport, might only be used by local MCP clients
sse: Server-Sent Events transport, perfect for remote clients
streamable-http: Streamable HTTP transport, perfect for remote clients, more recent than SSE
The default transport is stdio if not specified.
When SSE transport is used, the server will listen on the specified port and wait for incoming connections. The default
port is 8000, however it can be changed using the FASTMCP_PORT environment variable.
A Dockerfile is available for building and running the MCP server:
## Build the container
docker build -t mcp-server-qdrant .
## Run the container
docker run -p 8000:8000 \
-e FASTMCP_HOST="0.0.0.0" \
-e QDRANT_URL="http://your-qdrant-server:6333" \
-e QDRANT_API_KEY="your-api-key" \
-e COLLECTION_NAME="your-collection" \
mcp-server-qdrant
[!TIP]
Please note that we set FASTMCP_HOST="0.0.0.0" to make the server listen on all network interfaces. This is
necessary when running the server in a Docker container.
Installing via Smithery
To install Qdrant MCP Server for Claude Desktop automatically via Smithery:
npx @smithery/cli install mcp-server-qdrant --client claude
Manual configuration of Claude Desktop
To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your claude_desktop_config.json:
This MCP server will automatically create a collection with the specified name if it doesn't exist.
By default, the server will use the sentence-transformers/all-MiniLM-L6-v2 embedding model to encode memories.
For the time being, only FastEmbed models are supported.
Support for other tools
This MCP server can be used with any MCP-compatible client. For example, you can use it with Cursor and VS Code, which provide built-in support for the Model Context
Protocol.
Using with Cursor/Windsurf
You can configure this MCP server to work as a code search tool for Cursor or Windsurf by customizing the tool
descriptions:
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." \
uvx mcp-server-qdrant --transport sse # Enable SSE transport
In Cursor/Windsurf, you can then configure the MCP server in your settings by pointing to this running server using
SSE transport protocol. The description on how to add an MCP server to Cursor can be found in the Cursor
documentation. If you are
running Cursor/Windsurf locally, you can use the following URL:
http://localhost:8000/sse
[!TIP]
We suggest SSE transport as a preferred way to connect Cursor/Windsurf to the MCP server, as it can support remote
connections. That makes it easy to share the server with your team or use it in a cloud environment.
This configuration transforms the Qdrant MCP server into a specialized code search tool that can:
Store code snippets, documentation, and implementation details
Retrieve relevant code examples based on semantic search
Help developers find specific implementations or usage patterns
You can populate the database by storing natural language descriptions of code snippets (in the information parameter)
along with the actual code (in the metadata.code property), and then search for them using natural language queries
that describe what you're looking for.
[!NOTE]
The tool descriptions provided above are examples and may need to be customized for your specific use case. Consider
adjusting the descriptions to better match your team's workflow and the specific types of code snippets you want to
store and retrieve.
If you have successfully installed the mcp-server-qdrant, but still can't get it to work with Cursor, please
consider creating the Cursor rules so the MCP tools are always used when
the agent produces a new code snippet. You can restrict the rules to only work for certain file types, to avoid using
the MCP server for the documentation or other types of content.
Using with Claude Code
You can enhance Claude Code's capabilities by connecting it to this MCP server, enabling semantic search over your
existing codebase.
Setting up mcp-server-qdrant
Add the MCP server to Claude Code:
# Add mcp-server-qdrant configured for code search
claude mcp add code-search \
-e QDRANT_URL="http://localhost:6333" \
-e COLLECTION_NAME="code-repository" \
-e EMBEDDING_MODEL="sentence-transformers/all-MiniLM-L6-v2" \
-e TOOL_STORE_DESCRIPTION="Store code snippets with descriptions. 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." \
-e TOOL_FIND_DESCRIPTION="Search for relevant code snippets using natural language. The 'query' parameter should describe the functionality you're looking for." \
-- uvx mcp-server-qdrant
Verify the server was added:
claude mcp list
Using Semantic Code Search in Claude Code
Tool descriptions, specified in TOOL_STORE_DESCRIPTION and TOOL_FIND_DESCRIPTION, guide Claude Code on how to use
the MCP server. The ones provided above are examples and may need to be customized for your specific use case. However,
Claude Code should be already able to:
Use the qdrant-store tool to store code snippets with descriptions.
Use the qdrant-find tool to search for relevant code snippets using natural language.
Run MCP server in Development Mode
The MCP server can be run in development mode using the mcp dev command. This will start the server and open the MCP
inspector in your browser.
COLLECTION_NAME=mcp-dev fastmcp dev src/mcp_server_qdrant/server.py
Using with VS Code
For one-click installation, click one of the install buttons below:
Manual Installation
Add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open User Settings (JSON).
If you have suggestions for how mcp-server-qdrant could be improved, or want to report a bug, open an issue!
We'd love all and any contributions.
Testing mcp-server-qdrant locally
The MCP inspector is a developer tool for testing and debugging MCP
servers. It runs both a client UI (default port 5173) and an MCP proxy server (default port 3000). Open the client UI in
your browser to use the inspector.
QDRANT_URL=":memory:" COLLECTION_NAME="test" \
fastmcp dev src/mcp_server_qdrant/server.py
Once started, open your browser to http://localhost:5173 to access the inspector interface.
License
This MCP server is licensed under the Apache License 2.0. This means you are free to use, modify, and distribute the
software, subject to the terms and conditions of the Apache License 2.0. For more details, please see the LICENSE file
in the project repository.