- Home
- MCP servers
- Product
Product
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You run a lightweight MCP server that exposes three practical tools for managing products: add a product, search products, and get a product by its ID. It’s built to be lightweight and easy to integrate with MCP clients for demos, prototyping, or AI agent workflows.
How to use
You interact with the server through an MCP-compatible client. Start by launching the server locally and then connect your client to the HTTP endpoint to call the available tools. Use the three tools to manage an in-memory catalog of products: add new items, search by name or category, and fetch details for a specific product by ID. Each tool corresponds to a distinct operation you can perform from your client.
How to install
Prerequisites: you need Python 3.8+ and a shell environment.
python3 -V
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python main.py
Additional notes
The server runs over HTTP and listens on http://localhost:8000. Use a MCP client to call the following tools: add_product, search_product, and get_product. The storage is in-memory, which makes it ideal for quick demonstrations and live-testing with an MCP-enabled agent.
Available tools
add_product
Adds a new product to the in-memory catalog. You provide details such as name, category, price, stock, and description to create a new entry.
search_product
Searches the catalog by name or category and returns matching products.
get_product
Retrieves the details of a product by its unique ID.