Product MCP Server
Enables AI agents to manage an in-memory product catalog with tools to add products, search by name or category, and retrieve product details by ID.
README
Product MCP Server
This project implements a simple Model Context Protocol (MCP) server using FastMCP, Pydantic, and Uvicorn.
It exposes three tools:
- Add Product
- Search Product
- Get Product by ID
Products are stored in an in-memory database, making this ideal for demos, prototyping, or integrating with an MCP-compatible AI agent.
Features
- FastMCP-based MCP server
- Tool functions to:
- Add a new product
- Search products by name or category
- Retrieve product details by ID
- Simple in-memory storage
- Runs over HTTP using Uvicorn
Installation
1. Create a virtual environment
python3 -m venv venv
source venv/bin/activate
2. Install dependencies
pip install -r requirements.txt
Running the Server
Start the MCP server:
python main.py
The server will start on:
http://localhost:8000
Available Tools
1. add_product
Adds a new product to the in-memory catalog.
Input Model (AddProductInput)
{
"name": "Laptop",
"category": "Electronics",
"price": 1299.99,
"stock": 5,
"description": "Powerful gaming laptop"
}
2. search_product
Searches for products by name or category.
Input Model (SearchInput)
{
"query": "laptop"
}
3. get_product
Gets a product by its unique ID.
Input Model (GetProductInput)
{
"product_id": "uuid-here"
}
MCP Client Example
Run the client
python client.py
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.