ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที เข้าสู่ระบบด้วย Google เพื่อเขียนรีวิวได้แล้วต้นแบบ · อัปเดตทุก 30 นาที
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · วิธีติดตั้งภาษาไทยทุกตัว

WhatsApp Web MCP Server

โดย mario-andreschakรุ่น 1.2.0i★ 31iรันบนเครื่องหน้า repo ↗
ชื่อใน registryio.github.mario-andreschak/mcp-whatsapp-web

วิธีติดตั้ง

ใช้ทำอะไรได้

เครื่องมือ MCP สำหรับเชื่อมต่อ WhatsApp ผ่าน web.js หรือ Baileys แบบไม่ใช้เบราว์เซอร์ ใช้จัดการข้อความ ไฟล์มีเดีย แชต กลุ่ม และรายชื่อผู้ติดต่อได้

แปลอัตโนมัติจากคำอธิบายของผู้ทำ · ทีมยังไม่ได้ตรวจ

  • ต่อแบบ ติดตั้งในเครื่อง
  • บัญชีหรือคีย์ ไม่ต้องใส่คีย์ · ต้องกรอกค่าตั้ง 1 ช่อง (BROWSER_EXECUTABLE_PATH)
  • หมวด แชตและอีเมล
คำอธิบายต้นฉบับจากผู้ทำ (อังกฤษ)
WhatsApp MCP via web.js or browserless Baileys: messages, media, chats, groups and contacts

ทำไมอยู่อันดับนี้

หน้ารายการเรียงด้วยคะแนนการใช้งาน (เต็ม 100) จากส่วนเหล่านี้

ความนิยม18/80ดาว GitHub หรือยอดดาวน์โหลดต่อสัปดาห์ ค่ามากนับ 60 ค่าน้อยนับ 20
ความสด12/12ออกรุ่นหรือแก้โค้ดใน 30 วัน ได้เต็ม
ระบบยังตอบ0/8endpoint บนคลาวด์ตอบตอนตรวจล่าสุด
คะแนนการใช้งาน30/100

คุณภาพ: ผลตรวจเบื้องต้นผ่าน 3/3 ข้อ (แสดงให้ดู ไม่ได้ใช้เรียง) · ความมาแรง: ยังไม่มีข้อมูล (ใช้เรียงเฉพาะแท็บมาแรง)

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ให้ AI ติดตั้งให้ด้วยประโยคเดียว

ติดตั้ง WhatsApp Web MCP Server ให้หน่อย ทำตาม https://mcp.popnx.com/i/mario-andreschak-mcp-whatsapp-web.md แสดงคำสั่งให้ฉันดูและรอฉันตกลงก่อนรัน

คัดลอกไปวางในแชตของ AI ที่ทำงานในเครื่องคุณได้ (เช่น Claude Code, Cursor) · AI จะอ่านขั้นตอนจากเรา แสดงคำสั่งให้ดู และรอคุณตกลงก่อน · ไม่ต้องใช้คีย์ ไม่ต้องสมัคร · ดูข้อความเต็มที่ AI จะอ่าน

ผลตรวจผ่าน 3/3 · ทำงานบนเครื่องคุณ · ✓ ตรวจคำสั่งแล้ว 14 พ.ย. 2569

ขั้นแรก: คุณใช้ AI ตัวไหน

เลือกแอปที่คุณใช้ ขั้นตอนจะขึ้นด้านล่าง

ต่อกับ Claude ได้ แต่ต้องเตรียมก่อน

ต้องกรอกค่าตั้ง 1 ช่อง (BROWSER_EXECUTABLE_PATH) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ

ให้ AI ติดตั้งให้

คัดลอกข้อความนี้ไปวางในแชตของ Claude AI จะเช็กเครื่อง บอกว่าจะแก้ไฟล์ไหน และรอคุณตกลงก่อนทุกครั้ง

ช่วยติดตั้ง MCP server ชื่อ WhatsApp Web MCP Server ให้ Claude ในเครื่องนี้ ทำตามลำดับ 1) เช็กว่ามี Node.js ด้วยคำสั่ง node -v ถ้าไม่มี ให้บอกฉันไปลงจาก https://nodejs.org/en/download ห้ามลงเอง 2) ใช้คอนฟิกนี้เท่านั้น (ผ่านตัวตรวจของ PopNx MCP แล้ว): { "mcpServers": { "whatsapp-web": { "command": "npx", "args": [ "-y", "mcp-whatsapp-web" ], "env": { "BROWSER_EXECUTABLE_PATH": "ใส่ค่าของคุณ" } } } } 3) บอก path เต็มของไฟล์ที่จะแก้ หรือคำสั่งที่จะรัน แล้วรอฉันตกลงก่อน 4) ช่อง BROWSER_EXECUTABLE_PATH ให้คงคำว่า "ใส่ค่าของคุณ" ไว้ก่อน แล้วบอกให้ฉันวางค่าจริงเองในไฟล์หรือช่องของแอป ห้ามขอให้ฉันพิมพ์คีย์ในแชต 5) ทำตามที่ตกลง แล้วตรวจว่าเครื่องมือของ WhatsApp Web MCP Server ขึ้นจริง

ข้อความนี้ไม่มีคีย์ของคุณ ถ้าต้องใช้คีย์ AI จะบอกให้คุณวางเองในไฟล์หรือช่องของแอป

  1. ลง Node.js ในเครื่อง (ถ้ายังไม่มี)

    ลงไว้แล้วหรือยัง? เช็กก่อน · เปิด Terminal แล้วพิมพ์คำสั่งนี้ กด Enter

    node -v
    • ขึ้นเลขรุ่น เช่น v26.13.1 = ลงแล้ว ข้ามขั้นนี้ได้
    • ขึ้นว่า "command not found" (Windows ขึ้นว่า "is not recognized") = ยังไม่ได้ลง หรือเพิ่งลงแต่ยังไม่ได้ปิดแล้วเปิด Terminal ใหม่
    เปิด Terminal ยังไง

    Mac: กด ⌘ + Space พิมพ์ Terminal แล้วกด Enter

    Windows: เปิดเมนู Start พิมพ์ Windows PowerShell แล้วกด Open

    ยังไม่ได้ลง: เปิดหน้าดาวน์โหลดทางการ เลือกรุ่น LTS แล้วเลือกตัวติดตั้งแบบกดเอง: Mac ไฟล์ .pkg · Windows ไฟล์ .msi ดับเบิลคลิกแล้วกดถัดไปจนจบ ไม่ต้องใช้คำสั่ง curl

    เปิดหน้าดาวน์โหลด Node.js ↗

    ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น: node -v

    ลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Node.js

  2. กรอกค่าตั้ง 1 ช่อง

    ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย

    • BROWSER_EXECUTABLE_PATH เฉพาะ webjs: ไฟล์โปรแกรมเบราว์เซอร์ Chrome และ Edge ถูกตรวจพบโดยอัตโนมัติ ตั้งค่านี้เพื่อใช้เบราว์เซอร์ที่กำหนด จำเป็นต้องใช้ Chrome/Edge สำหรับการส่งวิดีโอและ GIF
      ดูต้นฉบับภาษาอังกฤษwebjs only: browser executable. Chrome and Edge are auto-detected; set this to use a specific browser. Chrome/Edge is required for sending videos and GIFs.

    คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

  3. เปิดไฟล์ตั้งค่าของแอป Claude บนคอม

    SettingsDeveloperEdit Config

  4. วางค่าตั้งนี้แล้วบันทึกไฟล์

    {
      "mcpServers": {
        "whatsapp-web": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-whatsapp-web"
          ],
          "env": {
            "BROWSER_EXECUTABLE_PATH": "ใส่ค่าของคุณ"
          }
        }
      }
    }
  5. ปิดแอป Claude แล้วเปิดใหม่

  6. ลองเลย

    ใช้ WhatsApp Web MCP Server บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude บอกว่ากำลังใช้ WhatsApp Web MCP Server หรือมีชื่อเครื่องมือของ WhatsApp Web MCP Server ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ค่าตั้งเพิ่มเติม 15 ช่อง (ไม่ต้องกรอกก็ใช้ได้)

คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ

  • WHATSAPP_BACKEND แบ็กเอนด์ WhatsApp: webjs ใช้โปรไฟล์เบราว์เซอร์แบบถาวร baileys เชื่อมต่อโดยไม่ใช้เบราว์เซอร์และต้องจับคู่แยกต่างหาก
    ดูต้นฉบับภาษาอังกฤษWhatsApp backend: webjs uses a persistent browser profile; baileys connects without a browser and requires separate pairing
    · ค่าเริ่มต้น webjs
  • BAILEYS_SESSION_DIR ไดเรกทอรีข้อมูลรับรองและประวัติที่ซิงโครไนซ์ของ Baileys (ค่าเริ่มต้น: /baileys-sessions) ใช้พาธแบบ absolute ส่วนตัวที่เป็นของโปรเซสเซิร์ฟเวอร์เพียงหนึ่งตัว
    ดูต้นฉบับภาษาอังกฤษBaileys credentials and synchronized history directory (default: /baileys-sessions). Use a private absolute path, owned by one server process.
  • LOG_LEVEL ระดับการบันทึกล็อกสำหรับไฟล์ล็อก (logs/mcp-whatsapp.log)
    ดูต้นฉบับภาษาอังกฤษLog level for the log file (logs/mcp-whatsapp.log)
    · ค่าเริ่มต้น info
  • LOG_STDERR_LEVEL ระดับการบันทึกล็อกสำหรับ stderr (มองเห็นได้ในล็อกของ MCP client ส่วนใหญ่)
    ดูต้นฉบับภาษาอังกฤษLog level for stderr (visible in most MCP client logs)
    · ค่าเริ่มต้น warn
  • WHATSAPP_HEADLESS เฉพาะ webjs: ตั้งเป็น false เพื่อแสดงหน้าต่างเบราว์เซอร์แทนการทำงานแบบ headless
    ดูต้นฉบับภาษาอังกฤษwebjs only: set to false to show the browser window instead of running headless
  • WHATSAPP_NO_SANDBOX เฉพาะ webjs: ปิดการใช้ sandbox ของเบราว์เซอร์อย่างชัดเจนสำหรับคอนเทนเนอร์ที่ต้องการ โดย sandbox เปิดใช้งานเป็นค่าเริ่มต้น
    ดูต้นฉบับภาษาอังกฤษwebjs only: explicitly disable the browser sandbox for containers that require it. The sandbox is enabled by default.
    · ค่าเริ่มต้น false
  • WHATSAPP_SESSION_DIR เฉพาะ webjs: ไดเรกทอรีโปรไฟล์เบราว์เซอร์แบบคงอยู่ (ค่าเริ่มต้น: /whatsapp-sessions)
    ดูต้นฉบับภาษาอังกฤษwebjs only: persistent browser profile directory (default: /whatsapp-sessions)
  • WHATSAPP_PAIRING_PHONE_NUMBER การจับคู่ด้วยหมายเลขโทรศัพท์: เมื่อกำหนดค่า (รูปแบบสากลไม่มีสัญลักษณ์ เช่น 4915112345678) รหัสจับคู่ 8 ตัวอักษรจะถูกบันทึกไปยัง stderr เมื่อเริ่มต้น แทนการใช้คิวอาร์โค้ด
    ดูต้นฉบับภาษาอังกฤษPhone number pairing: when set (international, symbol-free format, e.g. 4915112345678), an 8-character pairing code is logged to stderr on startup instead of relying on the QR code
  • FFMPEG_PATH เส้นทางไปยังไบนารี ffmpeg (จำเป็นเฉพาะเมื่อต้องการแทนที่ ffmpeg ที่ติดตั้งอัตโนมัติผ่านแพ็กเกจ npm ffmpeg-static)
    ดูต้นฉบับภาษาอังกฤษPath to an ffmpeg binary (only needed to override the ffmpeg installed automatically via the ffmpeg-static npm package)
  • WA_WEB_VERSION เฉพาะ webjs: ตรึงเวอร์ชัน WhatsApp Web หากการอัปเดตฝั่ง WhatsApp ทำให้ไคลเอนต์ใช้งานไม่ได้
    ดูต้นฉบับภาษาอังกฤษwebjs only: pin the WhatsApp Web version if a WhatsApp-side update breaks the client.
  • HEALTH_CHECK_INTERVAL_MS webjs only: connection health check interval in milliseconds (<=0 disables) · ค่าเริ่มต้น 60000
  • TOOL_READY_TIMEOUT_MS ระยะเวลาที่คำสั่งเครื่องมือรอให้ไคลเอนต์ WhatsApp พร้อมใช้งาน ก่อนจะแสดงข้อผิดพลาด
    ดูต้นฉบับภาษาอังกฤษHow long tool calls wait for the WhatsApp client to become ready before erroring
    · ค่าเริ่มต้น 45000
  • MCP_HTTP_PORT เมื่อกำหนดค่านี้ จะเปิดเผย MCP endpoint ที่ http://127.0.0.1: /mcp (Streamable HTTP) เพิ่มเติมจากโปรเซสเดียวกัน
    ดูต้นฉบับภาษาอังกฤษWhen set, additionally exposes the MCP endpoint at http://127.0.0.1: /mcp (Streamable HTTP) from the same process
  • MCP_HTTP_HOST ที่อยู่ bind สำหรับ HTTP endpoint (อย่าเปิดสู่สาธารณะ; endpoint นี้ควบคุมบัญชี WhatsApp ส่วนตัวของคุณ)
    ดูต้นฉบับภาษาอังกฤษBind address for the HTTP endpoint (do not expose publicly; the endpoint controls your personal WhatsApp account)
    · ค่าเริ่มต้น 127.0.0.1
  • MCP_OAUTH เปิดใช้งาน OAuth สำหรับ HTTP endpoint: /mcp ต้องใช้ bearer token และไคลเอนต์ยืนยันตัวตนผ่านหน้าเว็บที่แสดง WhatsApp QR code / แบบฟอร์มการจับคู่
    ดูต้นฉบับภาษาอังกฤษEnable OAuth for the HTTP endpoint: /mcp requires a bearer token and clients authenticate via a browser page showing the WhatsApp QR code / pairing form

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ChatGPT ยังต่อ WhatsApp Web MCP Server ไม่ได้

WhatsApp Web MCP Server ต้องติดตั้งในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะตัวที่ทำงานบนเว็บ

คุณทำแบบนี้แทนได้

ก · ใช้แอปที่ต่อ WhatsApp Web MCP Server ได้

  • ต้องกรอกค่าตั้ง 1 ช่อง (BROWSER_EXECUTABLE_PATH) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ
  • ต้องกรอกค่าตั้ง 1 ช่อง (BROWSER_EXECUTABLE_PATH) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)
  • ต้องกรอกค่าตั้ง 1 ช่อง (BROWSER_EXECUTABLE_PATH) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)
  • ต้องกรอกค่าตั้ง 1 ช่อง (BROWSER_EXECUTABLE_PATH) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)

ข · ตัวอื่นในหมวด แชตและอีเมล ที่ต่อกับ ChatGPT ได้

เลือกจากตัวที่ใช้มากในหมวดเดียวกัน เฉพาะตัวที่ต่อด้วยที่อยู่ได้โดยไม่ต้องใส่คีย์

ต่อกับ Claude Code ได้ แต่ต้องเตรียมก่อน

ต้องกรอกค่าตั้ง 1 ช่อง (BROWSER_EXECUTABLE_PATH) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)

ให้ AI ติดตั้งให้

คัดลอกข้อความนี้ไปวางในแชตของ Claude Code AI จะเช็กเครื่อง บอกว่าจะแก้ไฟล์ไหน และรอคุณตกลงก่อนทุกครั้ง

ช่วยติดตั้ง MCP server ชื่อ WhatsApp Web MCP Server ให้ Claude Code ในเครื่องนี้ ทำตามลำดับ 1) เช็กว่ามี Node.js ด้วยคำสั่ง node -v ถ้าไม่มี ให้บอกฉันไปลงจาก https://nodejs.org/en/download ห้ามลงเอง 2) ใช้คอนฟิกนี้เท่านั้น (ผ่านตัวตรวจของ PopNx MCP แล้ว): claude mcp add --scope user whatsapp-web --env BROWSER_EXECUTABLE_PATH='ใส่ค่าของคุณ' -- npx -y mcp-whatsapp-web 3) บอก path เต็มของไฟล์ที่จะแก้ หรือคำสั่งที่จะรัน แล้วรอฉันตกลงก่อน 4) ช่อง BROWSER_EXECUTABLE_PATH ให้คงคำว่า "ใส่ค่าของคุณ" ไว้ก่อน แล้วบอกให้ฉันวางค่าจริงเองในไฟล์หรือช่องของแอป ห้ามขอให้ฉันพิมพ์คีย์ในแชต 5) ทำตามที่ตกลง แล้วตรวจว่าเครื่องมือของ WhatsApp Web MCP Server ขึ้นจริง

