Skip to main content
Glama

yorai-mcp

Sambungin Claude ke Yorai, biar Claude bisa generate gambar, video, dan audio langsung dari chat. Claude bisa cek saldo, lihat katalog model, hitung biaya, generate, upload foto referensi dari HP, dan kasih link download hasilnya.

Contoh pemakaian setelah terpasang:

  • "Cek saldo Yorai gue"

  • "Model video apa aja di Yorai yang paling murah per detik?"

  • "Bikin video Seedance 2.5 480p 5 detik: kucing oren lompat ke meja. Quote dulu ya"

  • "Gue mau upload foto gue buat character sheet pakai Nano Banana 2"

Biaya: semua generate makan kredit dari akun Yorai lu sendiri (1 kredit = Rp1.000). Setiap orang pakai API key masing-masing.


Pilih cara pasang

A. Lokal di PC

B. Online di VPS

Dipakai dari

Claude Desktop / Claude Code di PC itu aja

claude.ai di web dan HP, kapan aja

Butuh

Node.js

VPS + domain/subdomain

Upload foto dari HP

❌

✅ (link upload)

Link download hasil

❌ (hasil disimpan ke folder PC)

✅ (link bisa dibuka di HP)

Tingkat kesulitan

Gampang, ±10 menit

Menengah, ±30 menit

Kalau baru coba-coba, mulai dari A. Kalau mau pakai dari HP, ambil B.

Langkah 0 (wajib, dua-duanya): bikin API key Yorai

  1. Login ke https://yorai.id, pastikan ada saldo kredit

  2. Buka https://yorai.id/app/api → bikin API key baru

  3. Salin key-nya (diawali yk_). Jangan dibagi ke siapa pun.


Related MCP server: topview-mcp-server

A. Pasang lokal di PC (Claude Desktop)

A1. Install Node.js

Download versi LTS di https://nodejs.org lalu install. Cek di PowerShell / Terminal:

node -v

Harus muncul v20 atau lebih baru.

A2. Download repo ini

Pakai Git:

git clone https://github.com/mybrolabs/yorai-mcp.git
cd yorai-mcp
npm install

Atau tanpa Git: klik tombol hijau Code → Download ZIP di halaman GitHub, extract (misal ke C:\yorai-mcp), lalu di folder itu jalankan npm install.

A3. Daftarkan ke Claude Desktop

Buka file config Claude Desktop:

  • Windows: tekan Win + R, ketik %APPDATA%\Claude, buka claude_desktop_config.json

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

(Kalau belum ada, buat aja file baru dengan nama itu.)

Isi seperti ini. Ganti path dan API key-nya:

{
  "mcpServers": {
    "yorai": {
      "command": "node",
      "args": ["C:\\yorai-mcp\\dist\\index.js"],
      "env": {
        "YORAI_API_KEY": "yk_isi_key_lu_di_sini",
        "YORAI_DOWNLOAD_DIR": "C:\\Users\\NAMA_LU\\Downloads\\yorai"
      }
    }
  }
}

Di Windows, backslash di path harus dobel (\\). Kalau file-nya udah ada isi mcpServers lain, tambahin blok "yorai": {...} di dalamnya, jangan bikin mcpServers kedua.

A4. Restart & tes

Tutup Claude Desktop sampai benar-benar keluar (cek system tray), buka lagi, lalu ketik di chat:

Cek saldo Yorai gue

Kalau saldo muncul, berarti udah jalan. Hasil generate otomatis tersimpan ke folder YORAI_DOWNLOAD_DIR.

Pakai Claude Code? Cukup satu perintah:

claude mcp add yorai --scope user -e YORAI_API_KEY=yk_xxx -- node /path/ke/yorai-mcp/dist/index.js

B. Pasang online di VPS (bisa dipakai dari HP)

Panduan ini pakai VPS Hostinger dengan template n8n (udah ada Docker + Traefik + HTTPS otomatis). VPS lain juga bisa, lihat VPS selain Hostinger.

B1. Fork repo ini (disarankan)

Klik Fork di kanan atas halaman GitHub. Container di VPS bakal narik kode dari repo setiap kali restart, jadi lebih aman pakai fork lu sendiri: kode yang jalan di server lu cuma berubah kalau lu yang ubah.

B2. Siapin subdomain

Di pengelola DNS domain lu (Hostinger, Cloudflare, dll), tambah record:

Type

Name

Value

A

yorai-mcp

IP VPS lu

Hasilnya misalnya yorai-mcp.domainlu.com. Kalau pakai Cloudflare, set ke DNS only (awan abu-abu) supaya sertifikat HTTPS bisa dibuat.

B3. Bikin secret

Secret ini jadi "password" connector lu. Di terminal VPS (atau PC yang ada OpenSSL):

openssl rand -hex 24

Simpan hasilnya.

B4. Jalankan container

SSH ke VPS, lalu:

mkdir -p /docker/yorai-mcp && cd /docker/yorai-mcp
wget -O docker-compose.yml https://raw.githubusercontent.com/mybrolabs/yorai-mcp/main/deploy/docker-compose.vps.yml
nano .env

