mcp_qrant

mcp_qrant

Provides a unified interface for storing and querying vector databases, currently supporting Qdrant with self-embedding and semantic search.

Category
访问服务器

README

mcp_qrant — Vector-Store MCP Server

A Python/FastAPI MCP server (JSON-RPC 2.0) that exposes a unified interface for storing and querying vector databases. Phase 1 ships Qdrant (self-embedding, local or remote). Nine more providers are listed and will be activated in later phases.

Quick Start

# from the project root
MCPQ_PORT=8008 ./.venv/bin/python server.py

The server listens on http://127.0.0.1:8008 and handles MCP JSON-RPC at both / and /mcp.

Environment variables:

Variable Default Purpose
MCPQ_PORT 8008 Listening port
MCPQ_HOST 127.0.0.1 Bind address
MCPQ_PROVIDERS_DIR ./providers Directory of provider JSON descriptors

Tools (5)

list_providers

Returns all 10 provider descriptors. Each entry includes available (bool), embeds_internally (bool), and connection_schema (field list for the UI form).

list_embeddings

Returns the embedding-model catalog (FastEmbed BGE, HuggingFace MiniLM, OpenAI small/large). Only relevant for providers where embeds_internally: false — those need a model chosen from this list to embed text before upsert/search.

test_connection

Validates a provider connection without writing data.

{"provider": "qdrant", "connection": {"mode": "local", "path": "/tmp/mydb"}}

Returns {"ok": true} or {"ok": false, "message": "..."}.

store

Embeds (if needed) and upserts text chunks into a collection.

{
  "provider": "qdrant",
  "connection": {"mode": "local", "path": "/tmp/mydb"},
  "collection": "my_docs",
  "items": [
    {"text": "solar panels convert sunlight", "metadata": {"src": "wiki"}},
    {"text": "the cat sat on the mat",       "metadata": {"src": "test"}}
  ]
}

Returns {"stored": 2, "errors": 0}.

embedding is optional; Qdrant ignores it (self-embeds). Pass an id from list_embeddings for future non-self-embedding providers.

find

Semantic search over a collection.

{
  "provider": "qdrant",
  "connection": {"mode": "local", "path": "/tmp/mydb"},
  "collection": "my_docs",
  "query": "renewable energy",
  "limit": 3
}

Returns {"results": [{"text": "...", "metadata": {...}, "score": 0.91}, ...]}.

Providers (10)

Name Label Available Embeds internally
qdrant Qdrant yes yes
pgvector PostgreSQL + pgvector coming soon no
chroma Chroma coming soon no
faiss FAISS coming soon no
milvus Milvus coming soon no
mongodb MongoDB Atlas coming soon no
pinecone Pinecone coming soon no
redis Redis coming soon no
weaviate Weaviate coming soon no
elasticsearch Elasticsearch coming soon no

embeds_internally

  • true (Qdrant): the provider does its own embedding via qdrant-client[fastembed]. Pass text in items[].text and query; the embedding field is ignored.
  • false (all others, Phase 2+): the MCP will embed text using the model you select from list_embeddings before upserting or searching. Pass the model id in the embedding field.

Connection Schemas

list_providers returns a connection_schema per provider that drives the UI form. Qdrant's fields:

Field Type Notes
mode select local or remote
path text required when mode=local; path to the on-disk Qdrant storage directory
url text required when mode=remote; e.g. https://xyz.cloud.qdrant.io
api_key password required for Qdrant Cloud; masked in UI

Running Tests

./.venv/bin/python -m pytest tests/ -v

18 tests, all green (Tasks 1–7).

Smoke Test

cd tests && ./smoke.sh

Boots the server on port 8008, fires list_providers (10 entries), store 2 chunks into a temp local Qdrant path, and find with a semantic query — then shuts down and cleans up.

PHP Prototype (Retired)

An earlier PHP prototype (htdocs/vector/) implemented qdrant-store/qdrant-find as a thin stateless translator to Qdrant Cloud REST. That work informed the tool contract but is superseded by this Python server. The PHP files will be retired at the remote-Qdrant cutover when this MCP handles both local and remote modes end-to-end.

Architecture

server.py          FastAPI app + JSON-RPC router (_wrap envelope)
handlers.py        Handlers class — delegates to registry
stores/
  base.py          VectorStoreProvider protocol
  registry.py      build_registry + providers_payload
  qdrant.py        QdrantProvider (connect/test_connection/store/find)
providers/         10 JSON descriptor files (available, embeds_internally, connection_schema)
embedding.py       Embedding catalog (used by future non-self-embedding providers)
config.py          AppConfig (env-var driven)
tests/
  smoke.sh         Live boot + curl smoke (store/find against real local Qdrant)
  test_*.py        18 unit tests

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选