# Connect VSDX.ai MCP

Server URL: https://vsdx.ai/api/mcp

## Authentication

**ChatGPT and Claude (web or desktop):** add the server URL as a custom MCP connector and sign in with OAuth when prompted.

**Claude Code, Cursor, Codex:** create an API key at https://vsdx.ai/settings/apikeys (prefix `vsdx_`).

Send the key on every MCP request:

- Header: `Authorization: Bearer vsdx_…`
- Or: `x-api-key: vsdx_…`

## ChatGPT (web)

1. Settings → Apps & Connectors → Advanced → enable Developer mode.
2. Add custom connector → URL: `https://vsdx.ai/api/mcp`
3. Sign in to VSDX.ai and approve access.

## Claude (web or desktop)

1. Settings → Connectors → Add custom connector.
2. URL: `https://vsdx.ai/api/mcp`
3. Sign in and approve on the consent screen.

## Tools

| Tool | Credits | Purpose |
|------|---------|---------|
| `generate_diagram` | 10 (default) | Text prompt → editable Visio outputs |
| `convert_diagram` | 5 | draw.io XML or diagram JSON → vsdx/png/svg/drawio |
| `get_credits` | Free | Account balance |

Download URLs in responses expire in about one hour.

Exporting `.vsdx` requires a paid subscription, lifetime plan, or at least one credit package purchase (same rule as Studio). Use `png`, `svg`, or `drawio` formats on any account.

## Claude Code

```bash
claude mcp add --transport http vsdx https://vsdx.ai/api/mcp --header "Authorization: Bearer vsdx_YOUR_KEY"
```

## Cursor

Add to `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "vsdx": {
      "url": "https://vsdx.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer vsdx_YOUR_KEY"
      }
    }
  }
}
```

## Codex

Add to `~/.codex/config.toml`:

```toml
[mcp_servers.vsdx]
url = "https://vsdx.ai/api/mcp"
http_headers = { Authorization = "Bearer vsdx_YOUR_KEY" }
```

More: https://vsdx.ai/mcp
