เอกสาร MCP / API

เชื่อมต่อ AI agent เข้ากับเครื่องมือ AliceTears ผ่าน MCP

1. สร้าง API Token

ล็อกอินก่อน แล้วสร้าง API Token ส่วนตัว จะแสดงให้เห็นครั้งเดียว คัดลอกเก็บไว้ให้ดี

สร้าง Token →
2. เชื่อมต่อ MCP client

ตั้งค่า MCP client ที่รองรับ (Claude Desktop, Claude Code ฯลฯ) ให้ชี้ไปที่ endpoint ด้านล่าง พร้อมใส่ Token เป็น Bearer header

claude_desktop_config.json
{
  "mcpServers": {
    "alicetears": {
      "url": "https://alicetears.com/api/mcp",
      "headers": {
        "Authorization": "Bearer selat_..."
      }
    }
  }
}
3. เครื่องมือที่ใช้ได้
translate_text

แปลภาษาระหว่างไทย อังกฤษ จีน (繁) ญี่ปุ่น และเกาหลี ฟรี จำกัดวันละ 20 ครั้งต่อบัญชี

  • text · string — ข้อความที่จะแปล
  • target · "th" | "en" | "zh-TW" | "ja" | "ko" — รหัสภาษาปลายทาง
generate_caption

สร้างแคปชั่น 3 แบบพร้อมแฮชแท็กจากหัวข้อ เสียเหรียญต่อครั้ง หักจากยอดเหรียญของบัญชี

  • topic · string — โพสต์นี้เกี่ยวกับอะไร
  • platform · "instagram" | "tiktok" | "twitter" | "youtube" — ไม่บังคับ
  • tone · "playful" | "professional" | "hype" | "heartfelt" — ไม่บังคับ
generate_stream_title

สร้างชื่อสตรีม 5 แบบ พร้อมแท็กและคำอธิบายสั้นๆ จากหัวข้อ/เกม เสียเหรียญต่อครั้ง หักจากยอดเหรียญของบัญชี

  • topic · string — เกมหรือหัวข้อที่กำลังสตรีม
  • platform · "twitch" | "youtube" — ไม่บังคับ
  • vibe · "hype" | "chill" | "funny" | "serious" — ไม่บังคับ
generate_greeting

สร้างคำอวยพร 5 แบบสำหรับโอกาสต่างๆ ปรับใส่ชื่อผู้รับได้ เสียเหรียญต่อการเรียกใช้หนึ่งครั้ง

  • occasion · "birthday" | "newyear" | "wedding" | "songkran" | "graduation" | "thankyou" | "getwell" | "farewell" — โอกาสที่ต้องการคำอวยพร
  • recipientName · string — ไม่บังคับ
  • tone · "warm" | "formal" | "funny" | "poetic" — ไม่บังคับ
suggest_envelope_amount

แนะนำช่วงเงินใส่ซองตามงานและความสัมพันธ์ เป็นคำแนะนำมารยาททางสังคม ไม่ใช่คำแนะนำทางการเงิน เสียเหรียญต่อการเรียกใช้หนึ่งครั้ง

  • event · "wedding" | "ordination" | "funeral" | "newborn" | "housewarming" | "openingceremony" | "chinesenewyear" | "graduation" — งานที่ต้องการใส่ซอง
  • relationship · "family" | "closefriend" | "friend" | "colleague" | "acquaintance" | "boss" — ความสัมพันธ์กับเจ้าของงาน
  • notes · string — ไม่บังคับ
detect_ai_text

ตรวจว่าข้อความมาจาก AI ไหม แยกรายท่อนว่าเป็นคนเขียน AI เขียน AI แปล หรือ AI เกลา พร้อม % ต่อประเภท ฟรีวันละ 5 ครั้ง (รวมกับหน้าเว็บ) จากนั้นคิดตามจำนวน token ของข้อความ

  • text · string — ข้อความที่จะตรวจ (50–10,000 ตัวอักษร)
  • locale · "th" | "en" | "zh-TW" — ไม่บังคับ

มีเครื่องมือเพิ่มเติมมาเรื่อยๆ — เรียก tools/list เพื่อดูรายการปัจจุบัน

4. หรือเรียกตรงด้วย curl
curl
curl -X POST https://alicetears.com/api/mcp \
  -H "Authorization: Bearer selat_..." \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "translate_text",
      "arguments": { "text": "สวัสดีค่ะ", "target": "en" }
    }
  }'