An unofficial evolution of mcp-server-qdrant - Client and server for semantic storage and search
Project description
Synapstor 📚🔍
Python 3.10+ | MIT License
🌎 Idioma / Language
Português 🇧🇷
Synapstor é uma biblioteca modular para armazenamento e recuperação semântica de informações usando embeddings vetoriais e banco de dados Qdrant.
Nota: O Synapstor é uma evolução não oficial do projeto mcp-server-qdrant, expandindo suas funcionalidades para criar uma solução mais abrangente para armazenamento e recuperação semântica.
🔭 Visão Geral
Synapstor é uma solução completa para armazenamento e recuperação de informações baseada em embeddings vetoriais. Combinando a potência do Qdrant (banco de dados vetorial) com modelos modernos de embeddings, o Synapstor permite:
- 🔍 Busca semântica em documentos, código e outros conteúdos textuais
- 🧠 Armazenamento eficiente de informações com metadados associados
- 🔄 Integração com LLMs através do Protocolo MCP (Model Control Protocol)
- 🛠️ Ferramentas CLI para indexação e consulta de dados
🖥️ Requisitos
- Python: 3.10 ou superior
- Qdrant: Banco de dados vetorial para armazenamento e busca de embeddings
- Modelos de Embedding: Por padrão, usa modelos da biblioteca FastEmbed
📦 Instalação
# Instalação básica via pip
pip install synapstor
# Com suporte a embeddings rápidos (recomendado)
pip install "synapstor[fastembed]"
# Para desenvolvimento (formatadores, linters)
pip install "synapstor[dev]"
# Para testes
pip install "synapstor[test]"
# Instalação completa (todos os recursos e ferramentas)
pip install "synapstor[all]"
🚀 Uso Rápido
Configuração
Existem várias formas de configurar o Synapstor:
-
Variáveis de ambiente:
# Exportar as variáveis no shell (Linux/macOS) export QDRANT_URL="http://localhost:6333" export QDRANT_API_KEY="sua-chave-api" export COLLECTION_NAME="synapstor" export EMBEDDING_MODEL="sentence-transformers/all-MiniLM-L6-v2" # Ou no Windows (PowerShell) $env:QDRANT_URL = "http://localhost:6333" $env:QDRANT_API_KEY = "sua-chave-api" $env:COLLECTION_NAME = "synapstor" $env:EMBEDDING_MODEL = "sentence-transformers/all-MiniLM-L6-v2"
-
Parâmetros na linha de comando:
synapstor-ctl start --qdrant-url http://localhost:6333 --qdrant-api-key sua-chave-api --collection-name synapstor --embedding-model "sentence-transformers/all-MiniLM-L6-v2"
-
Programaticamente (para uso como biblioteca):
from synapstor.settings import Settings settings = Settings( qdrant_url="http://localhost:6333", qdrant_api_key="sua-chave-api", collection_name="minha_colecao", embedding_model="sentence-transformers/all-MiniLM-L6-v2" )
Como servidor MCP
# Iniciar o servidor MCP com a interface centralizada
synapstor-ctl start
# Com parâmetros de configuração
synapstor-ctl start --qdrant-url http://localhost:6333 --qdrant-api-key sua-chave-api --collection-name minha_colecao --embedding-model "sentence-transformers/all-MiniLM-L6-v2"
Indexação de projetos
# Indexar um projeto
synapstor-ctl indexer --project meu-projeto --path /caminho/do/projeto
Como biblioteca em aplicações Python
from synapstor.qdrant import QdrantConnector, Entry
from synapstor.embeddings.factory import create_embedding_provider
from synapstor.settings import EmbeddingProviderSettings
# Inicializar componentes
settings = EmbeddingProviderSettings()
embedding_provider = create_embedding_provider(settings)
connector = QdrantConnector(
qdrant_url="http://localhost:6333",
collection_name="minha_colecao",
embedding_provider=embedding_provider
)
# Armazenar informações
async def store_data():
entry = Entry(
content="Conteúdo a ser armazenado",
metadata={"chave": "valor"}
)
await connector.store(entry)
# Buscar informações
async def search_data():
results = await connector.search("consulta em linguagem natural")
for result in results:
print(result.content)
📚 Documentação Completa
Para documentação detalhada, exemplos avançados, integração com diferentes LLMs, deployment com Docker, e outras informações, visite o repositório no GitHub.
English 🇺🇸
Synapstor is a modular library for semantic storage and retrieval of information using vector embeddings and the Qdrant database.
Note: Synapstor is an unofficial evolution of the mcp-server-qdrant project, expanding its functionality to create a more comprehensive solution for semantic storage and retrieval.
🔭 Overview
Synapstor is a complete solution for storing and retrieving information based on vector embeddings. Combining the power of Qdrant (vector database) with modern embedding models, Synapstor allows:
- 🔍 Semantic search in documents, code, and other textual content
- 🧠 Efficient storage of information with associated metadata
- 🔄 Integration with LLMs through the MCP (Model Control Protocol)
- 🛠️ CLI tools for indexing and querying data
🖥️ Requirements
- Python: 3.10 or higher
- Qdrant: Vector database for storing and searching embeddings
- Embedding Models: By default, uses models from the FastEmbed library
📦 Installation
# Basic installation via pip
pip install synapstor
# With fast embedding support (recommended)
pip install "synapstor[fastembed]"
# For development (formatters, linters)
pip install "synapstor[dev]"
# For testing
pip install "synapstor[test]"
# Complete installation (all features and tools)
pip install "synapstor[all]"
🚀 Quick Usage
Configuration
There are several ways to configure Synapstor:
-
Environment variables:
# Export variables in shell (Linux/macOS) export QDRANT_URL="http://localhost:6333" export QDRANT_API_KEY="your-api-key" export COLLECTION_NAME="synapstor" export EMBEDDING_MODEL="sentence-transformers/all-MiniLM-L6-v2" # Or on Windows (PowerShell) $env:QDRANT_URL = "http://localhost:6333" $env:QDRANT_API_KEY = "your-api-key" $env:COLLECTION_NAME = "synapstor" $env:EMBEDDING_MODEL = "sentence-transformers/all-MiniLM-L6-v2"
-
Command line parameters:
synapstor-ctl start --qdrant-url http://localhost:6333 --qdrant-api-key your-api-key --collection-name synapstor --embedding-model "sentence-transformers/all-MiniLM-L6-v2"
-
Programmatically (for use as a library):
from synapstor.settings import Settings settings = Settings( qdrant_url="http://localhost:6333", qdrant_api_key="your-api-key", collection_name="my_collection", embedding_model="sentence-transformers/all-MiniLM-L6-v2" )
As an MCP server
# Start the MCP server with the centralized interface
synapstor-ctl start
# With configuration parameters
synapstor-ctl start --qdrant-url http://localhost:6333 --qdrant-api-key your-api-key --collection-name my_collection --embedding-model "sentence-transformers/all-MiniLM-L6-v2"
Project indexing
# Index a project
synapstor-ctl indexer --project my-project --path /path/to/project
As a library in Python applications
from synapstor.qdrant import QdrantConnector, Entry
from synapstor.embeddings.factory import create_embedding_provider
from synapstor.settings import EmbeddingProviderSettings
# Initialize components
settings = EmbeddingProviderSettings()
embedding_provider = create_embedding_provider(settings)
connector = QdrantConnector(
qdrant_url="http://localhost:6333",
collection_name="my_collection",
embedding_provider=embedding_provider
)
# Store information
async def store_data():
entry = Entry(
content="Content to be stored",
metadata={"key": "value"}
)
await connector.store(entry)
# Search for information
async def search_data():
results = await connector.search("natural language query")
for result in results:
print(result.content)
📚 Complete Documentation
For detailed documentation, advanced examples, integration with different LLMs, Docker deployment, and other information, visit the GitHub repository.
Developed with ❤️ by the Synapstor team
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synapstor-1.0.0.tar.gz.
File metadata
- Download URL: synapstor-1.0.0.tar.gz
- Upload date:
- Size: 42.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
846b7d27c826a18a42f3cce376f564f67a5ae92a25eb469fb02eca11d9b1172a
|
|
| MD5 |
370fdd1680d0ce346c1e4c327684710d
|
|
| BLAKE2b-256 |
b6ff9f489461a76d63a11ed37b010c7200b239958aa41188743983cc49d6ad41
|
File details
Details for the file synapstor-1.0.0-py3-none-any.whl.
File metadata
- Download URL: synapstor-1.0.0-py3-none-any.whl
- Upload date:
- Size: 32.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7ef355e4236ce0f86daa5894b1775c6e292d30472cbb470367e03623063571a
|
|
| MD5 |
dcf705cda8de227a9521618beb154477
|
|
| BLAKE2b-256 |
d23c2fdb75fc0b81920e0423b47d357b81ae6d6ff6eb5ffd2726c64ef0c862af
|