Skip to main content
Glama

📱 WhatsApp MCP — 원격 HTTP/SSE 서버

WhatsApp용 모델 컨텍스트 프로토콜(MCP) 서버, whatsapp-web.js 및 TypeScript로 구축됨. 로컬 stdio(Claude Desktop) 및 원격 HTTP/SSE(Claude.ai Remote MCP) 모드를 모두 지원합니다.


⚠️ WhatsApp 서비스 약관 — 중요

이 프로젝트를 사용하기 전에 읽어보십시오.

WhatsApp의 서비스 약관허용 가능한 사용 정책은 개인 또는 비즈니스 계정에서 비공식 자동화 도구 사용을 금지합니다.

🚫 번호가 차단될 수 있는 행동:

위반 사항

위험 수준

대량/스팸 메시지 전송

🔴 즉시 차단

알 수 없는 번호로 메시지 자동화

🔴 즉시 차단

비공식 WhatsApp 클라이언트 사용 (예: whatsapp-web.js)

🟠 높은 위험

대규모 연락처 또는 그룹 데이터 스크래핑

🟠 높은 위험

사용자 동의 없이 메시지 전송

🔴 즉시 차단

개인 번호로 24/7 봇 실행

🟡 중간 위험

대량의 미디어/파일 전송

🟠 높은 위험

✅ 더 안전한 관행:

  • 개인 번호가 아닌 전용/테스트용 전화번호를 사용하세요.

  • 수신 동의를 한 연락처에만 메시지를 보내세요.

  • 메시지 빈도를 낮게 유지하고 사람처럼 행동하세요.

  • API_KEY 보호 없이 /sse 또는 REST 엔드포인트를 공개적으로 노출하지 마세요.

  • 마케팅, 영업 홍보 또는 대규모 상업적 메시지 전송에 이 도구를 사용하지 마세요.

  • 프로덕션/상업적 용도로는 WhatsApp Business API (공식)를 사용하세요.

🔒 이 프로젝트는 개인적인 자동화 및 개발/테스트 목적으로만 제작되었습니다. 작성자는 오용으로 인한 계정 차단이나 법적 결과에 대해 책임을 지지 않습니다.


Related MCP server: WhatsApp MCP Server

🗂️ 프로젝트 구조

whatsapp-mcp/
├── src/
│   ├── index.ts          # stdio MCP server (Claude Desktop)
│   ├── remote.ts         # HTTP/SSE MCP server (Remote MCP + REST API)
│   └── send_message.ts   # CLI script to send a single message
├── dist/                 # Compiled JavaScript (auto-generated, do not edit)
├── .wwebjs_auth/         # WhatsApp session data (⚠️ keep this gitignored!)
├── .wwebjs_cache/        # Puppeteer browser cache (gitignored)
├── package.json
├── tsconfig.json
├── render.yaml           # Render.com deployment config
├── start-remote.bat      # Windows quick-start script
└── README.md

🚀 빠른 시작

사전 요구 사항

  • Node.js v18+ 및 npm

  • WhatsApp 계정 (테스트 번호 사용!)

  • Google Chrome 또는 Chromium 설치 (Puppeteer가 내부적으로 사용)


1. 종속성 설치

npm install

2. TypeScript 빌드

npm run build

3. 서버 시작

원격 HTTP/SSE 모드 (Claude.ai Remote MCP):

npm run start:remote

개발 모드 (빌드 불필요, ts-node 사용):

npm run dev:remote

stdio 모드 (Claude Desktop):

npm start

4. QR 코드 스캔

브라우저를 열고 다음으로 이동하세요:

http://localhost:3000/qr

WhatsApp으로 QR 코드를 스캔하세요 → 연결된 기기 → 기기 연결.


🔌 API 엔드포인트

메서드

경로

설명

GET

/ 또는 /health

상태 확인 + WhatsApp 상태

GET

/qr

QR 코드 HTML 페이지 (인증을 위해 스캔)

GET

/qr?format=json

JSON 형식의 원시 QR 데이터

GET

/tools

사용 가능한 모든 MCP 도구 목록

GET

/tools/status

WhatsApp 연결 상태

POST

/tools/send-message

WhatsApp 메시지 전송

GET

/tools/chats

최근 채팅 목록

GET

/tools/contacts

연락처 목록

GET

/tools/messages/:chatId

채팅에서 메시지 가져오기

POST

/tools/invoke

일반 MCP 도구 호출

GET

/sse

MCP SSE 엔드포인트 (Claude Remote MCP)

