Azure MCP Inventory Server
Enables CRUD operations on inventory items stored in Azure Cosmos DB via MCP tools, allowing creation, reading, updating, and deletion of items.
README
Azure MCP Inventory CRUD Server and Client
This project contains an MCP (Model Context Protocol) server and async client for managing inventory items in Azure Cosmos DB.
Setup
- Install dependencies:
pip install -r requirements.txt
- Create a
.envfile with your Azure Cosmos DB credentials:
COSMOS_ENDPOINT=https://<your-account>.documents.azure.com:443/
COSMOS_KEY=<your-primary-key>
COSMOS_DATABASE=<your-database-name>
Running the Server
Start the MCP server with HTTP transport:
python server.py
The server will run on http://127.0.0.1:8001 by default.
Using the Client
The client.py module provides an InventoryClient class for consuming the server. It uses async/await and httpx for HTTP communication.
Basic Usage
import asyncio
from client import InventoryClient
async def main():
client = InventoryClient(server_url="http://127.0.0.1:8001")
async with client.connect():
# Create an item
result = await client.create_item(
item_id="ITEM001",
name="Laptop",
category="Electronics",
quantity=10,
price=999.99
)
print(result)
# Read an item
result = await client.read_item("ITEM001", "Electronics")
print(result)
# Update quantity
result = await client.update_quantity("ITEM001", "Electronics", 15)
print(result)
# List items in a category
result = await client.list_category_items("Electronics")
print(result)
# Delete an item
result = await client.delete_item("ITEM001", "Electronics")
print(result)
asyncio.run(main())
Running the Example
To run the included example:
python client.py
Client API
InventoryClient
Constructor
__init__(server_url: str = "http://127.0.0.1:8001")- Initialize the client
Methods
All methods are async and require using async with client.connect(): context manager.
async create_item(item_id, name, category, quantity, price)- Create a new itemasync read_item(item_id, category)- Read an item by ID and categoryasync update_quantity(item_id, category, new_quantity)- Update item quantityasync delete_item(item_id, category)- Delete an itemasync list_category_items(category)- List all items in a category
Server API
The server exposes the following tools via MCP:
create_item- Create a new inventory itemread_item- Read an item from the databaseupdate_quantity- Update the quantity of an existing itemdelete_item- Delete an inventory itemlist_category_items- List all items in a specific category
Architecture
- server.py - FastMCP server that manages inventory CRUD operations with Azure Cosmos DB
- client.py - Async HTTP client for consuming the MCP server
- requirements.txt - Python dependencies
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.
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.
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.
E2B
Using MCP to run code via e2b.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.