ข้อความนี้ไม่มีคีย์ของคุณ ถ้าต้องใช้คีย์ AI จะบอกให้คุณวางเองในไฟล์หรือช่องของแอป

  1. ลง Node.js ในเครื่อง (ถ้ายังไม่มี)

    ลงไว้แล้วหรือยัง? เช็กก่อน · เปิด Terminal แล้วพิมพ์คำสั่งนี้ กด Enter

    node -v
    • ขึ้นเลขรุ่น เช่น v26.13.1 = ลงแล้ว ข้ามขั้นนี้ได้
    • ขึ้นว่า "command not found" (Windows ขึ้นว่า "is not recognized") = ยังไม่ได้ลง หรือเพิ่งลงแต่ยังไม่ได้ปิดแล้วเปิด Terminal ใหม่
    เปิด Terminal ยังไง

    Mac: กด ⌘ + Space พิมพ์ Terminal แล้วกด Enter

    Windows: เปิดเมนู Start พิมพ์ Windows PowerShell แล้วกด Open

    ยังไม่ได้ลง: เปิดหน้าดาวน์โหลดทางการ เลือกรุ่น LTS แล้วเลือกตัวติดตั้งแบบกดเอง: Mac ไฟล์ .pkg · Windows ไฟล์ .msi ดับเบิลคลิกแล้วกดถัดไปจนจบ ไม่ต้องใช้คำสั่ง curl

    เปิดหน้าดาวน์โหลด Node.js ↗

    ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น: node -v

    ลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Node.js

  2. กรอกค่าตั้ง 1 ช่อง

    ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย

    • BROWSER_EXECUTABLE_PATH เฉพาะ webjs: ไฟล์โปรแกรมเบราว์เซอร์ Chrome และ Edge ถูกตรวจพบโดยอัตโนมัติ ตั้งค่านี้เพื่อใช้เบราว์เซอร์ที่กำหนด จำเป็นต้องใช้ Chrome/Edge สำหรับการส่งวิดีโอและ GIF
      ดูต้นฉบับภาษาอังกฤษwebjs only: browser executable. Chrome and Edge are auto-detected; set this to use a specific browser. Chrome/Edge is required for sending videos and GIFs.

    คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

  3. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: เปิด PowerShell

  4. วางคำสั่งนี้แล้วกด Enter

    claude mcp add --scope user whatsapp-web --env BROWSER_EXECUTABLE_PATH='ใส่ค่าของคุณ' -- npx -y mcp-whatsapp-web
  5. พิมพ์ /mcp ใน Claude Code

    ต้องเห็น WhatsApp Web MCP Server ในรายการและขึ้นว่าเชื่อมต่อแล้ว

  6. ลองเลย

    ใช้ WhatsApp Web MCP Server บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude Code บอกว่ากำลังใช้ WhatsApp Web MCP Server หรือมีชื่อเครื่องมือของ WhatsApp Web MCP Server ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ค่าตั้งเพิ่มเติม 15 ช่อง (ไม่ต้องกรอกก็ใช้ได้)

คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ

  • WHATSAPP_BACKEND แบ็กเอนด์ WhatsApp: webjs ใช้โปรไฟล์เบราว์เซอร์แบบถาวร baileys เชื่อมต่อโดยไม่ใช้เบราว์เซอร์และต้องจับคู่แยกต่างหาก
    ดูต้นฉบับภาษาอังกฤษWhatsApp backend: webjs uses a persistent browser profile; baileys connects without a browser and requires separate pairing
    · ค่าเริ่มต้น webjs
  • BAILEYS_SESSION_DIR ไดเรกทอรีข้อมูลรับรองและประวัติที่ซิงโครไนซ์ของ Baileys (ค่าเริ่มต้น: /baileys-sessions) ใช้พาธแบบ absolute ส่วนตัวที่เป็นของโปรเซสเซิร์ฟเวอร์เพียงหนึ่งตัว
    ดูต้นฉบับภาษาอังกฤษBaileys credentials and synchronized history directory (default: /baileys-sessions). Use a private absolute path, owned by one server process.
  • LOG_LEVEL ระดับการบันทึกล็อกสำหรับไฟล์ล็อก (logs/mcp-whatsapp.log)
    ดูต้นฉบับภาษาอังกฤษLog level for the log file (logs/mcp-whatsapp.log)
    · ค่าเริ่มต้น info
  • LOG_STDERR_LEVEL ระดับการบันทึกล็อกสำหรับ stderr (มองเห็นได้ในล็อกของ MCP client ส่วนใหญ่)
    ดูต้นฉบับภาษาอังกฤษLog level for stderr (visible in most MCP client logs)
    · ค่าเริ่มต้น warn
  • WHATSAPP_HEADLESS เฉพาะ webjs: ตั้งเป็น false เพื่อแสดงหน้าต่างเบราว์เซอร์แทนการทำงานแบบ headless
    ดูต้นฉบับภาษาอังกฤษwebjs only: set to false to show the browser window instead of running headless
  • WHATSAPP_NO_SANDBOX เฉพาะ webjs: ปิดการใช้ sandbox ของเบราว์เซอร์อย่างชัดเจนสำหรับคอนเทนเนอร์ที่ต้องการ โดย sandbox เปิดใช้งานเป็นค่าเริ่มต้น
    ดูต้นฉบับภาษาอังกฤษwebjs only: explicitly disable the browser sandbox for containers that require it. The sandbox is enabled by default.
    · ค่าเริ่มต้น false
  • WHATSAPP_SESSION_DIR เฉพาะ webjs: ไดเรกทอรีโปรไฟล์เบราว์เซอร์แบบคงอยู่ (ค่าเริ่มต้น: /whatsapp-sessions)
    ดูต้นฉบับภาษาอังกฤษwebjs only: persistent browser profile directory (default: /whatsapp-sessions)
  • WHATSAPP_PAIRING_PHONE_NUMBER การจับคู่ด้วยหมายเลขโทรศัพท์: เมื่อกำหนดค่า (รูปแบบสากลไม่มีสัญลักษณ์ เช่น 4915112345678) รหัสจับคู่ 8 ตัวอักษรจะถูกบันทึกไปยัง stderr เมื่อเริ่มต้น แทนการใช้คิวอาร์โค้ด
    ดูต้นฉบับภาษาอังกฤษPhone number pairing: when set (international, symbol-free format, e.g. 4915112345678), an 8-character pairing code is logged to stderr on startup instead of relying on the QR code
  • FFMPEG_PATH เส้นทางไปยังไบนารี ffmpeg (จำเป็นเฉพาะเมื่อต้องการแทนที่ ffmpeg ที่ติดตั้งอัตโนมัติผ่านแพ็กเกจ npm ffmpeg-static)
    ดูต้นฉบับภาษาอังกฤษPath to an ffmpeg binary (only needed to override the ffmpeg installed automatically via the ffmpeg-static npm package)
  • WA_WEB_VERSION เฉพาะ webjs: ตรึงเวอร์ชัน WhatsApp Web หากการอัปเดตฝั่ง WhatsApp ทำให้ไคลเอนต์ใช้งานไม่ได้
    ดูต้นฉบับภาษาอังกฤษwebjs only: pin the WhatsApp Web version if a WhatsApp-side update breaks the client.
  • HEALTH_CHECK_INTERVAL_MS webjs only: connection health check interval in milliseconds (<=0 disables) · ค่าเริ่มต้น 60000
  • TOOL_READY_TIMEOUT_MS ระยะเวลาที่คำสั่งเครื่องมือรอให้ไคลเอนต์ WhatsApp พร้อมใช้งาน ก่อนจะแสดงข้อผิดพลาด
    ดูต้นฉบับภาษาอังกฤษHow long tool calls wait for the WhatsApp client to become ready before erroring
    · ค่าเริ่มต้น 45000
  • MCP_HTTP_PORT เมื่อกำหนดค่านี้ จะเปิดเผย MCP endpoint ที่ http://127.0.0.1: /mcp (Streamable HTTP) เพิ่มเติมจากโปรเซสเดียวกัน
    ดูต้นฉบับภาษาอังกฤษWhen set, additionally exposes the MCP endpoint at http://127.0.0.1: /mcp (Streamable HTTP) from the same process
  • MCP_HTTP_HOST ที่อยู่ bind สำหรับ HTTP endpoint (อย่าเปิดสู่สาธารณะ; endpoint นี้ควบคุมบัญชี WhatsApp ส่วนตัวของคุณ)
    ดูต้นฉบับภาษาอังกฤษBind address for the HTTP endpoint (do not expose publicly; the endpoint controls your personal WhatsApp account)
    · ค่าเริ่มต้น 127.0.0.1
  • MCP_OAUTH เปิดใช้งาน OAuth สำหรับ HTTP endpoint: /mcp ต้องใช้ bearer token และไคลเอนต์ยืนยันตัวตนผ่านหน้าเว็บที่แสดง WhatsApp QR code / แบบฟอร์มการจับคู่
    ดูต้นฉบับภาษาอังกฤษEnable OAuth for the HTTP endpoint: /mcp requires a bearer token and clients authenticate via a browser page showing the WhatsApp QR code / pairing form

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ Cursor ได้ แต่ต้องเตรียมก่อน

ต้องกรอกค่าตั้ง 1 ช่อง (BROWSER_EXECUTABLE_PATH) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)

ให้ AI ติดตั้งให้

คัดลอกข้อความนี้ไปวางในแชตของ Cursor AI จะเช็กเครื่อง บอกว่าจะแก้ไฟล์ไหน และรอคุณตกลงก่อนทุกครั้ง