POST

/messages

MCP POST 엔드포인트 (/sse와 쌍으로 사용)


🛠️ 사용 가능한 MCP 도구

도구

설명

whatsapp_status

연결 상태 확인

whatsapp_send_message

텍스트 메시지 전송

whatsapp_send_media

이미지 / 비디오 / 문서 전송

whatsapp_get_contacts

모든 연락처 나열

whatsapp_get_groups

모든 그룹 나열

whatsapp_get_group_info

그룹 세부 정보 및 멤버 가져오기

whatsapp_create_group

새 그룹 생성

whatsapp_get_chats

최근 채팅 가져오기

whatsapp_get_messages

특정 채팅에서 메시지 가져오기


🔐 선택 사항: Bearer 토큰 인증

API_KEY 환경 변수를 설정하여 REST 엔드포인트를 보호하세요:

API_KEY=mysecretkey npm run start:remote

모든 요청에 토큰을 포함하세요:

curl -H "Authorization: Bearer mysecretkey" http://localhost:3000/tools/status

🌐 ngrok을 사용한 테스트 (공개 HTTPS)

  1. ngrok 설치

  2. 서버 시작: npm run start:remote

  3. 새 터미널에서: ngrok http 3000

  4. 생성된 URL 복사 (예: https://xxxx.ngrok-free.app)

Claude.ai → 설정 → 통합 → 원격 MCP에 다음을 붙여넣으세요:

https://xxxx.ngrok-free.app/sse

☁️ Render에 배포

  1. 이 저장소를 GitHub에 푸시 (아래 Git 단계 참조)

  2. render.com으로 이동 → New → Web Service

  3. GitHub 저장소 연결

  4. 구성:

    • Build Command: npm install && npm run build

    • Start Command: npm run start:remote

    • Environment: NODE_ENV=production

    • Optional: API_KEY=yoursecretkey

  5. 배포 후 https://your-app.onrender.com URL 복사

Claude Remote MCP에 붙여넣으세요:

https://your-app.onrender.com/sse

⚠️ 참고: WhatsApp 세션 데이터(.wwebjs_auth)는 Render 배포 간에 유지되지 않습니다. Render Disk를 사용하거나 배포할 때마다 QR 코드를 다시 스캔하세요.


📦 npm 스크립트

명령어

설명

npm run build

TypeScript를 dist/로 컴파일

npm start

stdio MCP 서버 시작

npm run start:remote

HTTP/SSE 원격 서버 시작

npm run dev

개발용 stdio 서버 (ts-node, 빌드 없음)

npm run dev:remote

개발용 원격 서버 (ts-node, 빌드 없음)

npm run send

CLI: 단일 메시지 전송

npm run qr

터미널에 QR 코드 표시


📄 .gitignore 권장 사항

.gitignore에 다음이 포함되어 있는지 확인하세요:

node_modules/
dist/
.wwebjs_auth/
.wwebjs_cache/
.env
*.bat

🔒 .wwebjs_auth/를 절대 커밋하지 마세요 — WhatsApp 세션 자격 증명이 포함되어 있습니다.


🔧 환경 변수

변수

기본값

설명

PORT

3000

HTTP 서버 포트

HOST

0.0.0.0

서버 바인딩 주소

API_KEY

(비어 있음)

REST 인증을 위한 선택적 Bearer 토큰

NODE_ENV

development

Render에서는 production으로 설정


🤝 기여

풀 리퀘스트를 환영합니다! 주요 변경 사항의 경우 먼저 이슈를 열어주세요.


📜 라이선스

MIT — 책임감 있게, WhatsApp의 서비스 약관에 따라 사용하세요.


💡 팁: VS Code에 GitLens 확장 프로그램을 설치하면 커밋 기록, blame, 비교 등 훨씬 더 풍부한 Git 경험을 할 수 있습니다.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Node.js application that connects WhatsApp Web with AI models through the Model Context Protocol, enabling automated messaging, contact management, and group chat functionality through AI-driven workflows.
    42
    44
    MIT
  • A
    license
    C
    quality
    F
    maintenance
    A Model Context Protocol server that connects your personal WhatsApp account to AI agents like Claude, enabling them to search messages, view contacts, retrieve chat history, and send messages via WhatsApp.
    7
    13
    72
    ISC
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    A Model Context Protocol server that integrates with WaPulse WhatsApp Web API, enabling users to send messages, manage groups, handle files, and perform various WhatsApp operations programmatically.
    3
    1

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PONMANIAN-SA/whatsapp_MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server