InventorySystem MCP Server

InventorySystem MCP Server

A Python MCP server that connects to an Inventory Management System, providing 15 tools for CRUD operations on users, inventory items, and bills.

Category
访问服务器

README

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

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选