ช่วยติดตั้ง MCP server ชื่อ WhatsApp Web MCP Server ให้ Cursor ในเครื่องนี้ ทำตามลำดับ 1) เช็กว่ามี Node.js ด้วยคำสั่ง node -v ถ้าไม่มี ให้บอกฉันไปลงจาก https://nodejs.org/en/download ห้ามลงเอง 2) ใช้คอนฟิกนี้เท่านั้น (ผ่านตัวตรวจของ PopNx MCP แล้ว): { "mcpServers": { "whatsapp-web": { "command": "npx", "args": [ "-y", "mcp-whatsapp-web" ], "env": { "BROWSER_EXECUTABLE_PATH": "ใส่ค่าของคุณ" } } } } 3) บอก path เต็มของไฟล์ที่จะแก้ หรือคำสั่งที่จะรัน แล้วรอฉันตกลงก่อน 4) ช่อง BROWSER_EXECUTABLE_PATH ให้คงคำว่า "ใส่ค่าของคุณ" ไว้ก่อน แล้วบอกให้ฉันวางค่าจริงเองในไฟล์หรือช่องของแอป ห้ามขอให้ฉันพิมพ์คีย์ในแชต 5) ทำตามที่ตกลง แล้วตรวจว่าเครื่องมือของ WhatsApp Web MCP Server ขึ้นจริง

ข้อความนี้ไม่มีคีย์ของคุณ ถ้าต้องใช้คีย์ AI จะบอกให้คุณวางเองในไฟล์หรือช่องของแอป

  1. ลง Node.js ในเครื่อง (ถ้ายังไม่มี)

    ลงไว้แล้วหรือยัง? เช็กก่อน · เปิด Terminal แล้วพิมพ์คำสั่งนี้ กด Enter

    node -v
    • ขึ้นเลขรุ่น เช่น v26.13.1 = ลงแล้ว ข้ามขั้นนี้ได้
    • ขึ้นว่า "command not found" (Windows ขึ้นว่า "is not recognized") = ยังไม่ได้ลง หรือเพิ่งลงแต่ยังไม่ได้ปิดแล้วเปิด Terminal ใหม่
    เปิด Terminal ยังไง

    Mac: กด ⌘ + Space พิมพ์ Terminal แล้วกด Enter

    Windows: เปิดเมนู Start พิมพ์ Windows PowerShell แล้วกด Open

    ยังไม่ได้ลง: เปิดหน้าดาวน์โหลดทางการ เลือกรุ่น LTS แล้วเลือกตัวติดตั้งแบบกดเอง: Mac ไฟล์ .pkg · Windows ไฟล์ .msi ดับเบิลคลิกแล้วกดถัดไปจนจบ ไม่ต้องใช้คำสั่ง curl

    เปิดหน้าดาวน์โหลด Node.js ↗

    ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น: node -v

    ลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Node.js

  2. กรอกค่าตั้ง 1 ช่อง

    ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย

    • BROWSER_EXECUTABLE_PATH เฉพาะ webjs: ไฟล์โปรแกรมเบราว์เซอร์ Chrome และ Edge ถูกตรวจพบโดยอัตโนมัติ ตั้งค่านี้เพื่อใช้เบราว์เซอร์ที่กำหนด จำเป็นต้องใช้ Chrome/Edge สำหรับการส่งวิดีโอและ GIF
      ดูต้นฉบับภาษาอังกฤษwebjs only: browser executable. Chrome and Edge are auto-detected; set this to use a specific browser. Chrome/Edge is required for sending videos and GIFs.

    คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

  3. กดปุ่มนี้เพื่อเปิด Cursor

    เปิดใน Cursor

    Cursor จะถามยืนยันการติดตั้ง ให้กด Install

  4. ใส่คีย์ในช่องที่ว่างไว้

    ในค่าตั้งของ WhatsApp Web MCP Server ช่อง BROWSER_EXECUTABLE_PATH ยังว่าง ใส่คีย์ของคุณแล้วบันทึก

  5. เปิดแชตของ AI ใน Cursor โหมด Agent

  6. ลองเลย

    ใช้ WhatsApp Web MCP Server บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Cursor บอกว่ากำลังใช้ WhatsApp Web MCP Server หรือมีชื่อเครื่องมือของ WhatsApp Web MCP Server ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ค่าตั้งเพิ่มเติม 15 ช่อง (ไม่ต้องกรอกก็ใช้ได้)

คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ

  • WHATSAPP_BACKEND แบ็กเอนด์ WhatsApp: webjs ใช้โปรไฟล์เบราว์เซอร์แบบถาวร baileys เชื่อมต่อโดยไม่ใช้เบราว์เซอร์และต้องจับคู่แยกต่างหาก
    ดูต้นฉบับภาษาอังกฤษWhatsApp backend: webjs uses a persistent browser profile; baileys connects without a browser and requires separate pairing
    · ค่าเริ่มต้น webjs
  • BAILEYS_SESSION_DIR ไดเรกทอรีข้อมูลรับรองและประวัติที่ซิงโครไนซ์ของ Baileys (ค่าเริ่มต้น: /baileys-sessions) ใช้พาธแบบ absolute ส่วนตัวที่เป็นของโปรเซสเซิร์ฟเวอร์เพียงหนึ่งตัว
    ดูต้นฉบับภาษาอังกฤษBaileys credentials and synchronized history directory (default: /baileys-sessions). Use a private absolute path, owned by one server process.
  • LOG_LEVEL ระดับการบันทึกล็อกสำหรับไฟล์ล็อก (logs/mcp-whatsapp.log)
    ดูต้นฉบับภาษาอังกฤษLog level for the log file (logs/mcp-whatsapp.log)
    · ค่าเริ่มต้น info
  • LOG_STDERR_LEVEL ระดับการบันทึกล็อกสำหรับ stderr (มองเห็นได้ในล็อกของ MCP client ส่วนใหญ่)
    ดูต้นฉบับภาษาอังกฤษLog level for stderr (visible in most MCP client logs)
    · ค่าเริ่มต้น warn
  • WHATSAPP_HEADLESS เฉพาะ webjs: ตั้งเป็น false เพื่อแสดงหน้าต่างเบราว์เซอร์แทนการทำงานแบบ headless
    ดูต้นฉบับภาษาอังกฤษwebjs only: set to false to show the browser window instead of running headless
  • WHATSAPP_NO_SANDBOX เฉพาะ webjs: ปิดการใช้ sandbox ของเบราว์เซอร์อย่างชัดเจนสำหรับคอนเทนเนอร์ที่ต้องการ โดย sandbox เปิดใช้งานเป็นค่าเริ่มต้น
    ดูต้นฉบับภาษาอังกฤษwebjs only: explicitly disable the browser sandbox for containers that require it. The sandbox is enabled by default.
    · ค่าเริ่มต้น false
  • WHATSAPP_SESSION_DIR เฉพาะ webjs: ไดเรกทอรีโปรไฟล์เบราว์เซอร์แบบคงอยู่ (ค่าเริ่มต้น: /whatsapp-sessions)
    ดูต้นฉบับภาษาอังกฤษwebjs only: persistent browser profile directory (default: /whatsapp-sessions)
  • WHATSAPP_PAIRING_PHONE_NUMBER การจับคู่ด้วยหมายเลขโทรศัพท์: เมื่อกำหนดค่า (รูปแบบสากลไม่มีสัญลักษณ์ เช่น 4915112345678) รหัสจับคู่ 8 ตัวอักษรจะถูกบันทึกไปยัง stderr เมื่อเริ่มต้น แทนการใช้คิวอาร์โค้ด
    ดูต้นฉบับภาษาอังกฤษPhone number pairing: when set (international, symbol-free format, e.g. 4915112345678), an 8-character pairing code is logged to stderr on startup instead of relying on the QR code
  • FFMPEG_PATH เส้นทางไปยังไบนารี ffmpeg (จำเป็นเฉพาะเมื่อต้องการแทนที่ ffmpeg ที่ติดตั้งอัตโนมัติผ่านแพ็กเกจ npm ffmpeg-static)
    ดูต้นฉบับภาษาอังกฤษPath to an ffmpeg binary (only needed to override the ffmpeg installed automatically via the ffmpeg-static npm package)
  • WA_WEB_VERSION เฉพาะ webjs: ตรึงเวอร์ชัน WhatsApp Web หากการอัปเดตฝั่ง WhatsApp ทำให้ไคลเอนต์ใช้งานไม่ได้
    ดูต้นฉบับภาษาอังกฤษwebjs only: pin the WhatsApp Web version if a WhatsApp-side update breaks the client.
  • HEALTH_CHECK_INTERVAL_MS webjs only: connection health check interval in milliseconds (<=0 disables) · ค่าเริ่มต้น 60000
  • TOOL_READY_TIMEOUT_MS ระยะเวลาที่คำสั่งเครื่องมือรอให้ไคลเอนต์ WhatsApp พร้อมใช้งาน ก่อนจะแสดงข้อผิดพลาด
    ดูต้นฉบับภาษาอังกฤษHow long tool calls wait for the WhatsApp client to become ready before erroring
    · ค่าเริ่มต้น 45000
  • MCP_HTTP_PORT เมื่อกำหนดค่านี้ จะเปิดเผย MCP endpoint ที่ http://127.0.0.1: /mcp (Streamable HTTP) เพิ่มเติมจากโปรเซสเดียวกัน
    ดูต้นฉบับภาษาอังกฤษWhen set, additionally exposes the MCP endpoint at http://127.0.0.1: /mcp (Streamable HTTP) from the same process
  • MCP_HTTP_HOST ที่อยู่ bind สำหรับ HTTP endpoint (อย่าเปิดสู่สาธารณะ; endpoint นี้ควบคุมบัญชี WhatsApp ส่วนตัวของคุณ)
    ดูต้นฉบับภาษาอังกฤษBind address for the HTTP endpoint (do not expose publicly; the endpoint controls your personal WhatsApp account)
    · ค่าเริ่มต้น 127.0.0.1
  • MCP_OAUTH เปิดใช้งาน OAuth สำหรับ HTTP endpoint: /mcp ต้องใช้ bearer token และไคลเอนต์ยืนยันตัวตนผ่านหน้าเว็บที่แสดง WhatsApp QR code / แบบฟอร์มการจับคู่
    ดูต้นฉบับภาษาอังกฤษEnable OAuth for the HTTP endpoint: /mcp requires a bearer token and clients authenticate via a browser page showing the WhatsApp QR code / pairing form

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Cursor เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ VS Code ได้ แต่ต้องเตรียมก่อน

