mcp-rest-bridge
This MCP server gives an MCP client read-only visibility into a store's REST API via 6 tools covering products, orders, customers and sales — no write tools are registered here.
Search the catalog (
search_products): find products by name/SKU text and/or exact category, with paging (limit,offset) and a total match count.Look up one product (
get_product): price, current stock and reorder level for a given SKU (e.g.TLS-001).Find what needs restocking (
list_low_stock): products at or below their own reorder level, or below athresholdyou supply, sorted lowest stock first.Check an order (
get_order): status, customer, line items and total for an order number.Review a customer's history (
list_customer_orders): the customer's profile plus all their orders, newest first, with item counts and totals.Report on sales (
sales_summary): for an inclusive UTC date range (default last 30 days) — order count, revenue excluding cancelled orders, average order value, status breakdown and top products (configurabletop).Practical details: all money is integer cents (12999 = $129.99); every tool returns structured JSON with a fixed output schema; tools are marked read-only/non-open-world and return
taskSupport: forbidden.
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., "@mcp-rest-bridge Which products are running low on stock?"
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.
mcp-rest-bridge
An MCP server that lets Claude (or any MCP client) work with a store through its REST API: "what's running low?", "where is order 1007?", "how did we do in the last 30 days?", "we just got 20 drills, add them".
It comes with a small sample store API (products, customers, orders in SQLite) so the whole thing runs locally in a minute. Every name and number in that data is made up.
This is a personal portfolio project. What it shows is the pattern: a typed, tested MCP layer in front of an existing HTTP API, with safe writes and errors the model can act on.
Features

Read tools:
Tool | What it answers |
| Find products by name/SKU text and/or category, with paging |
| One product's price, stock and reorder level |
| Products at or below their reorder level (or a threshold you give) |
| Order status, customer, line items, total |
| A customer's orders, newest first |
| Revenue, order count, average order, status breakdown, top products for a date range |
Write tools, only registered when STORE_ALLOW_WRITES=true:
Tool | What it does |
| Add or remove units with a reason; logged in a |
| Pending order at list prices for an existing customer; reserves the stock |
Both write tools are dry runs unless the call says confirm: true. The dry run goes through the real API
inside a transaction that is rolled back, so the preview applies the same rules as the real write (no negative
stock, enough stock for every line, customer exists). The tool tells the model to show the preview and ask the
user before confirming.
confirm: true is an argument the model writes, so by itself it doesn't prove the user agreed. When the
client supports form elicitation, the server asks the user directly: it runs the dry run, sends an
elicitation/create request with the result ("Change stock of TLS-002 from 3 to 23 (+20, reason: delivery
PO-311)?") and saves only if the user approves. Decline, cancel, an unticked box or a failed request all save
nothing. Clients without elicitation keep the confirm-flag behaviour, so there the client's own tool-approval
prompt is the gate. Tests: test/write-approval.test.ts.

Also:
Resource
store://categoriesand resource templatestore://products/{sku}Prompt
restock_report: has the model build a purchase list fromlist_low_stockEvery tool has a zod input schema and an output schema and returns
structuredContentplus JSON textTwo transports: stdio (Claude Desktop, Claude Code) and Streamable HTTP (stateless, bearer token required, DNS-rebinding protection from the SDK when bound to localhost)
Upstream failures become tool errors with a next step instead of stack traces:
Upstream | What the model sees |
404 |
|
409 |
|
401 |
|
timeout |
|
down |
|
5xx / bad JSON |
|

