Skip to content

Latest commit

 

History

History
108 lines (77 loc) · 2.57 KB

setup.md

File metadata and controls

108 lines (77 loc) · 2.57 KB

Setup Guide

1. Get a Meshy API key

  1. Sign up or log in at app.meshy.ai
  2. Go to Settings → API Keys
  3. Click Generate Key and copy it

Free tier includes credits to test all tools. Paid plans at meshy.ai/pricing.


2. Connect to Claude Desktop

Open your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add this block inside "mcpServers":

{
  "mcpServers": {
    "meshy-3d": {
      "command": "npx",
      "args": ["-y", "meshy-mcp"],
      "env": {
        "MESHY_API_KEY": "msy_your_key_here"
      }
    }
  }
}

Restart Claude Desktop. You should see meshy-3d in the tools panel.


3. Connect to a custom MCP client

If you're building your own MCP client using the @modelcontextprotocol/sdk:

import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
import { Client } from "@modelcontextprotocol/sdk/client/index.js";

const transport = new StdioClientTransport({
  command: "npx",
  args: ["-y", "meshy-mcp"],
  env: { ...process.env, MESHY_API_KEY: "msy_your_key_here" },
});

const client = new Client({ name: "my-app", version: "1.0.0" }, { capabilities: {} });
await client.connect(transport);

4. Run from source

git clone https://github.com/zyadhajaji/meshy-mcp.git
cd meshy-mcp
npm install
npm run build

# Set your key
export MESHY_API_KEY=msy_your_key_here

# Run
npm start

Or with a .env file:

cp .env.example .env
# Edit .env with your key
node -e "require('dotenv').config(); require('./dist/index.js')"

Environment variables

Variable Required Default Description
MESHY_API_KEY ✅ — Your Meshy API key
MESHY_BASE_URL — https://api.meshy.ai Override API base URL
MESHY_POLL_TIMEOUT_SECONDS — 300 Max wait time for task completion
MESHY_POLL_INTERVAL_SECONDS — 3 Polling frequency

Troubleshooting

"MESHY_API_KEY is not set" → Add the env var to your MCP client config or export it in your shell.

"Meshy API error 401" → Your API key is invalid or expired. Generate a new one in Meshy settings.

Task times out → Increase MESHY_POLL_TIMEOUT_SECONDS. Complex models can take 3–5 minutes. → Use wait_for_completion: false and call check_task_status manually.

"Model not found" after generation → Meshy tasks expire after 24 hours. Download your GLB files before they expire.