MCP Product Search Server
Сервер поиска продуктов MCP
Сервер поиска продуктов на базе Model Context Protocol (MCP), позволяющий Claude искать в каталоге продуктов по ключевым словам и возвращать структурированные данные.
Функции
Предоставляет три инструмента для вызова Claude:
Инструмент | Описание |
| Поиск продуктов по ключевым словам, поддержка фильтрации по категории, цене и рейтингу |
| Список всех категорий продуктов и их количество |
| Запрос полной информации об одном продукте по ID |
Related MCP server: MCP Merchant Scout
Быстрый старт
1. Клонирование проекта
git clone <your-repo-url>
cd mcp-product-search2. Создание виртуального окружения и установка зависимостей
macOS / Linux:
python3 -m venv .venv
source .venv/bin/activate
pip install "mcp[cli]"Windows:
python -m venv .venv
.venv\Scripts\activate
pip install "mcp[cli]"Требуется Python 3.10 или выше. Можно проверить с помощью
python3 --version.
3. Тестирование в браузере
mcp dev server.pyБраузер автоматически откроет MCP Inspector. Если он не открылся автоматически, перейдите по адресу, указанному в терминале (обычно http://localhost:6274).
Шаги подключения:
Измените Command слева на абсолютный путь к Python в виртуальном окружении:
macOS/Linux:
/абсолютный_путь/mcp-product-search/.venv/bin/pythonWindows:
C:\абсолютный_путь\mcp-product-search\.venv\Scripts\python.exe
В поле Arguments введите
server.pyНажмите Connect, если в левом нижнем углу отображается Connected, значит, подключение успешно
Перейдите на вкладку Tools вверху, выберите инструмент, заполните параметры и нажмите Run Tool

4. Подключение к Claude Desktop
Найдите файл конфигурации:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Добавьте следующее содержимое (замените на фактические абсолютные пути):
{
"mcpServers": {
"product-search": {
"command": "/绝对路径/mcp-product-search/.venv/bin/python",
"args": ["/绝对路径/mcp-product-search/server.py"]
}
}
}Просмотр абсолютного пути к текущей директории:
# macOS / Linux
pwd
# Windows
cdПосле сохранения файла конфигурации полностью закройте и перезапустите Claude Desktop.
5. Подключение к Claude Code (командная строка)
claude mcp add product-search \
/绝对路径/mcp-product-search/.venv/bin/python \
/绝对路径/mcp-product-search/server.pyПримеры использования
После подключения к Claude можно задавать вопросы следующим образом:
帮我搜索苹果品牌的笔记本电脑
找一款评分 4.8 以上、价格不超过 300 美元的耳机
列出所有产品分类
查询产品 P003 的详细信息Claude автоматически определит, какой инструмент вызвать, и предоставит ответ на основе возвращенных структурированных данных.
Описание параметров инструментов
search
Параметр | Тип | Обязательно | По умолчанию | Описание |
| string | Да | — | Поиск по названию продукта, описанию, бренду, категории и тегам |
| string | Нет | — | Фильтрация по категории, например |
| float | Нет | — | Максимальная цена (USD) |
| float | Нет | — | Минимальный рейтинг (0–5) |
| int | Нет |
| Максимальное количество результатов (до 50) |
Результаты сортируются по рейтингу (от высокого к низкому) и цене (от низкой к высокой).
Пример ответа:
{
"keyword": "apple",
"filters": { "category": "Laptops", "max_price": null, "min_rating": null },
"total_results": 1,
"products": [
{
"id": "P001",
"name": "Apple MacBook Pro 14-inch M3",
"category": "Laptops",
"brand": "Apple",
"price": 1999.0,
"currency": "USD",
"stock": 42,
"rating": 4.8,
"description": "14-inch Liquid Retina XDR display, M3 chip, 18GB RAM, 512GB SSD.",
"tags": ["laptop", "apple", "macbook", "m3", "professional", "portable"]
}
]
}list_categories
Без параметров. Возвращает названия всех категорий и соответствующее количество продуктов.
get_product
Параметр | Тип | Обязательно | Описание |
| string | Да | ID продукта, например |
Структура проекта
mcp-product-search/
├── server.py # MCP 服务器,定义工具
├── products.py # 产品目录与搜索逻辑
├── pyproject.toml # 项目依赖
└── README.mdРасширение данных о продуктах
Текущий каталог продуктов состоит из 12 примеров данных, записанных в products.py. Чтобы заменить их на реальные данные, достаточно изменить функцию search_products(), файл server.py менять не нужно.
Источник данных | Способ изменения |
Локальный JSON/CSV | Чтение файла при запуске для заполнения |
SQLite / PostgreSQL | Замена логики перебора на SQL-запрос |
API интернет-магазина | Выполнение HTTP-запроса внутри функции |
Elasticsearch | Вызов интерфейса полнотекстового поиска ES |
Available Tools
3 toolsget_productA
Retrieve full details for a single product by its ID (e.g. "P001").
Args: product_id: The product's unique identifier.
| Name | Required | Description | Default |
|---|---|---|---|
| product_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist; description implies read-only but fails to disclose any behavioral details beyond 'retrieve'.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, front-loading the core purpose and listing the parameter clearly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple single-parameter input and presence of an output schema, the description is sufficiently complete for the task.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaning to the product_id parameter with an example and context, compensating for 0% schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it retrieves full details for a single product by ID, distinguishing it from siblings like list_categories and search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus siblings like search or list_categories is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_categoriesA
Return all available product categories and their item counts.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description only states the basic return value, omitting additional behavioral details such as ordering, limits, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, clear sentence with no unnecessary words, perfectly front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read operation with no parameters and an output schema present, the description sufficiently covers what the tool returns.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Since there are no parameters, the description does not need to add parameter information. Baseline 4 for 0 parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the verb 'Return' and resource 'all available product categories and their item counts', distinguishing it from sibling tools like 'get_product' and 'search'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'search' or 'get_product', leaving the agent to infer context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
searchA
Search products by keyword with optional filters.
Args: keyword: Search term matched against name, description, brand, category, and tags. category: Filter by exact category name (e.g. "Laptops", "Headphones"). max_price: Upper price limit in USD. min_rating: Minimum rating (0–5). limit: Maximum number of results to return (default 10, max 50).
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | ||
| category | No | ||
| max_price | No | ||
| min_rating | No | ||
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses that keyword matches multiple fields (name, description, brand, category, tags) and explains filters, but does not mention that the operation is read-only, result ordering, or error behavior. Adequate but missing some context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, with a clear introductory sentence followed by structured 'Args' bullet points. It front-loads the purpose and efficiently details parameters without unnecessary text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 parameters and existence of an output schema, the description covers input well but omits output format details. It could mention response structure or behavior like empty results. Acceptable but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so description must compensate. It fully explains each parameter beyond the schema: keyword matches specific fields, category is exact name, max_price is in USD, min_rating is 0-5, limit has default and max. This adds significant meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Search products by keyword with optional filters.' It specifies the verb 'search' and the resource 'products', distinguishing it from sibling tools 'get_product' (retrieves a single product) and 'list_categories' (lists categories).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for searching products but does not explicitly contrast with siblings or provide when-not-to-use guidance. The context is clear from names, but the description lacks explicit exclusions or alternative recommendations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.0- First observed
get_product - First observed
list_categories - First observed
search
TDQS
Scored across 3 tools
Each tool has a distinct purpose: get_product retrieves by ID, list_categories returns category overview, search does keyword-based filtering. No ambiguity in their roles.
All tool names follow a consistent verb_noun pattern (get_product, list_categories, search) using snake_case, making them predictable.
With 3 tools, the server is well-scoped for a search-focused service. Each tool earns its place without bloat or deficiency.
The tool set covers core search and retrieval operations (get by ID, list categories, keyword search). Missing a general 'list all products' operation, but search likely covers this with an empty keyword, though not documented; minor gap.
Maintenance
Related MCP Connectors
AMZScout Skill + MCP gives AI agents live access to real Amazon marketplace data across 14 Amazon marketplaces. Analyze any ASIN, validate product ideas, research niches, compare competitors, discover profitable keywords, and build data-driven PPC strategies using trusted Amazon insights instead of AI assumptions. Works with Claude, ChatGPT, Cursor, and any other MCP-compatible AI client. To connect, you'll need an AMZScout API plan and authorize your account. Get access and view pricing here: https://learn.amzscout.net/amazon-product-api-for-ai-agents
Search multi-merchant supply, checkout, and track orders via MCP.
Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.
Connect Amazon Seller Central to Claude or ChatGPT via MCP. Orders, inventory, pricing, fees, FBA.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables users to search for products, retrieve details, and manage their shopping cart on Amazon through the MCP framework. It also supports viewing order history and provides a demonstration of ordering capabilities within AI interfaces.21 npm54MIT
- AlicenseAqualityDmaintenanceAn MCP server that wraps the Universal Commerce Protocol (UCP) Discovery and Catalog capabilities, letting you search and compare products across UCP merchants directly from Claude.4MIT
- FlicenseNot gradedqualityDmaintenanceEnables product comparison and analysis for any MCP-compatible AI assistant, with tools like compare_products and list_products.-
- FlicenseNot gradedqualityDmaintenanceEnables e-commerce shopping assistant capabilities including product search, cart management, payment processing, and order fulfillment via MCP tools.-