Skip to main content
Glama
InventorySystem MCP Server

InventorySystem MCP Server

by AllanSJoseph

InventorySystem MCP Server

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.

What this MCP Server does

  • Serves as an Interface between InventorySystem Server and MCP Client (eg: Claude)

  • Provides 15 MCP tools to conduct CRUD operations on Inventory Management System Database.

    • Create and Read Registered Users.

    • Create, Update and Read Inventory Items.

    • Create, Read, Update and Delete Bills.

  • Uses Pydantic to validate data inputs given by LLM before passing to main server.

  • Logs server logs for easy debugging.

Tools

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

Related MCP server: InventarioDB

How to Setup this MCP Server

Prerequisites

  • Python 3.8 or higher

  • uv (Python package manager for MCP servers)

  • XAMPP Apache Server with InventorySystem server set up correctly.

  • An MCP client that supports MCP servers eg: Claude Desktop, Cursor, WindSurf, etc.

  • [Optional] Node.js (for inspecting the MCP server)

Setup InventorySystem Main Server

  1. Install XAMPP from XAMPP Official Site

  2. Make sure Apache and MySQL (MariaDB) services are running

  3. Navigate to htdocs folder (Location where XAMPP is installed eg: C://xampp/htdocs)

  4. Make a new directory invmgmt (or name of your choice)

mkdir invmgmt
cd invmgmt
  1. Clone the mcp branch from InventorySystem Repository on this folder

git clone -b mcp --single-branch https://github.com/AllanSJoseph/InventorySystem.git

Setup MCP Server

Setup uv

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

Install Project Dependencies

  1. Clone this repository

  2. Open the directory in terminal

  3. Install the required dependencies using uv

    uv sync
  4. Open an MCP Client (here I am using Claude Desktop).

  5. Go To Claude Settings Ctrl + ,.

  6. Go to the Developer tab.

  7. Click on Edit Config under Local MCP Servers.

  8. It highlights the claude_desktop_config.json file, Open it in your favourite text editor.

  9. 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"
            ]
        }
    }
  1. Restart Claude Desktop

  2. Open a new chat and click on tools button on the chat box and you will see the documentation tool available.

  3. Try a prompt like below:

Could you list the users that are registered to Inventory Management System.
  1. The LLM will use the 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

Sample Prompts to try with Claude

Add a Demo User

Could you add a demo user with a name of your choice and details of your choice, user must be a Cashier.

Add a Product

Could you add the below product to the Inventory Server.
AMUL MILK with stock 200 and price 20. Add a description of your choice.

Create a bill and issue it

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.

Checking the logs

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.

Inspect this MCP Server

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

Verified on MSeeP

Available Tools

15 tools
add_inventory_itemB
    Adds a new inventory item to the inventory management system.
    
    Args:
        name: The name of the inventory item.
        price: The price of the inventory item.
        stock: The new_stock quantity of the inventory item.
        description: A description of the inventory item.
    
    Returns:
        A confirmation message or an error message in json format if the request fails.

Inputs: name (required), price (required), stock (required), description (required).

add_item_to_billC
Adds an item to the bill with the provided invoice_no.

Args:
    invoice_no:
    prod_id:
    quantity:

Returns:
    A confirmation message or an error message in json format if the request fails.

Inputs: prod_id (required), quantity (required), invoice_no (required).

add_userA
    Adds a new user to the inventory management system.
    
    Args:
        username: The username of the new user.
        password: The password for the new user.
        email: The email address of the new user.
        phone: The phone number of the new user.
        address: The address of the new user.
        type: The type of user (e.g., Admin, Stocker, Cashier).
    
    Returns:
        A confirmation message or an error message in json format if the request fails.

Inputs: type (required), email (required), phone (required), address (required), +2 more.

create_draft_billA
Creates a draft bill and adds the provided products to it.

Args:
    products: A list of products, each element of this list should be a python dictionary of the format:
            - prod_id: int, a unique identifier for the product (must be a positive value)
            - quantity: int, quantity of the product (must be a positive value and cannot be zero)

Example Usage for LLM:
User: "Create a bill for 2 units of product 101 and 5 units of product 102"
LLM Input:
{
    "products": [
        {"prod_id": 101, "quantity": 2},
        {"prod_id": 102, "quantity": 5}
    ]
}

Returns:
    A confirmation message or an error message in json format if the request fails.

Inputs: products (required).

delete_bill_itemA
Deletes an existing item from an unpaid/unissued bill.

Args:
    invoice_no: Invoice Number of the bill
    prod_id: Id of the product (must be a positive value)

Returns:
    A confirmation message or an error message in json format if the request fails.

