SmartVal MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
SmartVal MCP – AI shopping agent for SmartValGuiden.se
An agentic AI prototype for SmartValGuiden.se, my Swedish electronics comparison site. A locally hosted LLM (via Ollama) answers buying questions such as "Which laptop under 10 000 kr is best for programming?". It does this by calling tools exposed through a Model Context Protocol (MCP) server, which in turn queries a REST API over the product catalogue. All parts are containerised with Docker and can be deployed to Kubernetes.
┌──────────────┐ tool calls ┌──────────────┐ HTTP/JSON ┌──────────────┐
│ AI agent │ ──── MCP ─────▶ │ MCP server │ ────────────▶ │ REST API │
│ Ollama LLM │ ◀── results ─── │ (5 tools) │ ◀──────────── │ FastAPI │
│ (qwen3) │ └──────────────┘ │ BM25 search │
└──────────────┘ │ products.json│
└──────────────┘What it shows
Area | Implementation |
AI agents / agentic workflow |
|
MCP |
|
RAG | Retrieval step uses a BM25 ranker ( |
REST API |
|
Data validation | Pydantic schemas validate every product on load (types, price ≥ 0, rating 0–5, unique ids) |
Containers / cloud-native |
|
Testing / CI | 13 pytest tests (API, retrieval, MCP tools in-process, agent loop with a scripted LLM); GitHub Actions runs the tests, builds the image and smoke-tests the container |
Related MCP server: BopMarket MCP Server
Quick start (local)
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest
# 1. REST API → http://localhost:8000/docs
uvicorn smartval.api:app --reload
# 2. Ask the agent (needs Ollama running: https://ollama.com)
ollama pull qwen3:8b
python -m smartval.agent -v "Vilken laptop under 10 000 kr passar bäst för programmering?"The agent starts the MCP server over stdio automatically. Use --model to choose another Ollama model
with tool-calling support (e.g. qwen2.5-coder:7b).
Use the MCP server from another client (e.g. Claude Desktop, VS Code)
{
"mcpServers": {
"smartval": {
"command": "python",
"args": ["-m", "smartval.mcp_server"],
"env": { "SMARTVAL_API_URL": "http://localhost:8000" }
}
}
}Docker
docker compose up --build # API on :8000, MCP (HTTP) on :8001/mcp, Ollama on :11434
docker compose exec ollama ollama pull qwen3:8b
SMARTVAL_MCP_URL=http://localhost:8001/mcp python -m smartval.agent "Bästa brusreducerande hörlurar?"Kubernetes (minikube)
minikube start
minikube image build -t smartval-mcp:0.1.0 .
kubectl apply -f k8s/
kubectl get pods
kubectl port-forward svc/smartval-api 8000:8000API endpoints
Method | Path | Description |
GET |
| Health check (used by Docker and Kubernetes probes) |
GET |
| All categories |
GET |
| Filtered product list |
GET |
| One product |
GET |
| BM25 free-text search (Swedish/English, accent-insensitive) |
GET |
| Side-by-side spec table, cheapest and highest rated |
Project structure
smartval/
api.py REST API (FastAPI + Pydantic)
retrieval.py BM25 retriever (no external dependencies)
mcp_server.py MCP server exposing the API as tools
agent.py Ollama tool-calling agent (MCP client)
data/products.json Sample catalogue
tests/ pytest suite
k8s/ Kubernetes deployments and servicesNotes
data/products.jsonis sample data with approximate prices, made for this prototype – not live prices from SmartValGuiden.se.Next steps: embedding-based semantic search with Ollama embeddings, connecting to the live SmartValGuiden database, and an evaluation set for answer quality.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI-agent product catalog: search, lookup & purchase routing over verified merchant data.
The E-commerce Marketplace For Every AI Agent. A Governed Catalog Of 600M+ US Products, Plus Four Agent Ready Capabilities Search, Price Comparison, Product-Vs-Product, And Detailed Q&A.
Live data for AI agents. Search the catalog, read the price, call the tool; keys stay server-side.
Merchant product catalogs for AI agents: price, availability, specs, variants, buy links. Read-only.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to manage an in-memory product catalog with tools to add products, search by name or category, and retrieve product details by ID.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search, compare, buy, and sell products across multiple e-commerce platforms through 13 marketplace tools.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables product comparison and analysis for any MCP-compatible AI assistant, with tools like compare_products and list_products.-
- AlicenseNot gradedqualityBmaintenanceProvides AI agents with real-time access to neutral, sourced comparisons across products and services in multiple languages and countries, with tools for searching, fetching detailed comparisons, and listing categories.MIT