# Megaventory MCP

> Megaventory MCP Server lets your AI client manage complex supply chain logistics and inventory records through natural conversation. It tracks stock across multiple warehouses, processes sales orders (SO), handles purchase orders (PO) from suppliers, and manages product updates—all without you needing to open the web portal. Use it to check real-time stock levels, verify supplier pricing, or update order statuses instantly.

## Overview
- **Category:** erp-operations
- **Price:** Free
- **Tags:** stock-tracking, purchase-orders, manufacturing-erp, fulfillment, warehouse-management, bill-of-materials

## Description

You connect your AI client to this server, and it handles all your messy supply chain stuff through plain chat commands. You don't gotta log into the web portal or juggle a bunch of screens; your agent just talks to Megaventory for you. 

**Checking Stock Levels Across All Sites**

Your agent gets total inventory counts, even if stock is allocated or sitting in a specific spot. It retrieves comprehensive lists of all current inventory across the network using `get_inventory_stock`. If you only care about one item's count, it checks that for you with `get_stock_by_product`, which lets you filter by either the product name or its SKU identifier. You can also check what products your system carries at any time by calling `list_products`, and if you need details on a single specific item, it pulls up all the info using `get_product` based on that unique SKU.

**Managing Orders and Client Records**

When you need order details, your agent handles it. It can list every open or closed sales order with `list_sales_orders`, giving you a quick overview of everything moving through the system. If you need full records for just one sale, it uses `get_sales_order` to pull up all the specific numbers and details tied to that single order number. For purchasing stuff from vendors, it lists every purchase order placed with a supplier using `list_purchase_orders`. You can also update those orders—for instance, marking an active sales order as 'Shipped' or changing its status entirely—by running `update_sales_order`. 

On the client and vendor side, it keeps tabs on who you deal with. It gives a full roster of both your suppliers and your main clients by listing them all using `list_supplier_clients`. If you gotta update their contact info or change their terms, it lets you modify those records for either a supplier or a client through `update_supplier_client`.

**Catalog Management and Location Details**

Your agent keeps your catalog clean. It provides an exhaustive list of all distinct product categories in your system using `list_categories`. You can also check out every physical warehouse or storage spot you use by calling `list_locations`. When it comes to updating the core data, if a product's description or pricing changes, running `update_product` lets you modify that existing SKU record. 

**Running Quick Checks and Verifying Connections**

Before you start, your agent confirms everything is working by calling `check_megaventory_status`, making sure the connection to Megaventory is active. You can also get details on a specific supplier's or client's records using `get_product` if that record happens to be tied to an SKU.

This setup means your AI client manages everything—from checking stock levels across all sites and listing entire product catalogs, to pulling up full order details by number and updating core records like product pricing or sales statuses. It's a single conversation managing complex logistics.

## Tools

### check_megaventory_status
Verifies that your connection to the Megaventory system is active and operational.

### list_categories
Provides an exhaustive list of all distinct product categories in your catalog.

### list_supplier_clients
Shows a roster of both your suppliers and your main clients, along with their details.

### list_locations
Returns a list of every warehouse or storage location used by the company.

### get_product
Fetches detailed information about a single product using its unique SKU identifier.

### list_products
Generates a full, filterable listing of all products in your system.

### list_purchase_orders
Lists every purchase order that has been placed with a supplier.

### get_sales_order
Gets all the specific details for one sales order number.

### list_sales_orders
Retrieves a list of all open and closed sales orders for quick review.

### get_stock_by_product
Checks current inventory stock levels specifically filtered by a product's name or SKU.

### get_inventory_stock
Retrieves a comprehensive list of all current inventory stock counts across the network.

### update_supplier_client
Allows you to modify contact information or terms for a specific supplier or client record.

### update_product
Modifies existing product data, such as updating the description or pricing, for a specific SKU.

### update_sales_order
Changes the status or details of an active sales order (e.g., marking it 'Shipped').

## Prompt Examples

**Prompt:** 
```
Check inventory for 'Wireless Headphones' across all locations.
```

**Response:** 
```
Inventory for SKU 'WH-890' (Wireless Headphones): Total: 450 units. New York Warehouse: 200 (15 allocated). LA Warehouse: 150 (30 allocated). Chicago Hub: 100 (In-transit: 50). Minimum stock alert: OK (Threshold is 100).
```

**Prompt:** 
```
Show open purchase orders and incoming deliveries.
```

**Response:** 
```
Open Purchase Orders: 3. PO-102 (Supplier: TechCorp, Expected: Tomorrow, Items: 500x Keyboards). PO-103 (Supplier: AudioPro, Expected: Friday, Items: 200x Speakers). PO-104 (Supplier: CableCo, Delayed ⚠️). Total incoming value: $14,500.
```