Related MCP server: mcp-api-bridge
Architecture
Claude Desktop / Claude Code / any MCP client
│ stdio, or Streamable HTTP + bearer token (src/stdio.ts, src/http.ts)
▼
src/mcp/ server.ts (read tools, resources, prompt), write-tools.ts (dry run / confirm),
│ tool-result.ts (ApiError -> tool error text), http-app.ts (HTTP endpoint)
▼
src/client/ StoreApiClient: fetch + timeout + bearer token, zod-validated responses,
│ ApiError with a `kind` (not_found, conflict, timeout, ...)
▼ HTTP
src/api/ sample store REST API: Express 5 + node:sqlite, seeded sample datasrc/domain.ts holds the zod schemas shared by the API, the client and the tools' output schemas, so a change
in the API's response shape shows up as a type error, and at runtime as a clear bad_response error.
Run it
Needs Node 22.13 or newer (uses the built-in node:sqlite).
npm install
npm run build
# terminal 1: the sample API (data resets on every start unless DATABASE_PATH is a file)
API_KEY=change-me-to-something-long npm run api
# terminal 2: try the MCP server with the MCP Inspector CLI
npx @modelcontextprotocol/inspector --cli node dist/stdio.js \
-e STORE_API_URL=http://127.0.0.1:4000/api -e STORE_API_KEY=change-me-to-something-long \
--method tools/call --tool-name list_low_stockAll settings are in .env.example.
Claude Desktop
Add this to claude_desktop_config.json (absolute path to your checkout), start the API, restart Claude:
{
"mcpServers": {
"store": {
"command": "node",
"args": ["/absolute/path/to/mcp-rest-bridge/dist/stdio.js"],
"env": {
"STORE_API_URL": "http://127.0.0.1:4000/api",
"STORE_API_KEY": "change-me-to-something-long",
"STORE_ALLOW_WRITES": "false"
}
}
}
}Claude Code:
claude mcp add store -e STORE_API_URL=http://127.0.0.1:4000/api -e STORE_API_KEY=change-me-to-something-long \
-- node /absolute/path/to/mcp-rest-bridge/dist/stdio.jsOver HTTP
STORE_API_KEY=change-me-to-something-long MCP_HTTP_TOKEN=another-long-random-token npm run mcp:http
# POST http://127.0.0.1:3000/mcp with "Authorization: Bearer another-long-random-token"
npx @modelcontextprotocol/inspector --cli http://127.0.0.1:3000/mcp --transport http \
--header "Authorization: Bearer another-long-random-token" --method tools/listBinding to anything other than localhost turns off the SDK's DNS-rebinding check; put it behind HTTPS and a reverse proxy in that case.
Pointing it at your own API
The MCP layer only knows StoreApiClient, so connecting a real system means changing two files:
src/domain.ts: describe your API's responses with zod (or reuse your OpenAPI types).src/client/rest-client.ts: one method per endpoint.request()already handles the base URL, bearer token, timeout, JSON parsing, response validation and status-to-ApiErrormapping. If your API uses another auth scheme (API key header, OAuth client credentials), change the headers there.
Then adjust the tools in src/mcp/ to the questions your users ask. Things that matter in practice:
Keep tool descriptions specific: what it returns, units (cents), and which tool to call first.
Write a recovery hint for every 404 (
callApi(fn, "Use search_products to find a valid SKU")).Keep writes behind
STORE_ALLOW_WRITESand the dry run, and give the server an API key that can only do what the tools need.Delete
src/api/once you have a real API; tests can keep using it as a stand-in.
Tests
npm run check # typecheck + eslint + vitest + build39 tests. They start the real sample API on a random port and talk to the MCP server through the SDK's own
Client: over the in-memory transport, as a spawned stdio process, and over Streamable HTTP. Covered: every
tool, the resources, the prompt, input validation, dry run vs confirm (stock and orders checked in the
database afterwards), 401 / 404 / 409 / timeout / connection refused, HTTP token check, 405 on GET and the
Host-header check.
Screenshots of a sales_summary call and the test run: docs/sales.png,
docs/tests.png. They show the bundled sample data.
Stack
TypeScript (strict), Node 22, @modelcontextprotocol/sdk 1.32, zod 4, Express 5, node:sqlite, vitest 5,
ESLint with typescript-eslint.
Related
If you also use Claude Code for freelance work, I sell a paid workspace kit with skills for job triage, proposals, quotes and delivery handoff: Claude Code Freelance OS.
License
MIT
Available Tools
6 toolsget_orderGet order statusBRead-only
Status, customer, line items and total of one order. All money values are integer cents (12999 = $129.99).
Inputs: order_id (required). Returns: id, items, status, customer, +2 more
get_productGet productARead-only
Full details and current stock for one product. All money values are integer cents (12999 = $129.99).
Inputs: sku (required). Returns: sku, name, stock, category, +2 more
list_customer_ordersList a customer's ordersARead-only
A customer's profile and all their orders, newest first. All money values are integer cents (12999 = $129.99).
Inputs: customer_id (required). Returns: orders, customer
list_low_stockList low-stock productsARead-only
Products that need restocking: stock at or below each product's own reorder level, or at or below threshold units if you pass one. Sorted by stock, lowest first.
Inputs: threshold. Returns: items, total
sales_summarySales summaryARead-only
Order count, revenue, average order value, orders by status and top products for a date range (inclusive, UTC). Cancelled orders are excluded from revenue. Defaults to the last 30 days. All money values are integer cents (12999 = $129.99).
Inputs: to, top, from. Returns: to, from, byStatus, orderCount, +3 more
search_productsSearch productsARead-only
Search the catalog by name or SKU fragment and/or exact category. Returns a page of products and the total match count. All money values are integer cents (12999 = $129.99).
Inputs: limit, query, offset, category. Returns: items, total
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct resource+action pair: product search vs single product fetch, low-stock filtering, single order fetch, per-customer order history, and aggregate sales reporting. The two order-reading tools (get_order vs list_customer_orders) are clearly separated by scope (one order vs a customer's profile plus all orders), and descriptions reinforce the boundaries.
Five of six names follow a clean verb_noun pattern (search_products, get_product, list_low_stock, get_order, list_customer_orders). sales_summary breaks the pattern by dropping the verb, a minor but noticeable deviation.
Six tools is a tight, well-scoped set with no filler and no overlap. It leans slightly thin for a commerce bridge, with no write-side tools at all, but every included tool earns its place.
Read coverage is solid (catalog search/detail, stock alerts, orders, customer history, sales aggregation), but the surface is entirely read-only: no product creation, no stock adjustment/restock, and no order status or fulfillment updates. Agents can answer questions but cannot complete inventory or order lifecycle operations.
Related MCP Connectors
Hosted MCP for e-commerce: live product catalog, stock, and pricing for AI agents.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Build custom POS apps with your AI agent. Final's MCP server gives developers what they need to ship a custom point of sale: scaffold a checkout flow, adapt vetted screen blueprints for counter POS, self-checkout kiosks, restaurant ordering and payment terminals, ground every call in Final's version-locked POS APIs, validate, boot a live preview and deploy to real hardware with integrated card payments. The same server also manages the store behind it: products, stock, orders, customers and sales reports. Remote Streamable HTTP with OAuth 2.1.
Connect Amazon Seller Central to Claude or ChatGPT via MCP. Orders, inventory, pricing, fees, FBA.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA real, runnable MCP server exposing three read-only tools (inventory, pricing, hours) with a CLI agent that lets Claude discover and call them.MIT
- AlicenseBqualityCmaintenanceEnables AI assistants like Claude to interact with any REST API through typed, validated MCP tools. Provides a pattern to wrap REST APIs as MCP servers.4MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that connects Claude to Shopify stores, enabling natural language queries and actions on products, orders, customers, inventory, and sales analytics. Includes a demo mode with bundled fixtures for trying tools without credentials.MIT
- AlicenseNot gradedqualityBmaintenanceExposes three read-only tools over stdio — guarded SQL querying, SKU status lookup, and document retrieval — plus a schema resource. This lets MCP clients such as Claude Code answer stock and policy questions without any write access.MIT