# DentalMesh MCP

Work with CBCT scans through your AI agent: generate STL models, reformats
and PDF reports with DentalMesh.

## Connection

```text
https://mcp.dentalmeshai.com/mcp
```

**Transport:** Streamable HTTP. **MCP authentication:** none.

## How it works

Open your agent in a working folder, add your scans and a local DentalMesh API key,
then describe what you need in chat. The agent checks the scans and previous orders,
sends approved work to DentalMesh, and saves the results back into that folder.

## ChatGPT desktop quick start

Open **Settings → MCP servers → Add server**. Name it **DentalMesh**, select
**Streamable HTTP** and enter the connection URL above. Leave authentication
fields empty. Save, then select **Restart**. Type `/mcp` in the composer to check
the connection.

Start a task with **Work locally** selected, or use **Codex** inside the ChatGPT
desktop app. Open or attach the folder you want to work in, with access to its
files and the local terminal.

## Prepare your working folder

1. **Keep the agent open in that folder.** This is the workspace for your scans,
   local key, order history and downloaded results.
2. **Put your scans in the same folder.** A scan can be a folder containing a DICOM
   series, an archive containing a DICOM series, or a standalone DICOM file.
   Keep different scans in separate files or folders. Use your own names and
   patient subfolders; names such as `case-001` are not required.
3. **Place your key file at the root of the working folder.** To obtain an API key,
   contact DentalMesh support via [Telegram](https://t.me/dentalmesh_ai) or
   [WhatsApp](https://wa.me/16172011933). Create a file named
   `.env`, or ask the agent to prepare an empty one. Open it yourself in a text
   editor and save your key in this format:

   ```dotenv
   DENTALMESH_API_KEY=YOUR_DENTALMESH_KEY
   ```

   Keep the key out of chat and MCP settings. `.env.example` is only a blank
   template; the client reads the actual key from `.env`.
4. **Find your downloads in `results`.** The agent creates this folder at the root
   of the same workspace when saving results. You do not need to create it yourself.

For example:

```text
Working folder/
  .env
  john_doe_cbct/        DICOM series
  scan-2026.zip         Archived DICOM series
  clientname.dcm        Standalone DICOM file
  results/
    john_doe_cbct/
    scan-2026/
    clientname/
```

You do not need to install Python, Git or additional packages. On first use, the
agent sets up the verified local client. It needs its own **Python 3.11+** runtime
on macOS or Linux, file and terminal tools, and HTTPS access. The agent checks
these capabilities before processing.

## How results are organised

Results are saved in `results/<source-name>/`, named after the original scan folder
or file without its extension. A suffix is added if names would collide.
Depending on the services ordered, this contains the PDF, downloaded archives,
and folders of extracted STL models and reformat images.

Order IDs in filenames and extracted-folder names distinguish separate runs.
A short **`DENTALMESH_LOG.md`** records the DentalMesh case ID, processing and
download times, and saved paths. These logs are written in English.
Confirmed copies can use the original order and its existing result folder.

Deleting downloaded files does not delete order history or create a new order.
The agent can download existing results again; a new paid run is a separate choice.

## Your first scan workflow

> Create segmentation and reformats for case john_doe_cbct.

Use your own scan file or folder name; no particular naming pattern is required.

## Other requests you can make

- **"Create segmentation for john_doe_cbct."** — STL models.
- **"Create STL from scan-2026.zip."** — the same segmentation service.
- **"Create reformats for clientname.dcm."** — a PDF and reformat images.
- **"Create slices for john_doe_cbct."** — reformats.
- **"Create a full report from scan-2026.zip."** — segmentation and reformats together.
- **"Give me the cephalometric analysis link for john_doe_cbct."** — an online analysis link.
- **"Add reformats to the existing order for john_doe_cbct."** — an add-on to that case.
- **"Download the existing results for clientname.dcm."** — reuse completed processing.
- **"How many scans are in this folder?"** — a local inventory of sources and copies.

Cephalometry is a separate service from segmentation and reformats. If an analysis
has not been ordered, the agent asks before purchasing it in response to a link request.

## How an order progresses

1. **Send your request.** The agent finds the selected scans, checks copies and
   previous orders, and works out which results can be reused or need an add-on.
2. **Confirm if needed.** The agent asks when paid work has not already been
   authorised, the scope needs clarification, or you need to choose between
   downloading a completed order and creating a new paid run. An explicit
   processing request can already provide authorisation; asking only for a plan does not.
3. **Receive status updates.** While the task is running, the agent follows the
   order and keeps you updated in the active chat. You do not need to ask repeatedly
   whether it is ready. The agent can wait up to one hour per run; keep the local
   task and app running while it waits and downloads results.
4. **Open the results.** The final message contains links to the saved local PDF
   and extracted result folders, plus the available online 3D viewer or
   cephalometric analysis. Links depend on the services ordered.

## Process several cases at once

You can request reports for one case, a named selection, or all scans in the working
folder. For example: **"Create full reports for all cases in this folder."**
The agent checks the whole selection for previous orders and confirmed copies,
reuses available processing and orders only the services you authorise.
Independent cases can process in parallel. Each processed source keeps its own
result folder; confirmed copies can share the same order and results.

The MCP server provides instructions and a verified client; it receives no scans
or API keys. The local client sends approved scans directly to DentalMesh API.
Your key, order history and saved results are kept in the agent's workspace.

ChatGPT's interface and available tools depend on your app version and workspace.
See OpenAI's [MCP setup guide](https://learn.chatgpt.com/docs/extend/mcp)
and [local Work guide](https://developers.openai.com/training/walkthroughs/using-your-computer-and-browser).