**Prompt:** 
```
Create a sales order for Acme Corp and allocate stock.
```

**Response:** 
```
Sales Order created! ✅ SO-4581 for Acme Corp. Items: 50x Wireless Headphones, 10x Monitors. Total: $4,500. Stock allocated from New York Warehouse. Status: Pending fulfillment. Ready to generate picking list?
```

## Capabilities

### Check stock levels across all sites
Your agent retrieves total, allocated, and location-specific inventory counts for any SKU.

### Pull order details by number or client
You can get full records on open sales orders or list all incoming purchase orders from suppliers.

### List and categorize product data
The agent lists your entire catalog, filters it by category, or finds a specific item using its SKU.

### Update core records (products, orders, clients)
You can change details like updating a product's description or changing the status of an existing sales order.

## Use Cases

### Client needs a full stock audit.
The ops manager asks the agent: 'Check inventory for all electronics across NY and LA.' The agent calls `get_inventory_stock` and returns total counts, showing where items are allocated vs. what's available in transit.

### End of quarter reporting on suppliers.
The procurement team asks: 'List all active supplier clients who haven't sent an updated price sheet.' The agent uses `list_supplier_clients` to gather the necessary data, saving hours of manual email follow-ups.

### Shipping delay requires status change.
The fulfillment worker confirms items have shipped and asks: 'Update SO-4581 status to Shipped.' The agent calls `update_sales_order`, changing the official record status instantly.

### New product needs catalog entry.
A new item arrives. Instead of waiting for a manual data sheet entry, the planner asks: 'Add this new widget and list all products to confirm.' The agent uses `update_product` and `list_products` to finalize the listing.

## Benefits

- Real-time stock visibility. Instead of logging into multiple dashboards to calculate total available units, ask the agent for `get_inventory_stock` and get a single, aggregated number instantly.
- Streamlined order management. Need to know if SO-4581 can ship? Call `get_sales_order`. You immediately see item lists, client info, and current status without navigating through tabs.
- Faster procurement cycle. Use `list_purchase_orders` to quickly review all open POs and identify which supplier is holding up your raw materials before contacting them manually.
- Product data control. When a price changes or an SKU description needs updating, use `update_product`. You change the source record instantly instead of waiting for a database administrator.
- Comprehensive client/supplier view. With `list_supplier_clients`, you get one place to check contact details and payment terms for every key partner, eliminating manual spreadsheet lookups.

## How It Works

The bottom line is, your chat interface becomes your operations dashboard; you talk to it like a person, not a database.

1. Subscribe to this server and enter your Megaventory API Key.
2. Your AI client sends a request (e.g., 'What's our stock for X?').
3. The agent executes the necessary tool call (`get_stock_by_product`) and presents the resulting data in plain text.

## Frequently Asked Questions

**How do I check stock with the get_inventory_stock tool?**
You ask your agent to use `get_inventory_stock`. The system will return a detailed breakdown of total units available, segregated by location and whether those units are allocated or free.

**Can I update the product details using update_product?**
Yes. You tell your agent what changes you want (e.g., 'Change the weight of Widget B to 2 lbs') and it calls `update_product` to modify that SKU's data.

**What is the best way to list open purchase orders? Use list_purchase_orders.**
Calling `list_purchase_orders` shows you every PO placed with a supplier. The result includes expected delivery dates and which items are included, helping you plan for delays.

**Should I use get_product or list_products?**
Use `get_product` when you know the exact SKU you want details on. Use `list_products` when you need a general overview and are searching by category name.

**How do I update an order after it ships? Use update_sales_order.**
You prompt the agent to use `update_sales_order` and provide the order ID and the new status (e.g., 'Shipped'). This locks in the change correctly.

**If I'm setting up, how can I verify my connection using the `check_megaventory_status` tool?**
It confirms your API key and credentials work correctly. A successful call means your agent can talk to Megaventory; if it fails, you need to check your key or permissions.

**When should I use `get_stock_by_product` instead of the general inventory tools?**
Use `get_stock_by_product` when you only care about one specific SKU. It pulls targeted stock levels quickly, which is much faster than fetching all warehouse data.

**How do I view my vendor and client records using the `list_supplier_clients` tool?**
This command retrieves a list of all your active suppliers and clients. It lets you see contact details, pricing structures, and who you're doing business with.

**Can I check stock levels across multiple locations?**
Yes. Query inventory levels, incoming stock, and outgoing orders across all your defined warehouse locations.

**How does Megaventory authentication work?**
Megaventory uses a custom API Key header against `api.megaventory.com/v2017a`.

**Can I manage manufacturing work orders?**
Yes. Track work orders, manage Bill of Materials (BOM), and monitor raw material allocation for production.