Sneaker Catalog MCP Server
Provides tools for searching a sneaker catalog (hybrid keyword and semantic search), retrieving product details, and checking inventory stock.
README
Sneaker Catalog — Data Layer, MCP Server & Agent
A small e-commerce catalog for sneakers, built in three layers:
- Data layer — Postgres + pgvector, with keyword and semantic search over products.
- MCP server — exposes the catalog as tools (
search,get_product_details,get_stock) over the Model Context Protocol. - Agent — a CLI chat agent that connects to the MCP server and answers questions about the catalog purely by calling those tools.
Architecture
┌─────────────┐ MCP (stdio) ┌──────────────┐ ┌────────────────┐
│ agent/cli │ ──────────────▶ │ mcp_server │ ─────▶ │ Postgres + │
│ (OpenAI llm) │ ◀────────────── │ (tool calls) │ ◀───── │ pgvector │
└─────────────┘ └──────────────┘ └────────────────┘
db/— plain Python functions (search_products,get_product,check_stock,filter_products) that query Postgres directly.mcp_server/— wraps those functions as MCP tools using the official Python MCP SDK.agent/— a REPL that spawns the MCP server as a subprocess, converts its tool schemas to OpenAI's function-calling format, and runs the request → tool-call → result loop until the model has a final answer.
Search is hybrid: full-text keyword ranking (Postgres tsvector) blended with semantic similarity (OpenAI embeddings + pgvector cosine distance).
Prerequisites
- Docker (recommended path), or Python 3.14 + a local Postgres with the
vectorextension - An OpenAI API key with access to an embeddings model (
text-embedding-3-small) and a chat model (e.g.gpt-5-mini)
Quickstart (Docker)
make setup # cp .env.example .env — then edit it: POSTGRES_* / OPENAI_API_KEY
make up # starts Postgres, seeds the catalog
make logs # confirm "Seed complete." (Ctrl+C to stop tailing)
make agent # chat with the catalog
agent(andmcp-server) depend onseed, somake agentre-runs the seed step first on every invocation. Seeding checks whether the catalog is already populated and skips instantly if so, so this is fast and harmless.
Type a question at the > prompt. Type exit (or Ctrl+D) to quit.
Other services
make mcp-server # run the MCP server standalone, e.g. to attach MCP Inspector
make inspector # run MCP Inspector against the containerized server
The MCP server uses stdio transport, so it only runs attached to a terminal — it's excluded from make up's default services (behind the tools compose profile) to avoid a crash loop when started detached.
Run make help to see all available commands, or make down to stop everything.
Quickstart (local, no Docker)
make venv # create venv + install requirements
make db-up # just the Postgres container
make seed-local # seed the catalog once
make agent-local # chat with the agent
To test the MCP server directly with Inspector:
source venv/bin/activate
npx @modelcontextprotocol/inspector python -m mcp_server.server
Project layout
db/
schema.sql products, variants, inventory, prices + pgvector/tsvector indexes
seed.py idempotent catalog seeding (embeds descriptions via OpenAI)
search.py hybrid keyword + semantic search
product.py get_product() — product + all variants
stock.py check_stock() — inventory by SKU
filters.py SQL filtering by category / price
mcp_server/
server.py MCP tool definitions (search, get_product_details, get_stock)
agent/
cli.py interactive chat agent (OpenAI function-calling + MCP client)
docker-compose.yml db, seed, mcp-server, agent services
Dockerfile shared image for seed / mcp-server / agent
Makefile `make help` for all available commands
agent-start.sh local (non-Docker) launcher for the agent
Environment variables
| Variable | Used by | Notes |
|---|---|---|
POSTGRES_USER / POSTGRES_PASSWORD / POSTGRES_DB |
db, all Python services | |
POSTGRES_HOST / POSTGRES_PORT |
db connections | defaults to localhost:5432; Docker services override POSTGRES_HOST=db |
OPENAI_API_KEY |
seeding (embeddings), search (query embeddings), agent (chat) |
See .env.example for a template.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。