Inputs: prod_id (required), invoice_no (required).

discard_billA
Discards a draft Bill.

Args:
    invoice_no: Invoice Number of the bill

Returns:
    A confirmation message or an error message in json format if the request fails.

Inputs: invoice_no (required).

edit_bill_item_quantityA
Updates the quantity of an existing unpaid/unissued bill item in the inventory management system.
Args:
    invoice_no: Invoice Number of the bill
    prod_id: int, a unique identifier for the product (must be a positive value)
    quantity: int, quantity of the product (must be a positive value and cannot be zero)

Returns:
    A confirmation message or an error message in json format if the request fails.

Inputs: prod_id (required), quantity (required), invoice_no (required).

fetch_bill_recordsA
Fetches the list of all bill records from the inventory management system server in json format.
Each bill record contains it invoice_no, Date, total_price and paymethod.
If total_price and paymethod are NULL then that bill is not issued (Products inside the bill are not sold).


Returns:
    A list of bill records in json format, or an error message if the request fails.

Inputs: no named parameters.

fetch_bill_records_by_cashierA
Fetches the list of all bill records from the inventory management system server in json format.

Args:
    cashier_id: Unique id of the cashier.

Returns:
    A list of bill records created by this cashier in json format, or an error message if the request fails.

Inputs: cashier_id (required).

fetch_inventory_itemsA
    Fetches the list of all inventory items from the inventory management system server in json format.
    
    Returns:
        A list of inventory items in json format, or an error message if the request fails.

Inputs: no named parameters.

fetch_usersA
    Gets the list of all users from the inventory management system server in json format.
    There are three types of users: Admin, Stocker and Cashier.

    Returns:
        A list of users in json format, or an error message if the request fails.

Inputs: no named parameters.

issue_billA
Issues a draft bill i.e. The bill is finalised and considered paid.
After calling this tool, the bill cannot be edited or deleted.

Args:
    invoice_no: Invoice Number of the bill
    pay_method: Payment Method in uppercase letters (e.g. Cash, Card, UPI)

Returns:
    A confirmation message or an error message in json format if the request fails.

Inputs: invoice_no (required), pay_method (required).

open_billA
Reads the products inside a bill with the provided invoice_no.

Args:
    invoice_no: The Invoice No of the bill

Returns:
    A list of products inside a bill with the provided invoice_no in a json format.

Inputs: invoice_no (required).

update_inventory_itemB
    Updates an existing inventory item in the inventory management system.
    
    Args:
        prod_id: The ID of the inventory item to update.
        name: The new name of the inventory item.
        price: The new price of the inventory item.
        stock: The new new_stock quantity of the inventory item.
        description: The new description of the inventory item.
    
    Returns:
        A confirmation message or an error message in json format if the request fails.

Inputs: name (required), price (required), stock (required), prod_id (required), +1 more.

update_inventory_item_stockA
    Updates the new_stock quantity of an existing inventory item in the inventory management system.
    
    Args:
        prod_id: The ID of the inventory item to update.
        stock: The new new_stock quantity of the inventory item.
    
    Returns:
        A confirmation message or an error message in json format if the request fails.

Inputs: stock (required), prod_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 15 tools

    Disambiguation4/5

    Tools are mostly distinct by resource and action. The only potential confusion is between update_inventory_item and update_inventory_item_stock, but descriptions clarify the difference. Other similar tools like fetch_bill_records and open_bill target different aspects of a bill.

    Naming Consistency3/5

    Uses a mostly consistent fetch_/add_/update_ pattern, but deviates with create_draft_bill, open_bill, issue_bill, and discard_bill. The mix of add_ and create_ plus fetch_ and open_ creates minor inconsistency, though still readable.

    Tool Count4/5

    15 tools is on the upper end of reasonable for an inventory system with users, items, and bills. Each tool has a defined purpose, though a few could be consolidated (e.g., update_inventory_item_stock could be merged into update_inventory_item).

    Completeness3/5

    Bills have good lifecycle coverage (create, edit, delete items, discard, issue, fetch). However, users only have add and list, and inventory items have no delete operation. These are notable gaps for a management system, though not severe enough to break core workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      C
      quality
      D
      maintenance
      This is an MCP server that facilitates building tools for interacting with various APIs and workflows, supporting Python-based development with potential for customizable prompts and user configurations.
      1
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      A small MCP server that manages a product inventory using SQLite, providing CRUD operations through exposed MCP tools.
      -
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      An MCP server that enables LLM agents to interact with PyerP ERP systems via a REST API. It allows users to search, read, create, and update ERP records such as inventory, clients, and users using natural language.
      -