semantic-product-search-mcp
Exposes product catalog and semantic search as tools for an LLM agent, enabling natural language product recommendations based on intent rather than keyword matching.
README
Semantic Product Search
Buscador semántico de productos: en vez de matchear keywords, entiende la intención de la query (embeddings + similarity search) y usa un agente para generar una recomendación sobre el catálogo. El catálogo se expone como servidor MCP y es consumido por un agente separado.
🚧 Proyecto en desarrollo activo. Actualmente en Fase 1 · Setup backend. Las secciones de arquitectura, demo y decisiones de diseño se completarán más adelante, cuando exista un flujo end-to-end funcional.
Stack
- API: FastAPI
- Agente / orquestación: LangChain + LangChain Anthropic (Claude)
- Modelos locales: Ollama
- Observabilidad: LangSmith
- Config / validación: Pydantic + Pydantic Settings
- Base de datos: Postgres + pgvector (en desarrollo local: SQLite)
- Gestor de paquetes: uv
Estructura del proyecto
app/
main.py # entrypoint de la API
api/routes.py # rutas HTTP
catalog/ # ingesta + modelos de datos del catálogo
search/ # embeddings + similarity search
reviews/
mcp_server/ # servidor MCP (expone el catálogo/búsqueda como tools)
agent/ # agente que consume el MCP y arma la recomendación
core/
config.py # settings (variables de entorno)
db.py # conexión a Postgres/pgvector
models/
schemas.py # modelos Pydantic compartidos
tests/
Setup local
Requisitos: Python >= 3.12 y uv instalado.
# Instalar dependencias
uv sync
# Configurar variables de entorno
cp .env.example .env
# completar ANTHROPIC_API_KEY y LANGSMITH_API_KEY en .env
# Correr el entrypoint
uv run python -m app.main
Variables de entorno
| Variable | Default | Descripción |
|---|---|---|
ENVIRONMENT |
development |
Entorno de ejecución |
LANGSMITH_TRACING |
false |
Activa tracing de LangChain en LangSmith |
LANGSMITH_ENDPOINT |
https://api.smith.langchain.com |
Endpoint de LangSmith |
LANGSMITH_API_KEY |
(requerida) | API key de LangSmith |
LANGSMITH_PROJECT |
SemanticProductSearch |
Proyecto en LangSmith |
ANTHROPIC_API_KEY |
(requerida) | API key de Anthropic (Claude) |
DATABASE_URL |
sqlite:///./semantic_product_search.db |
Connection string de la base de datos |
EMBEDDING_MODEL |
all-MiniLM-L6-v2 |
Modelo de embeddings |
MODEL_NAME |
sentence-transformers/all-MiniLM-L6-v2 |
Modelo usado para similarity search |
TOP_K |
5 |
Cantidad de resultados a devolver por búsqueda |
⚠️ Nunca loguees los valores de las API keys ni de ningún secreto (
ANTHROPIC_API_KEY,LANGSMITH_API_KEY, etc.). Si necesitas debuggearSettings, imprime únicamente los nombres de los campos que fallaron, no sus valores — así lo haceapp/core/config.pyal validar al arranque.
Roadmap
El desarrollo está organizado en fases (ver tablero de Notion):
- Setup backend
- Catálogo + embeddings
- Búsqueda semántica
- Reviews + comentarios
- Servidor MCP
- Agente + recomendación
- REST API + streaming
- Optimización
- Frontend + publicación
Arquitectura y decisiones de diseño
Pendiente — se documenta en la Fase 9 (PROD-32), una vez el proyecto tenga
un flujo end-to-end para poder describir el diagrama, la demo y las
decisiones (caché, retrieval + re-ranking, etc.) con contexto real.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.