> **Reading as an AI agent?** This is the Markdown version of https://docs.meshy.ai/api/local-mcp.
>
> - Full docs index: https://docs.meshy.ai/llms.txt
> - Single-fetch full content: https://docs.meshy.ai/llms-full.txt
> - Tool-calling access via MCP server: https://docs.meshy.ai/api/ai
> - Command-line access via the Meshy CLI: https://docs.meshy.ai/api/cli

---
# Local MCP server

Run Meshy's MCP server on your computer with your API key, so your AI app can generate, track, and download 3D models.

The server is the open-source npm package [`@meshy-ai/meshy-mcp-server`](https://www.npmjs.com/package/@meshy-ai/meshy-mcp-server), which your AI app starts with `npx`. Because it runs on your computer, it saves downloads there and can open a model in your slicer. To connect without an API key or Node.js, use the [remote MCP server](/api/remote-mcp).

---

## Before you begin
You need the following:

- A Meshy API key, which needs a paid plan. Create one on the [API Keys page](https://www.meshy.ai/developers/keys).
- Node.js 18 or later.

Tool calls spend credits at the same rates as the API and share your API rate limits. For details, see [Pricing](/api/pricing) and [Rate limits](/api/rate-limits).

Meshy keeps the models for 3 days, as it keeps every API task, so download the ones you want to keep. For details, see [Asset retention](/api/asset-retention).

---

## Install the server
Add the server to your AI app under the name `meshy`, with your key in the `MESHY_API_KEY` environment variable. Each setup in this section saves the key in your user-level config, outside your projects. Replace `msy_YOUR_API_KEY` with your key.

The [remote MCP server](/api/remote-mcp) uses the name `meshy` too, so an app holds one Meshy server at a time. To switch an app from the remote server, do the following:

- **Claude Code**: Run `claude mcp remove meshy -s user` first, because Claude Code won't add a second server named `meshy`.
- **Codex and `add-mcp`**: The command replaces the `meshy` server the app has. The `add-mcp` confirmation doesn't name the server it replaces.
- **Cursor, VS Code, Windsurf, and other apps with a JSON config**: Replace the `meshy` entry in the config.

Earlier `add-mcp` commands for Meshy added this server as `meshy-mcp-server`. If your app has that entry, remove it too.

To add the server to several apps at once, run [`add-mcp`](https://www.npmjs.com/package/add-mcp). It finds the AI apps on your computer and asks which ones to set up.

```bash
npx add-mcp @meshy-ai/meshy-mcp-server --name meshy -g --env MESHY_API_KEY=msy_YOUR_API_KEY
```

To add the server to one app, use the tab for your app.

**Claude Code**

```bash
# macOS / Linux / WSL
claude mcp add -s user meshy --env MESHY_API_KEY=msy_YOUR_API_KEY -- npx -y @meshy-ai/meshy-mcp-server

# Windows (PowerShell or Command Prompt)
claude mcp add -s user meshy --env MESHY_API_KEY=msy_YOUR_API_KEY "--" cmd /c npx -y @meshy-ai/meshy-mcp-server
```

**Codex**

```bash
# Codex in the ChatGPT desktop app shares this setup.
# macOS / Linux / WSL
codex mcp add meshy --env MESHY_API_KEY=msy_YOUR_API_KEY -- npx -y @meshy-ai/meshy-mcp-server

# Windows (PowerShell or Command Prompt)
codex mcp add meshy --env MESHY_API_KEY=msy_YOUR_API_KEY -- cmd /c npx -y @meshy-ai/meshy-mcp-server
```

**Cursor**

```json
// ~/.cursor/mcp.json
{
  "mcpServers": {
    "meshy": {
      "command": "npx",
      "args": ["-y", "@meshy-ai/meshy-mcp-server"],
      "env": { "MESHY_API_KEY": "msy_YOUR_API_KEY" }
    }
  }
}
```

**VS Code**

```json
// Run "MCP: Open User Configuration" from the Command Palette
{
  "servers": {
    "meshy": {
      "command": "npx",
      "args": ["-y", "@meshy-ai/meshy-mcp-server"],
      "env": { "MESHY_API_KEY": "msy_YOUR_API_KEY" }
    }
  }
}
```

**Windsurf**

```json
// ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "meshy": {
      "command": "npx",
      "args": ["-y", "@meshy-ai/meshy-mcp-server"],
      "env": { "MESHY_API_KEY": "msy_YOUR_API_KEY" }
    }
  }
}
```

**Gemini CLI**

```json
// ~/.gemini/settings.json
{
  "mcpServers": {
    "meshy": {
      "command": "npx",
      "args": ["-y", "@meshy-ai/meshy-mcp-server"],
      "env": { "MESHY_API_KEY": "msy_YOUR_API_KEY" }
    }
  }
}
```

**Claude Desktop**

```json
// ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
// %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
  "mcpServers": {
    "meshy": {
      "command": "npx",
      "args": ["-y", "@meshy-ai/meshy-mcp-server"],
      "env": { "MESHY_API_KEY": "msy_YOUR_API_KEY" }
    }
  }
}
```

**Other**

```json
// For any app that runs local (stdio) servers. The app's docs name the file.
{
  "mcpServers": {
    "meshy": {
      "command": "npx",
      "args": ["-y", "@meshy-ai/meshy-mcp-server"],
      "env": { "MESHY_API_KEY": "msy_YOUR_API_KEY" }
    }
  }
}
```

On Windows, start the server through `cmd /c`. In a JSON config, set `"command"` to `"cmd"` and `"args"` to `["/c", "npx", "-y", "@meshy-ai/meshy-mcp-server"]`.

To check the setup, restart the app and ask "What's my Meshy credit balance?" It answers with `meshy_check_balance`, which spends no credits.

---

## Available tools
The server offers the following tools. Each tool's input schema lists its parameters, and the [source on GitHub](https://github.com/meshy-dev/meshy-mcp-server/tree/main/src/tools) has the full descriptions. To find the matching tool on the remote server, see [Tools](/api/remote-mcp#tools).

### 3D generation
- `meshy_text_to_3d`: create an untextured preview mesh from a text prompt
- `meshy_text_to_3d_refine`: texture a preview mesh
- `meshy_image_to_3d`: create a 3D model from one image
- `meshy_multi_image_to_3d`: create a 3D model from several images of the same object

### Model editing
- `meshy_remesh`: change a model's topology, polycount, or both
- `meshy_retexture`: apply a new texture to a model
- `meshy_rig`: add a skeleton to a humanoid character
- `meshy_convert`: convert a model to another file format
- `meshy_resize`: resize a model to real-world dimensions
- `meshy_uv_unwrap`: generate a new UV layout for a model

### Animation
- `meshy_animate`: apply an animation to a rigged character
- `meshy_list_animations`: look up preset animation IDs, for free
- `meshy_text_to_motion`: generate an animation from a text prompt

### Images and Creative Lab
- `meshy_text_to_image`: create an image from text
- `meshy_image_to_image`: create an image from a reference image
- `meshy_creative_lab`: turn a photo into a finished Creative Lab product

### 3D printing
- `meshy_send_to_slicer`: find the slicers on your computer, and return a command that opens the model in one. It doesn't call the Meshy API.
- `meshy_analyze_printability`: check a model's FDM printability for free, such as watertightness, holes, and non-manifold edges
- `meshy_repair_printability`: repair a model for FDM printing
- `meshy_process_multicolor`: convert a textured model into a multi-color 3MF file
- `meshy_auto_split`: split a model into separately printable parts

### Tasks and account
- `meshy_get_task_status`: check a task's status and download URLs
- `meshy_list_tasks`: list recent tasks, optionally by type or status
- `meshy_list_models`: list your finished 3D models, Image to 3D by default
- `meshy_download_model`: save a finished model to a `meshy_output` folder in the server's working directory, or to a `save_to` path
- `meshy_cancel_task`: cancel a queued task for a refund, or delete a finished one
- `meshy_check_balance`: check your remaining credits
- `meshy_list_usage`: list your team's finished API tasks and their credits, for Studio and Enterprise teams

---

## Example prompts
To start, try these prompts in your AI app:

```
Generate a 3D fox from the prompt "a cartoon fox sitting", then texture it
with PBR maps. Download the final GLB to ./outputs.
```

```
List my last 10 Text to 3D models and download the 3 newest as GLB to
./downloads.
```

---

## Security
The server can do anything your API key can do, including generations that spend credits. It keeps the key in memory and doesn't write it to disk. To protect the key and your credits, do the following:

- Keep the key in your app's config. Don't paste it into a chat, where the history keeps it.
- Use a separate key for MCP. Deleting it on the [API Keys page](https://www.meshy.ai/developers/keys) stops the server without breaking your other integrations.
- Keep tool approval on in your app, so you confirm each call. Text the app reads from a web page or a shared file can ask it to call a tool you didn't request.

---

## Troubleshooting
| Problem | Fix |
|---|---|
| `npx` isn't found, or the server doesn't start | Install Node.js 18 or later. A desktop app might not see your terminal's `PATH`. In that case, set `"command"` to the full path that `which npx` prints (`where npx` on Windows). |
| On Windows, the app can't start the server | Start it through `cmd /c`, as [Install the server](#install) shows. |
| Tool calls say the API key is missing or invalid | Check `MESHY_API_KEY` in the app's config. If you deleted the key, create a new one. |
| The Meshy tools don't appear | Restart the app. In Cursor, turn on `meshy` in **Settings** > **MCP & Integrations**. In VS Code, run **MCP: List Servers**, select `meshy`, and click **Start**. |

To report a problem with the server, open an issue in the [meshy-mcp-server repository](https://github.com/meshy-dev/meshy-mcp-server/issues).

---

## Next steps
- To compare the Meshy CLI and the two MCP servers, see [AI integration](/api/ai).
- To script Meshy from a terminal, see [Meshy CLI](/api/cli).
