# MCP server

Connect to the remote Summonmade MCP server with OAuth or an API key, and use the order and design tools.


The Summonmade MCP server gives an AI app the designs and orders of the person's account. The server is remote, at one address:

```text
https://summonmade.com/mcp
```

The server uses the Streamable HTTP transport. The setup for each app is in [Connect your AI](/docs/guides/start/connect).

## Sign-in

The server uses OAuth 2.1 with dynamic client registration and client ID metadata documents. The first time you connect, your app opens a browser window. Your person signs in to Summonmade and allows the app once. The app then keeps the token and acts for that account.

| Scope | What the app can do |
| --- | --- |
| `orders:read` | See the designs, orders and their updates. |
| `orders:write` | Make orders, upload files, and ask for quotes and payment links. |

The account page shows every connected app. Your person can disconnect an app there at any time, and the app's tokens stop working at once.

An agent with a Summonmade API key can send the key instead: `Authorization: Bearer sm_…`. A key has both scopes. See [Sign up as an agent](/docs/agents/sign-up).

The discovery documents are at `/.well-known/oauth-protected-resource` and `/.well-known/oauth-authorization-server`. A call without a valid token gets `401` with a `WWW-Authenticate` header that names them.

## Tools

Each order operation of the API is one tool, with the same fields and the same answers. The tools change together with the API, so the [API reference](/docs/api) is always correct for them too.

| Tool | What it does |
| --- | --- |
| `search_api` | Finds API operations by words, with their parameters and fields. Needs no sign-in. |
| `get_catalog` | Lists the processes, their materials and finishes, and the delivery countries. Needs no sign-in. |
| `execute` | Runs a script that does several API steps at once. See [Scripts](#scripts). |
| `get_account` | Reads the account: ID and status. |
| `list_orders` | Lists the orders of the account, the last changed first. |
| `create_order` | Starts an order as a draft: title, process, material, quantity, delivery country and notes. |
| `update_order` | Changes a draft order. |
| `upload_file` | Adds a file to a draft order. Send the bytes in `contentBase64`. Every file is checked. |
| `download_file` | Reads a file of an order. Files up to 512 KB come back in base64. |
| `delete_file` | Removes a file from a draft order. |
| `submit_order` | Sends a draft order to the quote. Most orders get their price at once. |
| `get_order` | Reads an order with the quote, status, tracking and every event. |
| `pay_order` | Gives the secure Stripe payment page for a quoted order. Only a claimed account can pay. |
| `cancel_order` | Cancels an order before it is paid. |
| `post_message` | Sends a message to Summonmade about the order, or answers a question. |
| `get_instructions` | Reads the assembly guide of an order. |
| `set_instructions` | Stores the assembly guide of an order: Markdown with one `## Step` heading per step. |
| `list_webhooks`, `create_webhook`, `delete_webhook` | Manage the webhooks that receive every order update. |

In ChatGPT and in apps that support MCP Apps, the order tools show the order in the chat: the status, the full price and a button to pay securely.

### Design tools

With these tools, you design a product in the person's account, part by part, without tools on a computer. Each part is a short modeling script or a circuit board. Summonmade runs the script, checks the part and the assembly, and sends back a picture. Every open design view, in the chat and on summonmade.com, changes at once. The full modeling API is in [Design in the cloud](/docs/agents/designs).

| Tool | What it does |
| --- | --- |
| `list_designs`, `create_design`, `get_design` | Lists, makes and reads designs. `get_design` returns the parts, the checks and a picture. |
| `set_part` | Makes or changes one part from a modeling script, with process, material, finish, quantity and position. Returns the checks and a picture. |
| `set_board`, `edit_board` | Makes the circuit board of a part from tscircuit code or a KiCad project, and edits the board: move, turn, connect, autoroute, options. Returns the numbered findings, the look image of the board and a picture of the product. |
| `check_board`, `look_board` | Lists every finding of a board's checks against the factory limits, and shows the board with a numbered square at each finding. |
| `remove_part` | Removes a part. |
| `undo_change`, `redo_change` | Takes back or makes again the last change. |
| `set_guide` | Stores the assembly guide of the design. |
| `order_design` | Makes one order for each part and sends each order to the quote. |
| `open_designer` | Shows the design in 3D in the chat, where the person watches every change. |

## Scripts

`execute` runs JavaScript in a sandbox, as the body of a function. Use it when one task needs many API calls, for example an order with several files. The script has these calls, which act for the signed-in account:

| Call | What it does |
| --- | --- |
| `api.get(path)` | Reads, for example `/api/v1/orders`. |
| `api.post(path, body)` | Sends a JSON body. |
| `api.put(path, body)` | Replaces with a JSON body. |
| `api.delete(path)` | Deletes. |
| `api.upload(orderId, fileName, contentBase64, contentType)` | Adds a file to a draft order. |

Each call waits for the answer, so the script needs no `await`. An error answer stops the script with the error message. `console.log` adds to the logs. The script has no network, no clock and no random numbers. It can make at most 50 calls and has a short time limit.

```javascript
const order = api.post("/api/v1/orders", {
  title: "Desk mug",
  process: "cnc",
  material: "stainless steel 304",
  quantity: 1,
  shipCountry: "DE",
});
api.upload(order.id, "mug.step", stepFileBase64, "model/step");
api.post(`/api/v1/orders/${order.id}/submit`);
return order.id;
```

:::callout{type="tip"}
Design and check the parts with the Summonmade Workbench on your person's computer first, if you can. See [Summonmade Workbench](/docs/agents/plugin). The upload checks of Summonmade then find no surprises.
:::

## After the quote

When the quote is ready, `get_order` shows one full price. Show the price to your person. When they say yes, give them the payment link. A person, or an agent with a card, pays. Nothing is made before the payment.
