Skip to main content
Glama
Product Data Tools MCP Server

Product Data Tools MCP Server

by ABAKHAR721

first install dependencies using uv package

uv add requirements.txt 

you can use

python -m pip install requirements.txt

Basic MCP Project Setup

This repository contains the basic setup steps for a project utilizing uv for dependency management and environment setup, and configuring tools to be used within an MCP (Multi-tool Control Panel) environment, potentially like Claude Desktop.

Prerequisites

  • Python 3.7+ (recommended)

  • Network access to download uv and project dependencies.

Related MCP server: crawl4ai-mcp

Installation

This section guides you through setting up the uv tool and initializing your project environment.

1. Install uv

uv is used for managing Python environments and dependencies efficiently. Choose the command corresponding to your operating system.

Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

macOS / Linux (Bash):

curl -LsSf https://astral.sh/uv/install.sh | sh

After running the installation command, it's crucial to restart your terminal or command prompt to ensure the uv command is recognized in your PATH.

2. Project Setup

Now, let's create the project directory, set up the virtual environment, install necessary dependencies, and create the main server file.

macOS / Linux:

# Create a new directory for our project (e.g., 'weather')
uv init weather
# Navigate into the project directory
cd weather

# Create a virtual environment inside the project folder
uv venv
# Activate the virtual environment
source .venv/bin/activate

# Install project dependencies.
# mcp[cli] requires extra dependencies for the command-line interface.
uv add "mcp[cli]" httpx

# Create our server file (where your application code will reside)
touch weather.py

Windows (Command Prompt or PowerShell):

# Create a new directory for our project (e.g., 'weather')
uv init weather
# Navigate into the project directory
cd weather

# Create a virtual environment inside the project folder
uv venv
# Activate the virtual environment
.venv\Scripts\activate

# Install project dependencies.
# mcp[cli] requires extra dependencies for the command-line interface.
uv add mcp[cli] httpx

# Create our server file (where your application code will reside)
new-item weather.py

At this point, you have a project directory (j), a dedicated virtual environment (.venv), installed libraries (mcp[cli], httpx), and an empty file (``) where you can add your application logic.

Configuration (for Claude Desktop MCP)

If you are using this project with Claude Desktop or a similar MCP tool, you will need to configure it to recognize and run your tools. Below is an example of a configuration structure that defines how different tools are launched.

