LinkedIn MCP Server
LinkedIn MCP 서버
AI 에이전트(batabeto/OpenClaw)가 사용자를 대신하여 LinkedIn을 제어(게시물 작성, 댓글, 좋아요, 네트워크 관리)할 수 있게 해주는 풀스택 MCP 서버입니다.
아키텍처
AI Agent (batabeto) ──MCP/HTTP──► LinkedIn MCP Server ──REST──► LinkedIn API
│
OAuth2 + Token Store
│
Dashboard UIRelated MCP server: LinkedIn MCP Server
설정 가이드
1. LinkedIn 앱 생성
LinkedIn 개발자 페이지로 이동합니다.
**앱 만들기(Create App)**를 클릭합니다.
앱 이름, LinkedIn 페이지, 로고를 입력합니다.
인증(Auth) 탭에서
Authorized redirect URLs를 추가합니다:http://YOUR_EC2_IP:3000/auth/callback(nginx를 사용하는 경우 도메인을 입력하세요)
제품(Products) 탭에서 다음을 요청합니다:
Share on LinkedIn (
w_member_social범위 제공)Sign In with LinkedIn using OpenID Connect (
openid profile email제공)
**클라이언트 ID(Client ID)**와 **클라이언트 보안 비밀(Client Secret)**을 복사합니다.
2. 설치 및 구성
git clone <your-repo> linkedin-mcp
cd linkedin-mcp
npm install
cp .env.example .env
nano .env.env 파일을 작성합니다:
LINKEDIN_CLIENT_ID=your_client_id
LINKEDIN_CLIENT_SECRET=your_client_secret
BASE_URL=http://YOUR_EC2_IP:3000
PORT=3000
MCP_SECRET_KEY=$(openssl rand -hex 32)3. 서버 실행
# Production
npm start
# Development (auto-restart)
npm run dev
# As a systemd service (recommended for EC2)
sudo nano /etc/systemd/system/linkedin-mcp.servicesystemd 서비스 파일:
[Unit]
Description=LinkedIn MCP Server
After=network.target
[Service]
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu/linkedin-mcp
ExecStart=/usr/bin/node server.js
Restart=always
RestartSec=5
EnvironmentFile=/home/ubuntu/linkedin-mcp/.env
[Install]
WantedBy=multi-user.targetsudo systemctl enable linkedin-mcp
sudo systemctl start linkedin-mcp
sudo systemctl status linkedin-mcp4. LinkedIn 인증
http://YOUR_EC2_IP:3000에 접속합니다.**LinkedIn 연결(Connect LinkedIn)**을 클릭합니다.
LinkedIn에서 앱을 승인합니다.
다시 리디렉션되며 상태가 ✅ 연결됨(Connected)으로 표시됩니다.
5. AI 에이전트에 연결
OpenClaw (batabeto)의 경우:
에이전트의 MCP 설정에 다음을 추가합니다:
{
"mcpServers": {
"linkedin": {
"url": "http://YOUR_EC2_IP:3000/mcp",
"transport": "http",
"headers": {
"Authorization": "Bearer YOUR_MCP_SECRET_KEY"
}
}
}
}Claude Desktop의 경우:
{
"mcpServers": {
"linkedin": {
"command": "npx",
"args": ["mcp-remote", "http://YOUR_EC2_IP:3000/mcp", "--header", "Authorization: Bearer YOUR_MCP_SECRET_KEY"]
}
}
}사용 가능한 도구
도구 | 설명 |
| 이름, 헤드라인, 이메일, 사진 가져오기 |
| 텍스트, 기사, 링크 게시 |
| 최근 게시물 목록 가져오기 |
| URN으로 게시물 삭제 |
| 좋아요/댓글/공유 수 가져오기 |
| 게시물에 좋아요 표시 |
| 게시물에 댓글 달기 |
| 네트워크 목록 가져오기 |
| 키워드로 사람 검색 |
| 인증 상태 확인 |
에이전트 프롬프트 예시
"Post on LinkedIn: Excited to share that I just deployed a full Kubernetes cluster
with ArgoCD GitOps! #DevOps #Kubernetes"
"Get my last 5 LinkedIn posts"
"Delete my LinkedIn post with ID urn:li:ugcPost:1234567890"
"Comment 'Great insight!' on post urn:li:ugcPost:9876543210"
"Check my LinkedIn connection status"API 제한 사항 (LinkedIn)
LinkedIn의 공개 API는 제한적입니다. 작동하는 기능과 그렇지 않은 기능은 다음과 같습니다:
기능 | 상태 | 참고 |
게시물 작성 | ✅ 작동 | 텍스트, 기사, 링크 |
게시물 삭제 | ✅ 작동 | 본인 게시물만 |
게시물 좋아요 | ✅ 작동 | 볼 수 있는 모든 게시물 |
댓글 달기 | ✅ 작동 | 볼 수 있는 모든 게시물 |
내 게시물 가져오기 | ✅ 작동 | UGC Posts API 사용 |
연결 가져오기 | ⚠️ 범위 필요 |
|
사람 검색 | ❌ 제한됨 | 파트너 API 필요 |
메시지 전송 | ❌ 제한됨 | 파트너 프로그램 필요 |
이미지 게시물 | 🔜 가능 | 미디어 업로드 흐름 필요 |
보안
MCP 엔드포인트는
MCP_SECRET_KEY로 보호되므로 비밀로 유지하세요.OAuth 토큰은 로컬의
data/tokens.json에 저장되므로 이 파일을 커밋하지 마세요.LinkedIn 토큰은 60일간 유효하며, 새로 고침 토큰은 365일간 유효합니다.
서버는 토큰 만료 5일 전부터 자동으로 토큰을 갱신합니다.
EC2 포트 열기
# In AWS Security Group, allow inbound:
# Port 3000, TCP, from your agent's IP (or 0.0.0.0/0 for testing)또는 nginx를 사용하여 yourdomain.com/mcp를 localhost:3000/mcp로 프록시하세요.
Related MCP Connectors
- mcpOAuthcom.curviate
LinkedIn actions for AI agents: search, messaging, posts and invites, as hosted MCP tools.
LinkedIn for AI agents: inbox, invitations, Sales Navigator search, posts, jobs, quotas, webhooks.
LinkedIn jobs, companies and people for AI agents, plus messages and invites via your own account.
1Schedule and publish LinkedIn posts to profiles and company pages from AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to manage professional networking on LinkedIn by providing tools for posting updates, searching for jobs, and analyzing profiles. It facilitates secure interaction with the LinkedIn platform through OAuth 2.0 authentication and the Model Context Protocol.1733 PyPI12MIT
- AlicenseBqualityCmaintenanceEnables AI agents to manage LinkedIn profiles, posts, connections, skills, education, and certifications through the LinkedIn API.18176 npm64MIT
- AlicenseBqualityCmaintenanceEnables AI agents with read/write access to LinkedIn API, including profile, posts, media, organizations, comments, reactions, and analytics.2011 npmMIT
- AlicenseBqualityBmaintenanceEnables AI agents to manage LinkedIn profiles, posts, connections, skills, education, certifications, and other professional data through the LinkedIn API.19MIT