ต้องกรอกค่าตั้ง 1 ช่อง (BROWSER_EXECUTABLE_PATH) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)

ให้ AI ติดตั้งให้

คัดลอกข้อความนี้ไปวางในแชตของ VS Code AI จะเช็กเครื่อง บอกว่าจะแก้ไฟล์ไหน และรอคุณตกลงก่อนทุกครั้ง

ช่วยติดตั้ง MCP server ชื่อ WhatsApp Web MCP Server ให้ VS Code ในเครื่องนี้ ทำตามลำดับ 1) เช็กว่ามี Node.js ด้วยคำสั่ง node -v ถ้าไม่มี ให้บอกฉันไปลงจาก https://nodejs.org/en/download ห้ามลงเอง 2) ใช้คอนฟิกนี้เท่านั้น (ผ่านตัวตรวจของ PopNx MCP แล้ว): { "servers": { "whatsapp-web": { "type": "stdio", "command": "npx", "args": [ "-y", "mcp-whatsapp-web" ], "env": { "BROWSER_EXECUTABLE_PATH": "ใส่ค่าของคุณ" } } } } 3) บอก path เต็มของไฟล์ที่จะแก้ หรือคำสั่งที่จะรัน แล้วรอฉันตกลงก่อน 4) ช่อง BROWSER_EXECUTABLE_PATH ให้คงคำว่า "ใส่ค่าของคุณ" ไว้ก่อน แล้วบอกให้ฉันวางค่าจริงเองในไฟล์หรือช่องของแอป ห้ามขอให้ฉันพิมพ์คีย์ในแชต 5) ทำตามที่ตกลง แล้วตรวจว่าเครื่องมือของ WhatsApp Web MCP Server ขึ้นจริง

ข้อความนี้ไม่มีคีย์ของคุณ ถ้าต้องใช้คีย์ AI จะบอกให้คุณวางเองในไฟล์หรือช่องของแอป

  1. ลง Node.js ในเครื่อง (ถ้ายังไม่มี)

    ลงไว้แล้วหรือยัง? เช็กก่อน · เปิด Terminal แล้วพิมพ์คำสั่งนี้ กด Enter

    node -v
    • ขึ้นเลขรุ่น เช่น v26.13.1 = ลงแล้ว ข้ามขั้นนี้ได้
    • ขึ้นว่า "command not found" (Windows ขึ้นว่า "is not recognized") = ยังไม่ได้ลง หรือเพิ่งลงแต่ยังไม่ได้ปิดแล้วเปิด Terminal ใหม่
    เปิด Terminal ยังไง

    Mac: กด ⌘ + Space พิมพ์ Terminal แล้วกด Enter

    Windows: เปิดเมนู Start พิมพ์ Windows PowerShell แล้วกด Open

    ยังไม่ได้ลง: เปิดหน้าดาวน์โหลดทางการ เลือกรุ่น LTS แล้วเลือกตัวติดตั้งแบบกดเอง: Mac ไฟล์ .pkg · Windows ไฟล์ .msi ดับเบิลคลิกแล้วกดถัดไปจนจบ ไม่ต้องใช้คำสั่ง curl

    เปิดหน้าดาวน์โหลด Node.js ↗

    ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น: node -v

    ลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Node.js

  2. กรอกค่าตั้ง 1 ช่อง

    ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย

    • BROWSER_EXECUTABLE_PATH เฉพาะ webjs: ไฟล์โปรแกรมเบราว์เซอร์ Chrome และ Edge ถูกตรวจพบโดยอัตโนมัติ ตั้งค่านี้เพื่อใช้เบราว์เซอร์ที่กำหนด จำเป็นต้องใช้ Chrome/Edge สำหรับการส่งวิดีโอและ GIF
      ดูต้นฉบับภาษาอังกฤษwebjs only: browser executable. Chrome and Edge are auto-detected; set this to use a specific browser. Chrome/Edge is required for sending videos and GIFs.

    คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

  3. กดปุ่มนี้เพื่อเปิด VS Code

    เปิดใน VS Code

    VS Code จะถามยืนยันการติดตั้ง ให้กด Install

  4. ใส่คีย์ในช่องที่ว่างไว้

    ในค่าตั้งของ WhatsApp Web MCP Server ช่อง BROWSER_EXECUTABLE_PATH ยังว่าง ใส่คีย์ของคุณแล้วบันทึก

  5. เปิดแชตของ AI ใน VS Code โหมด Agent

  6. ลองเลย

    ใช้ WhatsApp Web MCP Server บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า VS Code บอกว่ากำลังใช้ WhatsApp Web MCP Server หรือมีชื่อเครื่องมือของ WhatsApp Web MCP Server ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ค่าตั้งเพิ่มเติม 15 ช่อง (ไม่ต้องกรอกก็ใช้ได้)

คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ

  • WHATSAPP_BACKEND แบ็กเอนด์ WhatsApp: webjs ใช้โปรไฟล์เบราว์เซอร์แบบถาวร baileys เชื่อมต่อโดยไม่ใช้เบราว์เซอร์และต้องจับคู่แยกต่างหาก
    ดูต้นฉบับภาษาอังกฤษWhatsApp backend: webjs uses a persistent browser profile; baileys connects without a browser and requires separate pairing
    · ค่าเริ่มต้น webjs
  • BAILEYS_SESSION_DIR ไดเรกทอรีข้อมูลรับรองและประวัติที่ซิงโครไนซ์ของ Baileys (ค่าเริ่มต้น: /baileys-sessions) ใช้พาธแบบ absolute ส่วนตัวที่เป็นของโปรเซสเซิร์ฟเวอร์เพียงหนึ่งตัว
    ดูต้นฉบับภาษาอังกฤษBaileys credentials and synchronized history directory (default: /baileys-sessions). Use a private absolute path, owned by one server process.
  • LOG_LEVEL ระดับการบันทึกล็อกสำหรับไฟล์ล็อก (logs/mcp-whatsapp.log)
    ดูต้นฉบับภาษาอังกฤษLog level for the log file (logs/mcp-whatsapp.log)
    · ค่าเริ่มต้น info
  • LOG_STDERR_LEVEL ระดับการบันทึกล็อกสำหรับ stderr (มองเห็นได้ในล็อกของ MCP client ส่วนใหญ่)
    ดูต้นฉบับภาษาอังกฤษLog level for stderr (visible in most MCP client logs)
    · ค่าเริ่มต้น warn
  • WHATSAPP_HEADLESS เฉพาะ webjs: ตั้งเป็น false เพื่อแสดงหน้าต่างเบราว์เซอร์แทนการทำงานแบบ headless
    ดูต้นฉบับภาษาอังกฤษwebjs only: set to false to show the browser window instead of running headless
  • WHATSAPP_NO_SANDBOX เฉพาะ webjs: ปิดการใช้ sandbox ของเบราว์เซอร์อย่างชัดเจนสำหรับคอนเทนเนอร์ที่ต้องการ โดย sandbox เปิดใช้งานเป็นค่าเริ่มต้น
    ดูต้นฉบับภาษาอังกฤษwebjs only: explicitly disable the browser sandbox for containers that require it. The sandbox is enabled by default.
    · ค่าเริ่มต้น false
  • WHATSAPP_SESSION_DIR เฉพาะ webjs: ไดเรกทอรีโปรไฟล์เบราว์เซอร์แบบคงอยู่ (ค่าเริ่มต้น: /whatsapp-sessions)
    ดูต้นฉบับภาษาอังกฤษwebjs only: persistent browser profile directory (default: /whatsapp-sessions)
  • WHATSAPP_PAIRING_PHONE_NUMBER การจับคู่ด้วยหมายเลขโทรศัพท์: เมื่อกำหนดค่า (รูปแบบสากลไม่มีสัญลักษณ์ เช่น 4915112345678) รหัสจับคู่ 8 ตัวอักษรจะถูกบันทึกไปยัง stderr เมื่อเริ่มต้น แทนการใช้คิวอาร์โค้ด
    ดูต้นฉบับภาษาอังกฤษPhone number pairing: when set (international, symbol-free format, e.g. 4915112345678), an 8-character pairing code is logged to stderr on startup instead of relying on the QR code
  • FFMPEG_PATH เส้นทางไปยังไบนารี ffmpeg (จำเป็นเฉพาะเมื่อต้องการแทนที่ ffmpeg ที่ติดตั้งอัตโนมัติผ่านแพ็กเกจ npm ffmpeg-static)
    ดูต้นฉบับภาษาอังกฤษPath to an ffmpeg binary (only needed to override the ffmpeg installed automatically via the ffmpeg-static npm package)
  • WA_WEB_VERSION เฉพาะ webjs: ตรึงเวอร์ชัน WhatsApp Web หากการอัปเดตฝั่ง WhatsApp ทำให้ไคลเอนต์ใช้งานไม่ได้
    ดูต้นฉบับภาษาอังกฤษwebjs only: pin the WhatsApp Web version if a WhatsApp-side update breaks the client.
  • HEALTH_CHECK_INTERVAL_MS webjs only: connection health check interval in milliseconds (<=0 disables) · ค่าเริ่มต้น 60000
  • TOOL_READY_TIMEOUT_MS ระยะเวลาที่คำสั่งเครื่องมือรอให้ไคลเอนต์ WhatsApp พร้อมใช้งาน ก่อนจะแสดงข้อผิดพลาด
    ดูต้นฉบับภาษาอังกฤษHow long tool calls wait for the WhatsApp client to become ready before erroring
    · ค่าเริ่มต้น 45000
  • MCP_HTTP_PORT เมื่อกำหนดค่านี้ จะเปิดเผย MCP endpoint ที่ http://127.0.0.1: /mcp (Streamable HTTP) เพิ่มเติมจากโปรเซสเดียวกัน
    ดูต้นฉบับภาษาอังกฤษWhen set, additionally exposes the MCP endpoint at http://127.0.0.1: /mcp (Streamable HTTP) from the same process
  • MCP_HTTP_HOST ที่อยู่ bind สำหรับ HTTP endpoint (อย่าเปิดสู่สาธารณะ; endpoint นี้ควบคุมบัญชี WhatsApp ส่วนตัวของคุณ)
    ดูต้นฉบับภาษาอังกฤษBind address for the HTTP endpoint (do not expose publicly; the endpoint controls your personal WhatsApp account)
    · ค่าเริ่มต้น 127.0.0.1
  • MCP_OAUTH เปิดใช้งาน OAuth สำหรับ HTTP endpoint: /mcp ต้องใช้ bearer token และไคลเอนต์ยืนยันตัวตนผ่านหน้าเว็บที่แสดง WhatsApp QR code / แบบฟอร์มการจับคู่
    ดูต้นฉบับภาษาอังกฤษEnable OAuth for the HTTP endpoint: /mcp requires a bearer token and clients authenticate via a browser page showing the WhatsApp QR code / pairing form

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ VS Code เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

โปรแกรมอื่นที่ใช้ MCP ได้ เช่น Windsurf, Zed หรือ Gemini CLI มีวิธีเพิ่มต่างกัน ดูวิธีของแต่ละตัวในหน้ารวมโปรแกรม

ดูโปรแกรมที่ใช้ MCP ทั้งหมด →

ค่าตั้งแบบไฟล์ JSON อยู่ในหัวข้อ “สำหรับคนเขียนโค้ด” ด้านล่าง

ติดตรงไหน? ถามคนที่ใช้ WhatsApp Web MCP Server อยู่💬 พูดคุย →
สำหรับคนเขียนโค้ด: คำสั่ง Terminal และค่าตั้ง JSON

ติดตั้งในเครื่อง

Claude Code

claude mcp add --scope user whatsapp-web --env BROWSER_EXECUTABLE_PATH='ใส่ค่าของคุณ' -- npx -y mcp-whatsapp-web

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "whatsapp-web": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-whatsapp-web"
      ],
      "env": {
        "BROWSER_EXECUTABLE_PATH": "ใส่ค่าของคุณ"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "whatsapp-web": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-whatsapp-web"
      ],
      "env": {
        "BROWSER_EXECUTABLE_PATH": "ใส่ค่าของคุณ"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "whatsapp-web": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-whatsapp-web"
      ],
      "env": {
        "BROWSER_EXECUTABLE_PATH": "ใส่ค่าของคุณ"
      }
    }
  }
}

ค่าที่ต้องใส่เอง

  • WHATSAPP_BACKEND env
    แบ็กเอนด์ WhatsApp: webjs ใช้โปรไฟล์เบราว์เซอร์แบบถาวร baileys เชื่อมต่อโดยไม่ใช้เบราว์เซอร์และต้องจับคู่แยกต่างหาก
    ดูต้นฉบับภาษาอังกฤษWhatsApp backend: webjs uses a persistent browser profile; baileys connects without a browser and requires separate pairing
  • BAILEYS_SESSION_DIR env
    ไดเรกทอรีข้อมูลรับรองและประวัติที่ซิงโครไนซ์ของ Baileys (ค่าเริ่มต้น: /baileys-sessions) ใช้พาธแบบ absolute ส่วนตัวที่เป็นของโปรเซสเซิร์ฟเวอร์เพียงหนึ่งตัว
    ดูต้นฉบับภาษาอังกฤษBaileys credentials and synchronized history directory (default: /baileys-sessions). Use a private absolute path, owned by one server process.
  • LOG_LEVEL env
    ระดับการบันทึกล็อกสำหรับไฟล์ล็อก (logs/mcp-whatsapp.log)
    ดูต้นฉบับภาษาอังกฤษLog level for the log file (logs/mcp-whatsapp.log)
  • LOG_STDERR_LEVEL env
    ระดับการบันทึกล็อกสำหรับ stderr (มองเห็นได้ในล็อกของ MCP client ส่วนใหญ่)
    ดูต้นฉบับภาษาอังกฤษLog level for stderr (visible in most MCP client logs)
  • WHATSAPP_HEADLESS env
    เฉพาะ webjs: ตั้งเป็น false เพื่อแสดงหน้าต่างเบราว์เซอร์แทนการทำงานแบบ headless
    ดูต้นฉบับภาษาอังกฤษwebjs only: set to false to show the browser window instead of running headless
  • WHATSAPP_NO_SANDBOX env
    เฉพาะ webjs: ปิดการใช้ sandbox ของเบราว์เซอร์อย่างชัดเจนสำหรับคอนเทนเนอร์ที่ต้องการ โดย sandbox เปิดใช้งานเป็นค่าเริ่มต้น
    ดูต้นฉบับภาษาอังกฤษwebjs only: explicitly disable the browser sandbox for containers that require it. The sandbox is enabled by default.
  • BROWSER_EXECUTABLE_PATH จำเป็น env
    เฉพาะ webjs: ไฟล์โปรแกรมเบราว์เซอร์ Chrome และ Edge ถูกตรวจพบโดยอัตโนมัติ ตั้งค่านี้เพื่อใช้เบราว์เซอร์ที่กำหนด จำเป็นต้องใช้ Chrome/Edge สำหรับการส่งวิดีโอและ GIF
    ดูต้นฉบับภาษาอังกฤษwebjs only: browser executable. Chrome and Edge are auto-detected; set this to use a specific browser. Chrome/Edge is required for sending videos and GIFs.
  • WHATSAPP_SESSION_DIR env
    เฉพาะ webjs: ไดเรกทอรีโปรไฟล์เบราว์เซอร์แบบคงอยู่ (ค่าเริ่มต้น: /whatsapp-sessions)
    ดูต้นฉบับภาษาอังกฤษwebjs only: persistent browser profile directory (default: /whatsapp-sessions)
  • WHATSAPP_PAIRING_PHONE_NUMBER env
    การจับคู่ด้วยหมายเลขโทรศัพท์: เมื่อกำหนดค่า (รูปแบบสากลไม่มีสัญลักษณ์ เช่น 4915112345678) รหัสจับคู่ 8 ตัวอักษรจะถูกบันทึกไปยัง stderr เมื่อเริ่มต้น แทนการใช้คิวอาร์โค้ด
    ดูต้นฉบับภาษาอังกฤษPhone number pairing: when set (international, symbol-free format, e.g. 4915112345678), an 8-character pairing code is logged to stderr on startup instead of relying on the QR code
  • FFMPEG_PATH env
    เส้นทางไปยังไบนารี ffmpeg (จำเป็นเฉพาะเมื่อต้องการแทนที่ ffmpeg ที่ติดตั้งอัตโนมัติผ่านแพ็กเกจ npm ffmpeg-static)
    ดูต้นฉบับภาษาอังกฤษPath to an ffmpeg binary (only needed to override the ffmpeg installed automatically via the ffmpeg-static npm package)
  • WA_WEB_VERSION env
    เฉพาะ webjs: ตรึงเวอร์ชัน WhatsApp Web หากการอัปเดตฝั่ง WhatsApp ทำให้ไคลเอนต์ใช้งานไม่ได้
    ดูต้นฉบับภาษาอังกฤษwebjs only: pin the WhatsApp Web version if a WhatsApp-side update breaks the client.
  • HEALTH_CHECK_INTERVAL_MS env
    webjs only: connection health check interval in milliseconds (<=0 disables)
  • TOOL_READY_TIMEOUT_MS env
    ระยะเวลาที่คำสั่งเครื่องมือรอให้ไคลเอนต์ WhatsApp พร้อมใช้งาน ก่อนจะแสดงข้อผิดพลาด
    ดูต้นฉบับภาษาอังกฤษHow long tool calls wait for the WhatsApp client to become ready before erroring
  • MCP_HTTP_PORT env
    เมื่อกำหนดค่านี้ จะเปิดเผย MCP endpoint ที่ http://127.0.0.1: /mcp (Streamable HTTP) เพิ่มเติมจากโปรเซสเดียวกัน
    ดูต้นฉบับภาษาอังกฤษWhen set, additionally exposes the MCP endpoint at http://127.0.0.1: /mcp (Streamable HTTP) from the same process
  • MCP_HTTP_HOST env
    ที่อยู่ bind สำหรับ HTTP endpoint (อย่าเปิดสู่สาธารณะ; endpoint นี้ควบคุมบัญชี WhatsApp ส่วนตัวของคุณ)
    ดูต้นฉบับภาษาอังกฤษBind address for the HTTP endpoint (do not expose publicly; the endpoint controls your personal WhatsApp account)
  • MCP_OAUTH env
    เปิดใช้งาน OAuth สำหรับ HTTP endpoint: /mcp ต้องใช้ bearer token และไคลเอนต์ยืนยันตัวตนผ่านหน้าเว็บที่แสดง WhatsApp QR code / แบบฟอร์มการจับคู่
    ดูต้นฉบับภาษาอังกฤษEnable OAuth for the HTTP endpoint: /mcp requires a bearer token and clients authenticate via a browser page showing the WhatsApp QR code / pairing form

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

สรุป

ดาวน์โหลดต่อสัปดาห์i
76/สัปดาห์
การเชื่อมต่อ
รันบนเครื่อง
รุ่นล่าสุดi
1.2.0
ส่งเข้า registryi
6 ก.ย. 2569
แก้โค้ดล่าสุดi
11 พ.ย. 2569
ผู้ทำ
mario-andreschak
แพ็กเกจ
npm: mcp-whatsapp-web
เว็บผู้ทำ
github.com
สถานะใน registry
ใช้งานอยู่

ใช้กับโปรแกรมไหนได้

ดูจากแบบการต่อของ server ตัวนี้ และเอกสารของผู้ทำโปรแกรมแต่ละตัว ตรวจเมื่อ 10 พ.ย. 2569

ติดตั้งบนเครื่องได้ใน

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

ดูโปรแกรมทั้งหมดพร้อมข้อดีข้อเสีย →

คู่มือที่เกี่ยวข้อง

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 19 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub mario-andreschak ซึ่งเป็นเจ้าของ repo

  • ✓ ผ่าน

    ยังมีคนดูแล

    มีการแก้โค้ดล่าสุด 8 วันที่ผ่านมา

  • ✓ ผ่าน

    มีสัญญาอนุญาต (license)

    ใช้ MIT

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

ช่องโหว่ที่เปิดเผยแล้ว (OSV.dev)

ไม่พบรายการใน OSV.dev สำหรับ mcp-whatsapp-web@1.2.0

ตรวจเฉพาะตัวแพ็กเกจรุ่นนี้ ไม่ใช่ทุก dependency · ตรวจเมื่อ 15 พ.ย. 2569

เราตรวจอะไรบ้าง → · JSON

ผู้ทำ: ขอให้ตรวจใหม่ หรือแจ้งข้อมูลผิด
สำหรับผู้ทำ: ติดป้ายใน README

ถ้าคุณเป็นผู้ทำตัวนี้ คัดลอกโค้ดนี้ไปวางใน README ได้เลย ป้ายลิงก์กลับมาที่หน้านี้

[![แนะนำบน PopNx MCP](https://mcp.popnx.com/badge/mario-andreschak-mcp-whatsapp-web.svg?lang=th)](https://mcp.popnx.com/th/servers/mario-andreschak-mcp-whatsapp-web)

พูดคุย

ถาม แชร์เคล็ดลับ หรือแจ้งว่าใช้ไม่ได้ เรียงตามที่คนกดว่ามีประโยชน์

ยังไม่มีใครโพสต์ ถามหรือแชร์เป็นคนแรกได้เลย

ข้อความในส่วนนี้เขียนโดยผู้ใช้ ไม่ใช่ทีม PopNx

เข้าสู่ระบบเพื่อโพสต์

รีวิวจากผู้ใช้

ยังไม่มีรีวิว

เข้าสู่ระบบเพื่อเขียนรีวิว

เทียบกับตัวอื่นในหมวด แชตและอีเมลi

  • ดาวมากกว่า 97% ของอีก 2018 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 24% ของอีก 2018 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 99% ของอีก 2018 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

WhatsApp Web MCP Server ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 3 จาก 3 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด 8 วันที่ผ่านมา และส่งรุ่นล่าสุด (1.2.0) เข้า registry 2 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี emailmd, Kite Discord Bot Builder, e2a — email for AI agents, Infobip MCP, kernelCAD

ตัวอื่นที่ทำงานคล้ายกัน

หมวดเดียวกันจากผู้ทำคนอื่น ผ่านตัวตรวจคำสั่งแล้ว ตัวทางการขึ้นก่อน แล้วเรียงตามดาว

อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

emailmd

Render markdown into email-safe HTML, lint drafts for deliverability problems, and preview emails.

โดย anypostใช้กันมาก↓ 5.4K/สัปดาห์★ 1.4Kอัปเดต 5 วันที่ผ่านมา

บนเครื่องหรือคลาวด์✓ เจ้าของบริการ · emailmd.dev

Kite Discord Bot Builder

Build and fix Discord bots from a chat. Kite hosts them 24/7, with no code to deploy.

โดย merlinfuchsกำลังโต★ 334 ดาวรวมทั้งรีโปอัปเดต 22 วันที่ผ่านมา

รันบนคลาวด์✓ เจ้าของบริการ · kite.onl

e2a — email for AI agents

Authenticated email gateway for AI agents — per-agent inboxes, HITL approval, SPF/DKIM verified.

โดย tokencanopyกำลังโต★ 200 ดาวรวมทั้งรีโปอัปเดต 4 เดือนที่ผ่านมา

รันบนคลาวด์✓ เจ้าของบริการ · e2a.dev

Infobip MCP

Infobip MCP server for omnichannel communication and messaging. SMS, RCS, WhatsApp, Viber and more.

โดย infobipเริ่มต้น★ 36อัปเดต 13 เดือนที่ผ่านมา

รันบนคลาวด์✓ เจ้าของบริการ · infobip.com

kernelCAD

CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.

โดย w1neเริ่มต้น★ 35อัปเดต 23 วันที่ผ่านมา

รันบนคลาวด์✓ เจ้าของบริการ · kernelcad.com
เทียบกับตัวที่คล้ายกัน
ตัวนี้
WhatsApp Web MCP Server
emailmdKite Discord Bot Buildere2a — email for AI agentsInfobip MCPkernelCAD
ทำงานที่ไหนต้องลงในเครื่องมีทั้งบนคลาวด์และแบบลงเครื่องใช้บนคลาวด์ ไม่ต้องลงเครื่องใช้บนคลาวด์ ไม่ต้องลงเครื่องใช้บนคลาวด์ ไม่ต้องลงเครื่องใช้บนคลาวด์ ไม่ต้องลงเครื่อง
ต้องใส่คีย์ไม่ไม่ไม่ไม่ไม่ไม่
กด + ใน Claude ได้ไม่ไม่ไม่ไม่ใช่ไม่
ผลตรวจเบื้องต้น3/35/54/44/44/44/4
สัญญาอนุญาตMITMITAGPL-3.0Apache-2.0MITMIT
ราคาไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียน

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

Very Important

Automation of Whatsapp Messages without Meta (Business-)API is against WhatsApp' Terms of Service! You take full responsibility for everything you do with this MCP-Server. It is possible that your account will be flagged/restricted.

MCP WhatsApp Web (TypeScript)

A Model Context Protocol (MCP) server for WhatsApp Web, implemented in TypeScript. This project is a TypeScript port of the original whatsapp-mcp repository.

With this MCP server, you can:

  • Search and read your personal WhatsApp messages (including media)
  • Search your contacts
  • Send messages to individuals or groups
  • Send and receive media files (images, videos, documents, audio)

Features

  • TypeScript Implementation: Fully typed codebase for better developer experience and code reliability
  • Selectable WhatsApp Backend: Uses whatsapp-web.js by default, with an optional Baileys backend that runs without a browser
  • MCP Server: Implements the Model Context Protocol for seamless integration with AI assistants
  • Media Support: Send and receive images, videos, documents, and audio messages
  • Webhooks (Baileys): signed notifications for new messages and for incoming calls, including who is calling
  • Multiple Transport Options: Supports stdio and Streamable HTTP transports — even both at once from a single process (start with stdio and set MCP_HTTP_PORT to additionally expose http://127.0.0.1: /mcp, or run HTTP-only with --http)
  • Flexible Authentication: QR code (as an MCP image tool), pairing code (request_pairing_code tool, or automatically printed to stderr at startup via WHATSAPP_PAIRING_PHONE_NUMBER), and an optional OAuth flow for HTTP clients (MCP_OAUTH=true) where the browser authorization page shows the WhatsApp QR code — unlinking WhatsApp revokes tokens so clients automatically re-authenticate

Architecture

This MCP server consists of:

  1. TypeScript MCP Server: Implements the Model Context Protocol to provide standardized tools for AI assistants to interact with WhatsApp
  2. WhatsApp Backend: A shared service interface selects web.js/Puppeteer or Baileys/WebSocket, handles authentication, and manages message sending/receiving
  3. Tool Implementations: Provides various tools for contacts, chats, messages, media, and authentication

Prerequisites

  • Node.js >= 22.0.0 (Node 22 or 24 recommended for the Baileys SQLite dependency)
  • npm or yarn
  • For the default webjs backend: Google Chrome or Microsoft Edge (auto-detected; needed for video/GIF codec support; other operations can use Puppeteer's bundled Chromium)
  • For baileys: install optional dependencies, including the native better-sqlite3 module. No Chrome, Edge, or Chromium is needed at runtime.

FFmpeg is bundled automatically via the ffmpeg-static npm package — no manual installation needed. You can point the FFMPEG_PATH environment variable at your own binary to override it.

Installation

npx
   npx mcp-whatsapp-web
Manual Installation
  1. Clone this repository
   git clone https://github.com/mario-andreschak/mcp-whatsapp-web.git

cd mcp-whatsapp-web

  1. Install dependencies
   npm install
  1. Build the project
   npm run build
  1. Configure environment variables (optional)

Copy the example environment file and modify as needed:

   cp .env.example .env

You can select the backend with WHATSAPP_BACKEND, adjust logging levels, pin the WhatsApp Web version, or override the auto-detected browser (BROWSER_EXECUTABLE_PATH) and ffmpeg binary (FFMPEG_PATH). WHATSAPP_HEADLESS=false shows the web.js browser window, and WHATSAPP_SESSION_DIR relocates its persistent profile. Without these settings the sign-in is kept in a fixed place for your user account, so it no longer matters which folder a program starts the server from (see Keeping the link).

Choosing a backend

WHATSAPP_BACKEND=webjs is the default and preserves existing sessions and MCP tool names. It uses a dedicated persistent LocalAuth profile, not your personal Chrome profile. It now keeps the browser's native user agent and graphics defaults, omits Puppeteer's automation banner flag, and leaves the browser sandbox enabled. Containers that require disabling the sandbox can explicitly set WHATSAPP_NO_SANDBOX=true. These settings do not guarantee that automation is undetectable.

To use the optional Baileys backend, set these variables in your MCP client configuration or .env, then restart the server:

WHATSAPP_BACKEND=baileys

Optional: where the sign-in lives. Leave it out to use the standard place.

#BAILEYS_SESSION_DIR=C:/path/to/your/baileys-sessions

BAILEYS_SESSION_DIR is optional; without it the sign-in lives in the standard place described in Keeping the link. Pair this backend separately with get_qr_code or request_pairing_code. The existing WHATSAPP_PAIRING_PHONE_NUMBER option also works. Baileys cannot reuse the web.js browser profile. You can switch back to webjs and resume its existing session.

Baileys links as a Chrome device (shown as "Chrome (Windows)" or "Chrome (Mac OS)" under Linked devices). WhatsApp currently ends new links that claim to be the Desktop app with status 428 ("Connection Terminated") before a QR code appears. Desktop would request the full chat history; Chrome receives recent history, and live messages are stored from then on. BAILEYS_BROWSER=Desktop restores the old behaviour. At startup the backend also looks up the current WhatsApp Web version from web.whatsapp.com, because WhatsApp refuses clients that report an outdated one; WA_WEB_VERSION pins it, and a failed lookup falls back to the version bundled with Baileys.

Baileys and SQLite are pinned optional dependencies installed by normal npm install. If your package manager omitted them, run npm install --include=optional. SQLite uses a native addon; a supported prebuilt binary or a local native build toolchain is required. To avoid downloading Chromium when installing for Baileys or an existing system browser, use:

$env:PUPPETEER_SKIP_DOWNLOAD = 'true'

npm install --include=optional npm run build

On macOS/Linux, the equivalent installation command is PUPPETEER_SKIP_DOWNLOAD=true npm install --include=optional. Selecting Baileys loads only its driver and never starts or cleans up browser processes. An unavailable backend produces an error; it never silently switches drivers or retries a send through another backend.

Baileys sessions and history
  • Credentials, Signal keys, contacts, chats and messages persist in session.sqlite inside the sign-in folder. Keep the whole folder private and out of version control. Only one running server may own a sign-in folder. Use separate folders for independent accounts.
  • Normal shutdown and lost connections keep the sign-in. Only a clear "this device was removed" from WhatsApp, or the logout tool, ends it; both revoke the OAuth access tokens. Baileys HTTP OAuth state is stored separately from web.js in oauth-store.json inside the sign-in folder.
  • get_backend_status reports the active backend, authentication, stored record counts and history synchronization state. Being connected does not mean history has finished arriving. An available history state means local data is available, not that WhatsApp supplied a complete archive.
  • Contact and history tools query the local synchronized store. Initial full-history sync is requested and can take time on large accounts. list_messages may request up to 100 additional older messages when a known chat has fewer than requested, with a bounded wait and a per-chat cooldown. Late history batches are persisted for subsequent queries. WhatsApp may still supply only part of an account's history.
  • Treat returned message IDs as opaque and use IDs from the active backend. Legacy @c.us phone-number inputs, @s.whatsapp.net, groups and @lid identifiers are supported; known LID/phone mappings are persisted. Message IDs from web.js cannot be passed to Baileys or vice versa.
  • Text, media, downloads, voice notes and the existing authentication tools use the same MCP interface. Voice-note inputs must be local files or base64; FFmpeg converts them to mono Opus/Ogg before sending. If conversion fails, the tool reports an error without sending a different message type.

The Baileys backend is opt-in and pinned to 7.0.0-rc14. Review upstream changes before upgrading, especially authentication and message-format migrations. See the Baileys documentation and release history.

Keeping the link

You should only need to scan the QR code once. After that the server stays linked, even when it is restarted, started by a different program, or loses its internet connection for a while.

Where the sign-in lives. By default the sign-in is kept in one fixed place for your user account, whatever folder a program starts the server from:

SystemBaileysweb.js
Windows%LOCALAPPDATA%\mcp-whatsapp-web\baileys-sessions%LOCALAPPDATA%\mcp-whatsapp-web\whatsapp-sessions
macOS~/Library/Application Support/mcp-whatsapp-web/baileys-sessions~/Library/Application Support/mcp-whatsapp-web/whatsapp-sessions
Linux~/.local/share/mcp-whatsapp-web/baileys-sessions (or under $XDG_DATA_HOME)~/.local/share/mcp-whatsapp-web/whatsapp-sessions
  • If you set BAILEYS_SESSION_DIR (or WHATSAPP_SESSION_DIR for web.js), that folder is always used.
  • Older versions kept the sign-in in a baileys-sessions (or whatsapp-sessions) folder inside the folder the server was started from. If such a sign-in exists and no folder is set, the server keeps using it and says so in its log.
  • At start the log says which folder is used and whether it holds a sign-in. get_backend_status shows it too, as connection.signInFolder.

Moving the sign-in. Stop every program that runs the server, move the whole folder (all files in it) to the new place, then either put it in the standard place above or point BAILEYS_SESSION_DIR at it, and start the server again.

Using it from more than one program. Two programs cannot share one sign-in at the same time. The second one waits and takes over by itself when the first one closes. If both should run at the same time, give the second program its own folder (BAILEYS_SESSION_DIR) and link it as its own device by scanning a new QR code. WhatsApp allows several linked devices per phone. Never copy a sign-in folder to a second program: the two copies would keep pushing each other off.

When the connection drops. The server reconnects by itself: quickly at first, then every five minutes for as long as it runs, so it recovers on its own when the network comes back. Asking for WhatsApp (for example check_auth_status or any tool) makes it try again at once. get_backend_status tells you in plain words what is going on: connection.state is linked, reconnecting, waiting_for_link, waiting_for_other_program or stopped, with since, lastReason and the next attempt.

What really ends a link. Only these need a new QR code:

  • The device was removed under Settings > Linked devices on the phone, or with the logout tool.
  • The phone was offline for a long time (WhatsApp ends linked devices after about 14 days without the phone).
  • WhatsApp itself ends the link, for examp

ตัดมาแค่ช่วงต้น อ่านต่อใน repo