pcbway-mcp-server
Get instant PCB manufacturing and assembly quotes, place orders, and track fabrication — all from your AI coding assistant. This MCP server gives you full access to the PCBWay Partner API: PCB pricing, SMT assembly quotes, order lifecycle (place, confirm, cancel, track), shipping costs, and account balance — compatible with Claude Desktop, opencode, Cursor, and any MCP client.
npm install -g pcbway-mcp-server # or run without installing: npx pcbway-mcp-server
PCBWay API
Wraps the PCBWay Partner API (api-partner.pcbway.com) — instant PCB
manufacturing quotes, SMT assembly pricing, order lifecycle (place, confirm,
cancel, track), shipping freight, and account balance — exposed as 16 MCP
tools. See Available Tools for the full reference.
Features
- PCB quote API — instant PCB manufacturing pricing with turn time options
- SMT assembly API — pricing by part counts
- Order management — place, confirm, cancel orders; query fabrication status & details
- Order Package Management — Check, pay, and cancel awaiting-payment packages; inspect confirmed packages
- Shipping costs — pre-payment freight estimate
- Account — Balance, coupon value, reward points
- Address Lookup — Countries, states/provinces, cities with postal codes
- 16 MCP tools covering all documented PCBWay Partner API endpoints
Requirements
- Node.js >= 18
- A PCBWay Partner account with an API Key
Setup
1. Get API Credentials
Contact PCBWay partner support to request an API Key for your account.
2. Install
npm install -g pcbway-mcp-server
Or run directly:
npx pcbway-mcp-server
3. Configure Environment
# Required:
export PCBWAY_API_KEY=your_api_key
# Optional overrides:
export PCBWAY_BASE_URL=https://api-partner.pcbway.com # API base
export PCBWAY_MAX_RETRIES=3 # Max retries for transient failures
export PCBWAY_BASE_DELAY_MS=500 # Base exponential-backoff delay (ms)
export PCBWAY_TIMEOUT_MS=30000 # Request timeout (ms)
Note: The PCBWay Partner API uses a single api-key header for authentication. There is no App ID, HMAC signing, or timestamp required.
4. Run
npx pcbway-mcp-server
MCP Client Configuration
{
"mcpServers": {
"pcbway": {
"command": "npx",
"args": ["-y", "pcbway-mcp-server"],
"env": {
"PCBWAY_API_KEY": "your_api_key"
// Optional: PCBWAY_MAX_RETRIES, PCBWAY_BASE_DELAY_MS, PCBWAY_TIMEOUT_MS, PCBWAY_BASE_URL
}
}
}
}
Never hardcode credentials in configs that are shared or committed.
Available Tools
pcb_quote
PCB manufacturing price quote. Requires shipping destination and board parameters.
Returns pricing by build speed (Standard / Express) with shipping cost.
smt_quote
SMT assembly price quote. Uses simple part counts (not a full BOM).
order_process
Get fabrication status — shows all required processes and which are completed.
order_details
Get full order details including all PCB parameters (dimensions, material, finish, audit result, delivery date, etc.)
shipping_freight
Get shipping cost before payment (call after placing order, before confirming).
account_balance
Query PCBWay account balance, coupon value, and reward points. No parameters required.
place_order
Add a PCB order to your cart. Requires PCB file and all board parameters.
confirm_order
Confirm orders and make payment. Can confirm single or multiple orders together.
cancel_order
Cancel an existing PCBWay order.
check_tgroup_order
Check awaiting-payment order package details.
pay_tgroup_order
Pay for an awaiting-payment order package.
cancel_tgroup_order
Cancel an awaiting-payment order package.
check_group_order
Check a confirmed (paid) order package details.
get_countries
List all supported countries for PCBWay ordering. No parameters required.
get_states
List states/provinces for a country.
get_cities
List cities with postal codes for a country/state.
Development
git clone https://github.com/nabheet/pcbway-mcp-server.git
cd pcbway-mcp-server
npm install
npm run build
Architecture
src/
├── index.ts # MCP server entry point + tool registry
├── config.ts # Environment variable loading (PCBWAY_API_KEY only)
├── client.ts # Simple api-key auth, POST-only client
├── types.ts # Full TypeScript interfaces matching PCBWay API
└── resources/
├── PcbQuote.ts # POST /api/Pcb/PcbQuotation
├── SmtQuote.ts # POST /api/SMT/SMTQuotation
├── OrderProcess.ts # POST /api/Pcb/QueryOrderProcess
├── OrderDetails.ts # POST /api/Pcb/CheckOrderDetails
├── Shipping.ts # POST /api/Pcb/GetFreightByOrder
├── Account.ts # POST /api/Account/QueryBalance
├── PlaceOrder.ts # POST /api/Pcb/PlaceOrder
├── ConfirmOrder.ts # POST /api/Pcb/ConfirmOrder
├── CancelOrder.ts # POST /api/Pcb/CancelOrder
├── CheckTGroupOrder.ts # POST /api/Pcb/CheckTGroupOrder
├── PayTGroupOrder.ts # POST /api/Pcb/PayTGroupOrder
├── CancelTGroupOrder.ts # POST /api/Pcb/CancelTGroupOrder
├── CheckGroupOrder.ts # POST /api/Pcb/CheckGroupOrder
├── GetCountries.ts # POST /api/Address/GetCountry
├── GetStates.ts # POST /api/Address/GetState
└── GetCities.ts # POST /api/Address/GetCity
One class per resource. Input validation via Zod schemas. All endpoints use POST with JSON body and api-key header authentication.
API Endpoint Coverage
Releases
Releases are published automatically by CI — no manual npm publish needed.
-
Every PR push publishes
<version>-beta.<run_number>to thebetadist-tag (npm i pcbway-mcp-server@beta), so every PR is instantly installable — same-repo, non-draft, non-dependabot PRs; re-runs deduped. -
Stable version = last published
latest+ patch, so repeated merges never collide. -
An intentional minor/major bump in
package.jsonis published as-is (honored). -
Publish is retried 3x for transient failures only; a version conflict is never retried.
-
A push to
mainonly tags/releases if it actually published (channel check).
License
MIT