Isi .env (ganti semua nilainya):

YORAI_API_KEY=yk_isi_key_lu
MCP_SECRET=hasil_openssl_tadi
DOMAIN=yorai-mcp.domainlu.com
YORAI_MCP_REPO=USERNAME_GITHUB_LU/yorai-mcp

Simpan (Ctrl+O, Enter, Ctrl+X), lalu jalankan:

docker compose up -d
sleep 20 && docker compose logs --tail 5

Kalau muncul kode-terbaru-terpasang dan yorai-mcp HTTP on ..., server udah jalan. Cek juga di browser HP: buka https://yorai-mcp.domainlu.com/health, harus keluar {"ok":true}.

B5. Sambungkan ke claude.ai

  1. Buka claude.ai → Settings → Connectors → Add custom connector

  2. Name: Yorai

  3. URL:

    https://yorai-mcp.domainlu.com/mcp/MCP_SECRET_LU
  4. Simpan, lalu tes di chat baru: "Cek saldo Yorai gue"

⚠️ URL connector itu berisi secret lu. Perlakukan kayak password: jangan di-screenshot ke grup, jangan di-share. Siapa pun yang pegang URL itu bisa pakai kredit Yorai lu.

Fitur khusus mode online

  • Upload dari HP: bilang ke Claude "gue mau upload foto". Claude kasih link upload (berlaku 30 menit, maks 10 file). Upload dari browser HP, bilang "udah", Claude langsung pakai fotonya.

  • Link download: setiap hasil yang di-download Claude dapat link https://domain-lu/f/... yang bisa langsung dibuka di HP. Tambah ?dl=1 di akhir link untuk paksa download. Link-nya ditandatangani pakai MCP_SECRET, jadi nggak bisa ditebak orang, dan tetap jalan walaupun container restart.

  • Hasil tersimpan di volume Docker yorai_data (folder /data/hasil di dalam container). Server Yorai sendiri hapus hasil setelah 14 hari, jadi salinan di VPS ini yang awet.

Update ke versi terbaru

Kalau pakai fork: di GitHub buka fork lu → Sync fork → Update branch. Lalu di VPS:

cd /docker/yorai-mcp && docker compose restart

VPS selain Hostinger n8n

File compose di atas numpang network n8n_default dan Traefik dari template n8n. Kalau VPS lu nggak punya itu, cara paling simpel:

git clone https://github.com/USERNAME_GITHUB_LU/yorai-mcp.git && cd yorai-mcp
cp .env.example .env   # isi YORAI_API_KEY, MCP_SECRET, PUBLIC_URL=https://yorai-mcp.domainlu.com
docker build -t yorai-mcp .
docker run -d --restart unless-stopped -p 127.0.0.1:3333:3333 --env-file .env -v yorai_data:/data -e YORAI_DOWNLOAD_DIR=/data/hasil yorai-mcp

Lalu pasang reverse proxy HTTPS di depannya, misalnya Caddy:

yorai-mcp.domainlu.com {
    reverse_proxy 127.0.0.1:3333
}

Troubleshooting

Masalah

Penyebab & solusi

Claude nggak kenal tool Yorai

Lokal: restart Claude Desktop sampai benar-benar keluar, cek path di config (backslash dobel). Online: cek URL connector, buka chat baru.

Kunci API tidak valid

YORAI_API_KEY salah atau udah di-revoke. Bikin baru di yorai.id/app/api.

Saldo kurang

Top up di yorai.id.

/health nggak bisa dibuka

DNS belum nyambung (tunggu beberapa menit), Cloudflare masih proxied (oranye), atau container mati (docker compose logs).

Container langsung mati, log MCP_SECRET wajib di-set

MCP_SECRET kosong atau kurang dari 24 karakter.

Link yorai.id/api/v1/files/... error invalid_api_key di browser

Itu link API, bukan link download. Minta Claude download hasilnya, nanti dapat link /f/....

Lupa / bocor MCP_SECRET

Ganti di .env, docker compose up -d, lalu update URL connector di claude.ai. Link download lama ikut mati.


Daftar tools

Tool

Fungsi

Makan kredit

yorai_balance

Saldo available/held (+ konversi Rupiah)

–

yorai_list_models

Katalog model, filter category/type/provider

–

yorai_get_model

Nama input, opsi, batas, rules & harga satu model

–

yorai_quote

Hitung biaya tanpa bikin job

–

yorai_create_job

Generate. Quote dulu otomatis, ditolak kalau > max_credits

✅

yorai_get_job

Status + output, bisa nunggu (wait_seconds ≤ 55)

–

yorai_list_jobs / yorai_cancel_job

Riwayat / batalin job yang masih queued

–

yorai_upload_file

Upload dari URL publik atau path lokal → file ID

–

yorai_download_file

Simpan output ke disk; mode online juga balikin download_url

–

yorai_chat

Model teks (format OpenAI)

✅ kecil

yorai_upload_link

(online) Link upload sekali pakai dari HP

–

yorai_upload_status

(online) Cek hasil link upload → file ID

–

Setiap job otomatis dapat Idempotency-Key, jadi retry dengan key yang sama nggak kena charge dua kali.

Environment

Variabel

Wajib

Default

YORAI_API_KEY

ya

–

YORAI_BASE_URL

tidak

https://yorai.id/api/v1

YORAI_DOWNLOAD_DIR

tidak

~/Downloads/yorai

MCP_SECRET

mode online

– (minimal 24 karakter)

PUBLIC_URL

tidak (mode online)

– (aktifin link upload & link download)

PORT / HOST

tidak

3333 / 127.0.0.1

DOMAIN, YORAI_MCP_REPO

khusus deploy/docker-compose.vps.yml

– / mybrolabs/yorai-mcp

Develop

npm install
npm run build   # src/*.ts → dist/

dist/ ikut di-commit supaya container VPS nggak perlu build. Setelah ubah src/, jalankan npm run build sebelum commit.

Lisensi

MIT. Bebas dipakai, diubah, dan dibagi.

Available Tools

11 tools
yorai_balanceYorai balanceA
Read-only

Check available and held Yorai credits (1 credit = IDR 1,000).

Inputs: no named parameters.

yorai_cancel_jobCancel a Yorai jobA

Cancel a queued job and release its credit hold. Running jobs cannot be cancelled (409).

Inputs: id (required).

yorai_chatYorai chat completionB

Run a text chat model from the Yorai catalog (OpenAI chat.completion format, no streaming, text only). Spends a small amount of credits.

Inputs: messages (required), model, max_tokens, temperature.

yorai_create_jobCreate a Yorai jobA

Start an image/video/audio generation. SPENDS CREDITS. The server quotes first and refuses if the hold exceeds max_credits. Returns the job; then poll yorai_get_job. Pass the same idempotency_key when retrying an ambiguous failure so you are not charged twice.

Inputs: input (required), model (required), max_credits (required), type, +2 more.

yorai_download_fileDownload a Yorai fileC

Save a Yorai file (e.g. a job output id) to disk on the machine running this MCP server. Yorai purges results after 14 days. Default folder: YORAI_DOWNLOAD_DIR or ~/Downloads/yorai.

Inputs: id (required), filename, save_dir.

yorai_get_jobGet a Yorai jobA
Read-only

Get a job's status and outputs. Set wait_seconds (max 55) to poll until it finishes or the wait ends. Status: queued, running, succeeded, failed.

Inputs: id (required), wait_seconds.

yorai_get_modelGet Yorai modelA
Read-only

Get one model's generation types, exact input names/options/limits, linkage rules and prices. Call before quoting or creating a job.

Inputs: slug (required).

yorai_list_jobsList Yorai jobsB
Read-only

List recent jobs, newest first. Use next_cursor for more.

Inputs: limit, cursor.

yorai_list_modelsList Yorai modelsA
Read-only

List models in the Yorai catalog with their starting price. Filter by category (chat, image, video, audio), type or provider slug.

Inputs: type, search, category, provider.

yorai_quoteQuote a Yorai jobA
Read-only

Price a request without starting a job or holding credits. Returns credits, upTo and line items. Free.

Inputs: input (required), model (required), type.

yorai_upload_fileUpload a file to YoraiA

Upload an image (PNG/JPEG/WebP ≤30 MB), video (MP4/MOV/WebM ≤95 MB, 2–60 s) or audio (MP3/WAV/M4A/AAC/OGG ≤95 MB) and get a file ID for job inputs. Give either a public https URL (the server downloads it) or a local path on the machine running this MCP server.

Inputs: url, path, filename.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool targets a clearly distinct action/resource: catalog lookup, quoting, job lifecycle, file transfer, balance, and chat. The only potential overlap between quote and create_job is explicitly resolved by the descriptions.

    Naming Consistency4/5

    All tools use snake_case with a consistent yorai_ prefix and mostly follow verb_noun form. A few names like yorai_balance, yorai_quote, and yorai_chat are bare actions/nouns, but they remain predictable and readable.

    Tool Count5/5

    The 11 tools form a well-scoped surface covering the necessary operations without obvious redundancy. Each tool earns its place across catalog, billing, jobs, files, and chat.

    Completeness5/5

    The surface covers model discovery, pricing, job creation/polling/listing/cancellation, file upload/download, balance checking, and text chat. Core workflows have no obvious dead ends; minor extras like file listing or deletion are not essential for the stated purpose.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables Claude to generate videos and images via TopView.ai's API, including text-to-video, image-to-video, text-to-image, and image editing.
      -
    • A
      license
      B
      quality
      C
      maintenance
      Enables Claude Code to call local generative AI services on a LAN, letting users list and chat with Ollama models and list checkpoints, LoRAs, and samplers or generate and save images via Stable Diffusion WebUI Forge Neo. Requests can be made in natural language, with per-call options for model, image size, and Hires.fix settings.
      1
      MIT