linkedin-mcp-server
LinkedIn MCP サーバー
本番環境対応の Model Context Protocol (MCP) サーバーで、AI エージェント(Google Gemini Spark、OpenAI Codex、Claude Desktop、Cursor、Windsurf)を公式 LinkedIn REST API に接続します。
AI エージェントがテキスト更新の作成と公開、リッチリンクプレビューの共有、画像のアップロード、インタラクティブな投票の作成、既存の投稿の管理、リアクションやスレッドコメントへの対応を自律的に行えるようにします。
https://github.com/user-attachments/assets/cda965be-d6a2-4a37-8d3c-29a68a9959e1
機能
デュアルモード MCP トランスポート:
サーバー送信イベント (SSE): Google Gemini Spark や Claude などのクライアント向けに
GET /mcpとPOST /messages経由で提供。ストリーミング可能 HTTP: OpenAI Codex (
rmcp) などの最新のコマンドラインおよびエージェントランタイム向けにPOST /mcp経由で提供。
12 の包括的なツール:
コンテンツ作成: テキスト更新、記事リンクプレビューカード、バイナリ画像アップロード(3 ステップパイプライン)、多肢選択投票。
コンテンツ管理: URN による投稿の削除、エンゲージメント統計(いいね、コメント、シェア)の取得、アカウントプロフィール接続の確認。
ソーシャルエンゲージメント: リアクションの追加(
LIKE、CELEBRATE、LOVE、INSIGHTFUL、FUNNY、EMPATHY)、リアクションの削除、コメントの追加、スレッド内での返信、コメントの削除。
堅牢なバリデーション: すべてのツール入力パラメータに Zod スキーマを採用。
エンタープライズ対応: エンドポイントを 100% カバーする自動化された単体テストおよび統合テストスイート。
Related MCP server: @isteam/linkedin-mcp
ツールリファレンス
ツール | カテゴリ | 説明 | パラメータ |
| コンテンツ | 標準テキスト投稿を LinkedIn フィードに公開する |
|
| コンテンツ | クリック可能なプレビューカード付きの投稿を公開する |
|
| コンテンツ | URL から画像をダウンロードし、LinkedIn にアップロードして公開する |
|
| コンテンツ | 期間をカスタマイズ可能な投票を作成する |
|
| 管理 | 投稿 URN を使用して投稿を削除する |
|
| 管理 | 認証済みプロフィールの詳細(名前、メンバー ID)を取得する | なし |
| 管理 | エンゲージメント指標(いいね、コメント、シェア)を取得する |
|
| エンゲージメント | 投稿にリアクションを追加する |
|
| エンゲージメント | 投稿から自分のリアクションを削除する |
|
| エンゲージメント | 投稿にトップレベルのコメントを追加する |
|
| エンゲージメント | 自分が行ったコメントを削除する |
|
| エンゲージメント | 既存のコメントにスレッド返信を投稿する |
|
セットアップと認証
1. LinkedIn デベロッパーポータルのセットアップ
LinkedIn デベロッパーポータル で LinkedIn アプリケーションを作成します。
プロダクト タブで、以下へのアクセスをリクエストします:
Share on LinkedIn (
w_member_social権限を提供)Sign In with LinkedIn using OpenID Connect (
openidおよびprofile権限を提供)
認証 タブで、リダイレクト URL(例:
https://httpbin.org/getまたはご自身のドメイン)を追加します。
2. ユーザーアクセストークンの生成
ブラウザで認証 URL を構築します:
https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&scope=openid%20profile%20w_member_socialアプリケーションを承認し、リダイレクト URL から
codeクエリパラメータをコピーします。コードを 60 日間有効なアクセストークンと交換します:
curl -X POST https://www.linkedin.com/oauth/v2/accessToken \ -d "grant_type=authorization_code" \ -d "code=YOUR_AUTHORIZATION_CODE" \ -d "client_id=YOUR_CLIENT_ID" \ -d "client_secret=YOUR_CLIENT_SECRET" \ -d "redirect_uri=YOUR_REDIRECT_URI"メンバー ID を取得します:
curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" https://api.linkedin.com/v2/userinfosubフィールドがメンバー識別子です(例:urn:li:person:<sub_id>)。
設定
サンプル環境ファイルをコピーします:
cp .env.example .env.env 変数を設定します:
LINKEDIN_ACCESS_TOKEN=your_oauth2_access_token
LINKEDIN_AUTHOR_URN=urn:li:person:your_member_sub_id
PORT=3000ローカルでの実行
# Install dependencies
npm install
# Run unit and integration tests
npm test
# Start the server
npm start
# Start in development mode (with live reload)
npm run devクライアント統合
OpenAI Codex CLI
Codex CLI を使用してサーバーを追加します:
codex mcp add linkedin --url https://your-server-domain.com/mcpまたは、~/.codex/config.toml に直接追加します:
[mcp_servers.linkedin]
url = "https://your-server-domain.com/mcp"Claude Desktop
claude_desktop_config.json に追加します:
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["/path/to/linkedin-mcp-server/server.js"],
"env": {
"LINKEDIN_ACCESS_TOKEN": "your_access_token",
"LINKEDIN_AUTHOR_URN": "urn:li:person:your_sub_id"
}
}
}
}Google Gemini Spark
Gemini Spark カスタムアプリケーション設定で、公開 SSE エンドポイント URL を入力します:
https://your-server-domain.com/mcpデプロイ
Railway へのデプロイ
Railway CLI をインストールします:
npm i -g @railway/cliプロジェクトをリンクまたは作成します:
railway init railway up環境変数を設定します:
railway variable set LINKEDIN_ACCESS_TOKEN="your_token" LINKEDIN_AUTHOR_URN="urn:li:person:your_sub_id"パブリックドメインを生成します:
railway domain
開発とテスト
テストスイートには、LinkedIn API クライアント、12 のツール登録と実行ハンドラー、SSE / ストリーミング可能 HTTP トランスポートをカバーする 62 の自動化された単体テストおよび統合テストが含まれています。
# Run tests once
npm test
# Run tests in watch mode
npm run test:watchライセンス
このプロジェクトは MIT ライセンス の下でライセンスされています。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceFully featured MCP server that provides automation tools for LinkedIn, supporting browser-based scraping and API-based operations for content management, media uploads, and reactions.63MIT
- AlicenseAqualityDmaintenanceMCP server for LinkedIn that enables AI agents to post, comment, like, and manage content on LinkedIn.1061MIT
- AlicenseAqualityDmaintenanceHigh-performance autonomous MCP server that turns LinkedIn into an API for AI workflows, enabling profile management, job search, content posting, and document generation.141MIT
- Alicense-qualityCmaintenanceAI-powered LinkedIn automation server for content generation, profile/company data extraction, and connection request automation, integrating with MCP clients like Claude Desktop.MIT
Related MCP Connectors
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
MCP server for LeadDelta — manage LinkedIn connections and CRM data via AI assistants.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/vahabcore/linkedin-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server