patagon-inventory-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@patagon-inventory-mcp how many safety helmets are left in stock, and are any below minimum?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
patagon-inventory-mcp
An MCP (Model Context Protocol) server that lets an AI agent manage inventory through natural language — check stock, register entries and exits, and flag low-stock items — without ever inventing a number.
It is a small, open-source extraction of patterns I use in production at Patagon, a B2B platform where AI agents run day-to-day operations for SMBs over WhatsApp. It uses sample data only.
"Se gastaron 10 cascos en la faena norte" → the agent calls
register_movement→ stock goes 38 → 28, and if the same WhatsApp message is delivered twice, it is still counted once.
Why this exists
When an LLM manages real inventory, three things go wrong:
Problem | How this server handles it |
The model hallucinates stock figures | Every number comes from a tool. Tool descriptions and the |
Messages get retried or duplicated (webhooks, flaky networks) |
|
The model claims success when something failed | Invalid operations return an explicit MCP tool error ( |
Related MCP server: InventoryApplication MCP Server
Architecture
flowchart LR
U[User on WhatsApp / chat] --> H[MCP host<br/>Claude Desktop, Claude Code,<br/>or a custom agent]
H <-->|MCP over stdio| S[patagon-inventory-mcp]
S --> T[Tools]
S --> R[Resources]
S --> P[Prompts]
T & R --> D[(InventoryStore<br/>domain logic)]The domain logic (src/inventory.ts) knows nothing about MCP, so it can be unit-tested in isolation and
reused behind any transport. src/server.ts is a thin MCP layer on top of it.
What it exposes
Tools (model-controlled)
Tool | Description |
| List products, optionally filtered by SKU or name |
| Current stock of one product, with status |
| Register an |
| Products below their minimum, with units missing |
| Recent movements, newest first |
Tools carry MCP annotations (readOnlyHint, idempotentHint) so hosts can decide which calls need user confirmation.
Resources (application-controlled)
inventory://products— full catalog snapshotinventory://products/{sku}— resource template with listing and SKU autocompletion
Prompts (user-controlled)
stock_report— a reusable, tested instruction for a short team report, grounded in tool data
Quick start
Requires Node.js 22+.
git clone https://github.com/Sr-Stark08/patagon-inventory-mcp.git
cd patagon-inventory-mcp
npm install
npm run buildTry it in the MCP Inspector
npm run inspectUse it from Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"patagon-inventory": {
"command": "node",
"args": ["/absolute/path/to/patagon-inventory-mcp/dist/index.js"]
}
}
}Use it from Claude Code
claude mcp add patagon-inventory -- node /absolute/path/to/patagon-inventory-mcp/dist/index.jsRun with Docker
docker build -t patagon-inventory-mcp .
docker run -i --rm patagon-inventory-mcpTests
npm testUnit tests for the domain rules: idempotency, key conflicts, no negative stock, input validation, minimum-stock crossing.
End-to-end tests that connect a real MCP
Clientto the server over an in-memory transport and exercise tools, resource templates and prompts through the protocol.
CI (GitHub Actions) runs type-checking, tests and the build on Node 22 and 24, then builds the Docker image and smoke-tests it over stdio.
Project structure
src/
inventory.ts # domain logic: products, movements, idempotency, validation
server.ts # MCP layer: tools, resources, prompts
index.ts # stdio entry point
tests/
inventory.test.ts
server.test.tsLimitations and next steps
Data is in memory with sample products; a restart resets it. The store is isolated so it can be swapped for PostgreSQL or SQLite without touching the MCP layer.
Only the stdio transport is wired up. A Streamable HTTP entry point would enable remote deployments.
No authentication — intended for local use by an MCP host.
Author
Jorge Fraile Pereira — AI Agent Developer, founder of Patagon. Anthropic Academy: Building with the Claude API · Model Context Protocol (Intro & Advanced) · Claude Code in Action.
License: MIT
Available Tools
5 toolsget_movement_historyMovement historyARead-only
Most recent stock movements, newest first. Optionally filter by SKU.
Inputs: sku, limit.
get_stockGet stockARead-only
Get the current stock of one product by SKU. Always use this before telling a user how much stock there is — never guess.
Inputs: sku (required).
list_low_stockList low stockARead-only
List products whose stock is below their configured minimum.
Inputs: no named parameters.
list_productsList productsARead-only
List inventory products, optionally filtered by a text query that matches SKU or name.
Inputs: query.
register_movementRegister stock movementAIdempotent
Register a stock entry (in) or exit (out). Idempotent: send the same idempotency_key when retrying so the movement is never counted twice.
Inputs: sku (required), type (required), quantity (required), idempotency_key (required), +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a distinct purpose: list_products (catalog browsing), get_stock (single SKU stock), list_low_stock (filtered subset), register_movement (writes), and get_movement_history (audit trail). The overlap between list_products and list_low_stock is clearly differentiated by the minimum-threshold filter, and get_stock is explicitly scoped to a single SKU.
All five tools follow a uniform verb_noun snake_case pattern (list_products, get_stock, register_movement, list_low_stock, get_movement_history). Verbs are meaningful and consistent across the set.
Five tools is well-scoped for a focused inventory server, and each one covers a distinct read or write operation without redundancy. Nothing feels padded or missing at the count level.
Core inventory lifecycle is covered: browse catalog, check stock, record in/out movements idempotently, surface low stock, and review history. Minor gaps exist around product creation/updating and configuring minimum thresholds, but these are workable around and don't block main workflows.
Maintenance
Related MCP Connectors
Read and update live small-business inventory, suppliers, reorder suggestions and purchase orders.
Live data for AI agents. Search the catalog, read the price, call the tool; keys stay server-side.
Hosted MCP for e-commerce: live product catalog, stock, and pricing for AI agents.
AI inventory management: stock, Demand ESP reorder recommendations and purchase orders.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables AI agents to interact with Skulabs inventory management system through comprehensive tools for managing products, orders, customers, and analytics. Supports voice agents like Retell AI and desktop applications like Claude for natural language inventory operations.-
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to query and modify inventory data through natural language, bridging AI assistants to the inventory management system without requiring SQL knowledge or direct database access.-
- AlicenseNot gradedqualityCmaintenanceEnables an AI agent to query a warehouse management system for orders, stock, stalled orders, and audit logs, and to make narrowly scoped writes by changing order status with a required reason or appending notes, with all writes recorded in a full audit trail.MIT
- AlicenseNot gradedqualityBmaintenanceEnables a shared store inventory platform where owners and customers query and manage products, check stock, run POS checkout, and approve simulated restocks through authenticated MCP tools backed by a shared SQLite database. Tool calls are persisted with request IDs and executed SQL so every operation can be audited and verified.Apache 2.0