Note: The exact location and format of the MCP configuration file depend on the specific MCP software you are using (e.g., Claude Desktop's settings). The following is the content of a potential configuration section:

{
  "mcpServers": {
    "product_data_tools": {
      "command": "uv",
      "args": [
        "--directory",
        "C:\\Users\\asus4\\OneDrive\\Bureau\\mcp-Project\\project\\mcp-project",
        "run",
        "server.py"
      ]
    },
    "Bright Data": {
      "command": "npx",
      "args": ["@brightdata/mcp"],
      "env": {
        "API_TOKEN": "api_token",
        "WEB_UNLOCKER_ZONE": "unlocker_zone",
        "BROWSER_ZONE":"your BROWSER_ZONE"
      }
    },
    "actors-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/actors-mcp-server",
        "--actors",
        "autofacts/shopify"
      ],
      "env": {
        "APIFY_TOKEN": "api_token"
      }
    }
  }
}
  • product_data_tools: This entry defines a tool that runs your Python server file (server.py, though in our setup we created weather.py - you'll need to adjust the args if you stick to weather.py). It uses uv run to execute the file within the virtual environment managed by uv. Remember to update the --directory path to the actual location of your project directory (weather) on your system.

  • Bright Data: Configures a tool that runs a Bright Data MCP server using npx. Requires specific environment variables for authentication and zone selection.

  • actors-mcp-server: Configures a tool that runs an Apify Actors MCP server using npx. Requires an API token.

After adding or updating the configuration file within your MCP software, save the file, and restart Claude for Desktop (or your specific MCP tool) for the changes to take effect.

Usage

Once the environment is set up and the MCP configuration is applied and the MCP tool is restarted, you should be able to interact with the configured tools (product_data_tools, Bright Data, actors-mcp-server) directly through the interface of your MCP software (e.g., Claude Desktop).

The specific way you "use" each tool depends on its implementation. For product_data_tools, you would typically interact with the API or functionality provided by the server.py file you created.

Visuals / Examples (Placeholder)

An image or screenshot demonstrating how to trigger or interact with the configured tools within the Claude Desktop (or your chosen MCP software) interface would be helpful here.

[Insert URL of relevant image here, or delete this section if no image is provided]

run servers

  uv run server.py
  uv run mcp_data_server.py

This README provides a clear, step-by-step guide for setting up the project and configuring it for use with an MCP tool based on your input. Remember to fill in any placeholders like specific paths or API tokens.

Available Tools

4 tools
get_available_fieldsA

Retrieves the list of available data fields (columns) for filtering and sorting.

Queries the separate Product Data Server.

Args: store_name: Optional. The name of the store to check fields for. If omitted, returns fields available across all stores.

Returns: A dictionary containing a list of available fields (e.g., {'available_fields': [...]}), or a string error message.

Inputs: store_name.

get_overall_top_productsA

Retrieves the top K products across all stores.

Args: k: The number of top products to return. Defaults to 10. Must be a positive integer. sort_by: Optional. The field to sort by (e.g., 'score', 'price'). Defaults to 'score' on the data server. sort_order: Optional. The order of sorting ('asc' or 'desc'). Defaults to 'desc'. fields: Optional. A list of specific fields to include. Defaults to all available fields.

Returns: A list of product dictionaries for the top products, or a string error message.

Inputs: k, sort_by, sort_order, fields.

get_product_details_by_urlA

Retrieves detailed information for specific products using their URLs.

Queries the separate Product Data Server. Note: The data server expects product_ids, but the client library method takes product_urls. Ensure the data server can correctly map these URLs to its internal product_ids if necessary.

Args: product_urls: A list of product URLs for which to retrieve details. Required. fields: Optional. A list of specific fields to include. Defaults to all available fields.

Returns: A list of product dictionaries for the found products, or a string error message.

Inputs: product_urls (required), fields.

query_store_productsA

Retrieves product data from a specific store based on filtering and sorting criteria.

Uses a separate Product Data Server to fetch information.

Args: store_name: The name of the store to search within (e.g., 'aeropress_product_cleaned'). This is required. filter_criteria: Optional. A dictionary specifying filter criteria. Keys are field names (e.g., 'price', 'rating'). Values are either exact match values (e.g., {'rating': 4.5}) or dictionaries for operators (e.g., {'price': {'operator': '<', 'value': 50.0}}). Supported operators by the data server include '==', '!=', '<', '>', '<=', '>='. Consult data server documentation (or the available_fields tool) for available fields and operators. sort_by: Optional. The field name to sort the results by (e.g., 'price', 'rating', 'score'). If not specified, the data server might default to 'score' or its own internal default. sort_order: Optional. The order of sorting ('asc' for ascending, 'desc' for descending). Defaults to 'desc'. limit: Optional. The maximum number of products to return. Defaults to 10. fields: Optional. A list of specific fields to include in the results (e.g., ['product_name', 'price', 'product_url']). If not specified, the data server returns all available fields for the matching products.

Returns: A list of product dictionaries matching the criteria on success. Returns a string error message if the data server cannot be reached, the store is not found, or if there's an error during the query.

Inputs: store_name (required), filter_criteria, sort_by, sort_order, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct operation: listing available fields, getting top products across stores, retrieving details by URL, and querying a specific store with filters. No overlap in purpose.

    Naming Consistency4/5

    All tools use snake_case with descriptive names. Three start with 'get_' and one with 'query_', but the pattern is otherwise consistent. The use of 'query' for store-specific search is appropriate.

    Tool Count5/5

    Four tools are well-suited for a product data retrieval server. They cover the essential read operations without being too few or too many.

    Completeness4/5

    The tool surface covers key read operations: field discovery, top products, details, and filtered queries. Missing write operations (create/update/delete) are acceptable for a read-focused server, but there is no tool to list available stores, which is a minor gap.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers