nirva|deploy

🛠 API Reference

MCP Tools Reference

16 MCP tools — ใช้ผ่าน Claude/Manus/GPT หรือเรียก programmatic

เอกสารเต็มที่ docs/tools-reference.md · ดูภาษา MCP ที่ modelcontextprotocol.io

Quick start

1. Install MCP server:

git clone https://github.com/Nirvacore/nirvadeploy.git
cd nirvadeploy-mcp
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

2. Set RAILWAY_TOKEN:

cp .env.example .env  # then edit RAILWAY_TOKEN=xxx

3. Connect to Claude Desktop — see full guide

📖 READ (8)

nirvadeploy_list_projects

แสดงรายชื่อโปรเจกต์ทั้งหมดของบัญชี

📖 READ

AI prompt example:

"ดูโปรเจกต์ใน NirvaDeploy ที"

nirvadeploy_list_services

ดู services + สถานะ deployment ล่าสุดในโปรเจกต์

📖 READ

Input:

  • project_id: stringrequiredID โปรเจกต์

AI prompt example:

"services ใน project nirvacore มีอะไรบ้าง"

nirvadeploy_list_environments

ดู production / staging / preview environments

📖 READ

Input:

  • project_id: stringrequiredID โปรเจกต์

nirvadeploy_list_deployments

ประวัติการ deploy ของ service (10 ล่าสุด default)

📖 READ

Input:

  • service_id: stringrequiredID service
  • limit: int (1-100)Default 10

nirvadeploy_list_variables

ดู env variables — default แสดงแค่ชื่อ (กัน secret หลุด)

📖 READ

Input:

  • project_id: stringrequired
  • service_id: stringrequired
  • environment_id: stringrequired
  • reveal_values: boolDefault false. ระวัง — secret อาจอยู่ใน output

nirvadeploy_get_logs

ดู logs ของ deployment ที่ระบุ

📖 READ

Input:

  • deployment_id: stringrequiredID deployment
  • limit: int (1-1000)Default 100

nirvadeploy_get_metrics

CPU / RAM / network usage ของ service ใน 1 ชม. ล่าสุด

📖 READ

Input:

  • service_id: stringrequired

nirvadeploy_list_templates

ดู Thai-focused templates (10 ตัว: free + premium)

📖 READ

Input:

  • category: string?scraping | line | parser | nlp | other | all
  • free_only: boolDefault false

✏️ WRITE (6)

nirvadeploy_redeploy_service

สั่ง deploy service ใหม่

✏️ WRITE

Input:

  • service_id: stringrequired

nirvadeploy_set_variable

ตั้ง env variable (upsert — idempotent)

✏️ WRITE

Input:

  • project_id: stringrequired
  • service_id: stringrequired
  • environment_id: stringrequired
  • name: string (≤100)requiredเช่น DATABASE_URL
  • value: stringrequired

nirvadeploy_create_project_from_repo

สร้างโปรเจกต์ใหม่จาก GitHub repo (auto-detect Nixpacks)

✏️ WRITE

Input:

  • repo: stringrequiredowner/repo หรือ URL เต็ม
  • name: string?ชื่อโปรเจกต์ (default = repo name)
  • branch: stringDefault main

nirvadeploy_rollback_deployment

Rollback ไป deployment เก่า

✏️ WRITE

Input:

  • deployment_id: stringrequiredTarget deployment

nirvadeploy_scale_service

เปลี่ยนจำนวน replicas (1-10) — horizontal scaling

✏️ WRITE

Input:

  • service_id: stringrequired
  • replicas: int (1-10)required1 = no scale, 2+ = horizontal

nirvadeploy_deploy_template

Deploy template จาก marketplace

✏️ WRITE

Input:

  • slug: stringrequiredเช่น line-bot-starter
  • project_name: string?
  • env: dict?Required env vars for template

🤝 AFFILIATE (1)

nirvadeploy_get_referral_link

ได้ affiliate link ของ user (สำหรับ AI ช่วย share)

🤝 AFFILIATE

Input:

  • source: string?utm_source (twitter, blog, line-oa)
  • to: string?Deep-link path (default /)

⚠️ DESTRUCTIVE (1)

nirvadeploy_delete_service

⚠️ ลบ service ถาวร — ต้องส่ง confirm=True

⚠️ DESTRUCTIVE

Input:

  • service_id: stringrequired
  • confirm: boolrequiredต้อง true เท่านั้น (default false)

📐 MCP Annotation reference

ทุก tool มี annotations 4 ตัวเพื่อบอก AI client ว่าทำงานยังไง

Flagถ้า True
readOnlyHintAI เรียกได้อิสระไม่ต้องถาม user
destructiveHintAI ต้องขอ confirm จาก user ก่อนเรียก
idempotentHintAI retry ได้อย่างปลอดภัย
openWorldHintAI ไม่ควร cache ผล