loading…
Search for a command to run...
loading…
A Python MCP server that connects to an Inventory Management System, providing 15 tools for CRUD operations on users, inventory items, and bills.
A Python MCP server that connects to an Inventory Management System, providing 15 tools for CRUD operations on users, inventory items, and bills.
A Python based MCP (Model Context Protocol) Server that connects to an Inventory Management System and provides various tools to handle CRUD operations to it.
This is a simple side project I tried myself for fun to try enable AI compatibility to one of our college miniprojects.
Below are the tools that this MCP server provides.
| S.No | Tool | Description |
|---|---|---|
| 1 | fetch_users |
Reads all the Users Registered to System |
| 2 | add_user |
Adds a New User to the System |
| 3 | fetch_inventory_items |
Reads all the Items Stored in the Inventory |
| 4 | add_inventory_item |
Adds a New Item to the Inventory |
| 5 | update_inventory_item |
Updates Details of an Item in Inventory |
| 6 | update_inventory_item_stock |
Updates only the Stock of an Item in Inventory |
| 7 | fetch_bill_records |
Reads all the Bills Created in the System |
| 8 | fetch_bill_records_by_cashier |
Reads the Bills Filtered by Cashier who created them |
| 9 | open_bill |
Reads the Item Entries in a Bill |
| 10 | create_bill |
Creates a New Bill by the Product Id and Stock |
| 11 | issue_bill |
Issues a Bill (Bill is Paid) |
| 12 | discard_bill |
Discards a Draft Bill (Unpaid Bill) |
| 13 | add_item_to_bill |
Adds a new Item to a bill. |
| 14 | edit_bill_item_quantity |
Changes the Quantity of a Item entry in a Bill |
| 15 | delete_bill_item |
Deletes the Item entry from the bill |
C://xampp/htdocs)mkdir invmgmt
cd invmgmt
mcp branch from InventorySystem Repository on this foldergit clone -b mcp --single-branch https://github.com/AllanSJoseph/InventorySystem.git
For Windows users:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
For Linux/Mac users (Note: This server is ran and tested on Windows):
curl -LsSf https://astral.sh/uv/install.sh | sh
Clone this repository
Open the directory in terminal
Install the required dependencies using uv
uv sync
Open an MCP Client (here I am using Claude Desktop).
Go To Claude Settings Ctrl + ,.
Go to the Developer tab.
Click on Edit Config under Local MCP Servers.
It highlights the claude_desktop_config.json file, Open it in your favourite text editor.
Add the below code to the mcp_servers list in the JSON file save and close.
"mcpServers": {
"inventory_mgmt_mcp": {
"command": "uv",
"args": [
"--directory",
"your_project_directory_path",
"run",
"main.py"
]
}
}
Could you list the users that are registered to Inventory Management System.
fetch_users tool to search for the answer and return it in the chat. If it askes for permission click on Allow always.Please Note that free version of Claude has a limitation of number of tokens or characters, so it may not give results as desired and can sometimes give you an error of exceeding the token limit. You can try with a paid version of Claude or use other MCP clients like Cursor, WindSurf, etc.
Refer the official MCP Documentation from Antropic for more details on how to setup MCP servers in your client For Server Developers - Model Context Protocol
Could you add a demo user with a name of your choice and details of your choice, user must be a Cashier.
Could you add the below product to the Inventory Server.
AMUL MILK with stock 200 and price 20. Add a description of your choice.
Could you create a bill with the items 2 units of product id 1, 5 units of product id 21 and 3 units of product id 5, Issue the bill with payment method 'UPI'
Note: These products should be already in the inventory management main server. The database won't have any items just after setup.
In the project root directory find serverlogs.log, which will contain the logs. It is ignored in git but it will be created when server is up.
To inspect the tools and check if tools are working properly, run the below command in terminal on the project directory.
npx @modelcontextprotocol/inspector uv run main.py
Выполни в терминале:
claude mcp add inventorysystem-mcp-server -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.