What Is This?
This project serves as a practical implementation of the Model Context Protocol (MCP). It features a Python-based MCP server that connects to marketfiyati.org.tr, exposing its product search functionality as standardized tools for Large Language Models (LLMs).
Features
- Search Products: Find products using keywords with optional location-based filtering.
- Search by ID: Look up products by their unique ID or barcode.
- Find Similar Products: Discover products similar to a given item using reference ID and keywords.
Available Tools
search_product
Search for products matching given keywords with optional location-based filtering.
search_product_by_identity
Retrieve product information by unique identity (barcode or internal ID).
search_similar_products
Find products similar to a reference item using ID and keywords.
The Model Context Protocol (MCP)
The Model Context Protocol (MCP) is a specification that allows applications to provide context to LLMs in a standardized way. It separates the concern of providing context from the actual LLM interaction, enabling secure and reusable data and functionality.
MCP defines three core primitives that servers can implement:
- Tools: Functions exposed to the LLM to perform actions or computations (e.g., searching for a product).
- Resources: Contextual data managed by the client application that can be loaded into the LLM's context (e.g., a user's configuration file).
- Prompts: Reusable, interactive templates that guide the LLM's interaction with the user.
Project Architecture
The server is built with Python and exposes the marketfiyati.org.tr API functionality through standardized MCP tools. It requires Python 3.12+ and uses uv for project management.
Configuration Example
To use this server in your MCP client, add the following to your mcp.json
:
{
"servers": {
"market-fiyati": {
"command": "uvx",
"args": ["market-fiyati-mcp-server"]
}
}
}