shop-orders
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
valibot-mcp-orders
A small Model Context Protocol (MCP) server for a made-up online shop. It lets an AI app such as Claude Desktop or Cursor look up orders and change delivery addresses.
It is the example project for the tutorial "How to Build a TypeScript MCP Server with Valibot." The whole server lives in two files:
File | What it does |
| The Valibot schemas, the three tools, and reading/saving orders |
| Starts the server over stdio |
Versions used
Every package is pinned to an exact version in package.json.
Tool | Version |
Node.js | 26.13.1 (LTS). Tests also pass on 22.23.5. |
npm | 11.20.0 |
| 2.4.0 |
| 1.5.0 |
| 1.8.0 |
| 7.0.2 |
| 5.1.2 |
| 2.4.0 (tests only) |
| 26.6.11 |
| 2.17.0 (run with |
Related MCP server: woocommerce-mcp-server
Quick start
npm install
npm run build # compiles src/ into dist/
npm test # runs the automated testsnpm start runs the server, but on its own it just waits for an AI app to talk to it. Use the Inspector or an AI app (below) to try it.
The tools
Tool | What it does |
| Finds orders by order number (like |
| Replaces the delivery address. Needs the full address. Refuses orders that are already shipped or delivered. Saves the change to |
| Lists orders, newest first, with an optional date range and status filter. |
Each tool returns readable text for the AI plus structuredContent that matches its outputSchema. The full tools/list response, including every schema the AI sees, is saved in tools-list.json.
Sample data lives in orders.json: 10 orders. ORD-1042, ORD-1046 and ORD-1050 are pending, and ORD-1044 and ORD-1048 are packed, so their addresses can be changed. ORD-1043, ORD-1047 and ORD-1049 are shipped, and ORD-1041 and ORD-1045 are delivered, so they can't.
Removing list-orders
list-orders is self-contained. To remove it, delete the registerListOrders(server, ordersFile); line and the registerListOrders function at the bottom of src/server.ts, then delete the list-orders tests in tests/server.test.ts and run npx vitest run -u to update tools-list.json.
Test with the MCP Inspector
The MCP Inspector is the official tool for trying out an MCP server by hand.
npm run build
npx @modelcontextprotocol/inspector@2.17.0 node dist/index.jsIt prints an address like http://127.0.0.1:6274?MCP_INSPECTOR_API_TOKEN=... and opens it in your browser. Click Connect, open Tools, click List Tools, then pick a tool, fill in the fields and click Run Tool.
For a quick check without the browser, use the Inspector's command-line mode:
npx @modelcontextprotocol/inspector@2.17.0 --cli node dist/index.js --method tools/list
npx @modelcontextprotocol/inspector@2.17.0 --cli node dist/index.js --method tools/call --tool-name find-order --tool-arg orderNumber=ORD-1042Connect to Claude Desktop
Run
npm run build.Open Settings from the Claude menu in your computer's top menu bar (not the settings inside the chat window), then go to Developer → Edit Config. This opens
claude_desktop_config.json:macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add the server, using the full path to
dist/index.json your computer:{ "mcpServers": { "shop-orders": { "command": "node", "args": ["/full/path/to/valibot-mcp-orders/dist/index.js"] } } }On Windows, write the path with double backslashes, for example
"C:\\Users\\you\\valibot-mcp-orders\\dist\\index.js".Quit Claude Desktop completely and open it again.
Click the Add files, connectors and more button at the bottom left of the message box. Check that
shop-ordersis listed with its three tools.Ask: "What's the status of order ORD-1042?" Claude asks for your approval before it uses a tool for the first time.
If the server doesn't appear, Claude Desktop may be finding a different Node version than the one you installed (common with nvm). Replace "node" with the full path that which node (macOS) or where node (Windows) prints.
Connect to Cursor
These steps were checked against Cursor's docs (https://cursor.com/docs/context/mcp) but haven't been tested in Cursor itself.
Run
npm run build.Create
.cursor/mcp.jsonin your project (for one project) or~/.cursor/mcp.json(for every project).Add the server. Cursor's docs list
"type": "stdio"as required:{ "mcpServers": { "shop-orders": { "type": "stdio", "command": "node", "args": ["/full/path/to/valibot-mcp-orders/dist/index.js"] } } }Open Cursor's Customize page, where MCP servers are managed. Check that
shop-ordersis turned on and lists three tools.In the chat, ask: "Find all orders for amara.okafor@example.com."
Replacing orders.json with a real database
All storage goes through two functions near the top of src/server.ts:
async function loadOrders(file: string | URL): Promise<Order[]> { ... }
async function saveOrders(file: string | URL, orders: Order[]): Promise<void> { ... }These are the only places that touch orders.json. To use a real database:
Replace
loadOrderswith a database query. Keep thev.parse(v.array(OrderSchema), rows)line, so bad rows from the database are caught before they reach the AI.Replace
saveOrderswith an update query. With a database you would update one order instead of rewriting them all. For example, add anupdateDeliveryAddress(orderNumber, address)function and call it fromchange-delivery-address.Move filtering into the database.
find-orderandlist-orderscurrently load every order and filter in JavaScript. With real data, put the order number, email, date range and status into the query'sWHEREclause and the sort intoORDER BY orderDate DESC.Replace the
ordersFileoption increateServerwith your database connection, so tests can still pass in a test database.Do the "already shipped?" check and the update in one step (for example
UPDATE ... WHERE status IN ('pending', 'packed')). Otherwise an order could ship between the check and the save.
The tool schemas, descriptions and messages stay the same.
Project files
File | Purpose |
| Schemas, tools and storage |
| stdio entry point |
| Automated tests using an in-memory client |
| Sample data |
| Saved |
| MIT license |
License
MIT © 2026 Oluwawunmi Bewaji
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage Shipday orders, drivers, driver earnings, reports from your AI assistants.
Connect AI to store orders, products and inventory with scoped access and human approvals.
List stores, search and get orders, update order status and cancel orders in ShippingEasy.
Search Order Desk orders and inventory; read order items and shipments; create or update orders.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables managing Kaspi Marketplace orders through AI assistants, including listing, accepting, completing, and canceling orders, with real-time operations directly on production data (no sandbox).811 npmMIT
- AlicenseDqualityDmaintenanceProvides tools for AI assistants to interact with a WooCommerce store, enabling fetching recent orders with optional filtering and retrieving detailed information about specific orders by ID.24MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to find stale unshipped orders, retrieve order details, and mark orders as shipped by wrapping the orders REST API as MCP tools.5MIT
- AlicenseNot gradedqualityCmaintenanceEnables conversational agents to query and create orders via MCP tools, including retrieving full order details, checking current status, and creating new customer orders.ISC