linkedincli MCPサーバー
コミット 2026年10月24日ターミナルからAIクライアントを使用してLinkedInアカウントを管理できます。プロフィールの閲覧、コンテンツの投稿、メッセージ送信、つながりの申請、検索が可能です。
別名 bcharleson/linkedincli
- スター
- 74
- ツール
- —
- ダウンロード数(30日間)
- —
- 最新バージョン
- —
- 最終コミット
- 2026年10月24日
- ライセンス
- MIT
linkedincli MCPとは
linkedincliはMCPサーバーです。 ターミナルからAIクライアントを使用してLinkedInアカウントを管理できます。プロフィールの閲覧、コンテンツの投稿、メッセージ送信、つながりの申請、検索が可能です。.
プロジェクトのREADMEから生成された概要
linkedincli MCP server について
linkedincliは、AIクライアント内からLinkedInアカウントを管理することを可能にし、43個のコマンドをMCPツールとして公開します。linkedinという名前のCLIとして、またClaude Code、Cursor、Windsurf、その他のエージェント用のMCP serverとして動作します。LinkedInと通信するMCPプロセスは、ノートPCやMac miniなどのローカルマシンで実行する必要があります。クラウドエージェントは、そのローカルサーバーを呼び出すことはできますが、Cookieを保持したりVoyager API呼び出しを直接行ったりすることはできません。認証にはli_atとJSESSIONIDを使用したCookieセッション認証を使用します。これらは手動で貼り付けるか、macOSまたはLinuxでは --from-chrome を使用してローカルのChromeプロファイルから読み取ることができます(Windowsはこのパスをサポートしていません)。Chromeからの完全なCookie jarを使用すると、実際のブラウザにより近い挙動になります。非ChromeのTLSフィンガープリントによるLinkedInのセッション無効化を避けるには、LINKEDIN_HTTP=curl-impersonate を設定してcurl_chrome123を呼び出すか、それを --from-chrome と組み合わせて使用してください。Cookieがstdoutに表示されることはありません。このツールは、プロフィールの閲覧、投稿の作成と編集、フィードの読み取り、リアクションやコメントによるエンゲージメント、つながりの申請、メッセージのやり取り、個人および企業の検索、企業の閲覧、求人詳細、プロフィールの閲覧アナリティクスをカバーしています。LinkedInのCONTENT結果タイプはFeedbackCardのみを返すため、投稿の検索は利用できません。
できること
- 1ターミナルからアップデートを投稿コンテンツを提供した後、AIにLinkedInへのテキストまたは画像の投稿を作成させます。
- 21次つながりの検索特定のキーワードを持つ、あなたの1次ネットワーク内の人々をAIに探させます。
- 3最近のメッセージを確認AIにLinkedInの会話をリストアップさせ、返信を確認できるようにします。
- 4投稿にリアクション特定の投稿URNに対して、AIに「いいね」リアクションを追加させます。
- 5プロフィールの詳細を読み取るAIに、自身のプロフィールサマリーを整形されたJSON形式で取得させます。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
設定
LINKEDIN_CURL_IMPERSONATE_BINLINKEDIN_FROM_CHROMELINKEDIN_HTTPLINKEDIN_JSESSIONIDLINKEDIN_LI_AT
| 名前 | 説明 | 種類 |
|---|---|---|
| LINKEDIN_CURL_IMPERSONATE_BIN | — | |
| LINKEDIN_FROM_CHROME | — | |
| LINKEDIN_HTTP | — | |
| LINKEDIN_JSESSIONID | — | |
| LINKEDIN_LI_AT | — |
自動チェック
実行日 2026年11月13日完全なレポート →まだ検証されていません。サーバーには80点のスコア、重大な問題がないこと、および検証に必要な十分なデータが必要です。 チェックの仕組み · 点数を上げるための改善点
- ソースリポジトリがリンクされており、アクセス可能bcharleson/linkedincli is public and reachablegithub.com/bcharleson/linkedincli ↗合格
- パッケージがこのリポジトリをソースとして指定未チェック
- ビルドの来歴 (Sigstore 証明)未チェック
- オープンソースライセンス (OSI)MITspdx.org/licenses/MIT.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit or release 2026-10-24github.com/bcharleson/linkedincli ↗合格
- OpenSSF Scorecard未チェック
- パッケージ名が有名なパッケージに酷似していない未チェック
- パッケージおよびその依存関係に重大な勧告なし未チェック
- モデルへの隠れた指示がない0 tool descriptions and the README read; no override phrases, credential paths or hidden characters合格
- 破壊的なツールがラベル付けされている未チェック
- リモートエンドポイントが MCP ハンドシェイクに応答未チェック
README
GitHubで見るlinkedincli
Full LinkedIn platform management from your terminal. 43 commands for profiles, posts, messaging, connections, search, feed, engagement, and more — powered by cookie session auth.
Works as a CLI and an MCP server (for Claude Code, Cursor, Windsurf, and other AI agents).
Install
# Install globally
npm install -g @bcharleson/linkedincli
# This installs the `linkedin` command:
linkedin --help
# Or run without installing
npx @bcharleson/linkedincli --help
Note: The npm package is
@bcharleson/linkedinclibut the CLI command is just
Local harness only
A live LinkedIn session (cookies, Chrome cookie import, Voyager API calls) must run on a local harness only — your own computer, such as a laptop or Mac mini.
Do not run a live session from Grok Bot, a cloud VM, or any remote runner. Safe use from those environments is limited to:
- installing the
linkedinCLI binary, or - calling an MCP server that is already running on the local harness
Cookies and Voyager calls never leave the local machine. Do not put li_at / JSESSIONID in a cloud or Grok Bot environment.
The opt-in --from-chrome and LINKEDIN_HTTP=curl-impersonate paths are local-only: they read a Chrome profile and/or curl_chrome123 on that same machine.
Sessions keep getting killed?
Default Node fetch has a TLS/JA3 fingerprint that is not Chrome. LinkedIn often detects that and invalidates li_at on the first Voyager call (issue #1). Manual li_at + JSESSIONID paste still works for some accounts, but is the fragile path.
Two opt-in, local-only workarounds (default transport remains Node fetch):
LINKEDIN_HTTP=curl-impersonate— on the local harness, shell out tocurl_chrome123so the TLS ClientHello matches Chrome.--from-chrome/LINKEDIN_FROM_CHROME=1— on the local harness, read the fulllinkedin.comcookie jar from a local Chrome profile (not just the two auth tokens).
Use them together on the local machine when possible.
Install curl-impersonate (local harness)
Install curl_chrome123 on the same local machine that holds the LinkedIn session. The transport looks for it on PATH (override with LINKEDIN_CURL_IMPERSONATE_BIN).
# Nix
nix profile install nixpkgs#curl-impersonate-chrome
# Homebrew
brew install curl-impersonate
# Confirm the binary exists
curl_chrome123 --version
export LINKEDIN_HTTP=curl-impersonate
If the binary is named differently on your platform, point at it:
export LINKEDIN_CURL_IMPERSONATE_BIN=/usr/local/bin/curl_chrome123
export LINKEDIN_HTTP=curl-impersonate
Quick Start
Option A — Read cookies from Chrome (local macOS/Linux only)
If you are already logged into LinkedIn in Chrome on this machine, the CLI can decrypt cookies from the local profile. This sends the full cookie jar (not just li_at + JSESSIONID), which matches a real browser more closely. Local-only — do not point this at a remote Chrome profile or run it from a cloud agent.
# macOS will prompt to unlock Keychain ("Chrome Safe Storage") the first time.
# Requires the `sqlite3` CLI (preinstalled on macOS; `sudo apt install sqlite3` on Linux).
linkedin --from-chrome profile me --pretty
# Or persist the two auth tokens into ~/.linkedin-cli/config.json
linkedin login --from-chrome
# Non-default Chrome profile
linkedin --from-chrome --chrome-profile "Profile 1" status --verify
Environment equivalents: LINKEDIN_FROM_CHROME=1, LINKEDIN_CHROME_PROFILE=Default. Optional: LINKEDIN_CHROME_USER_DATA_DIR to point at a custom user-data directory (Chrome/Chromium).
Windows is not supported for --from-chrome (Chrome 127+ App-Bound Encryption).
Cookie values are never printed to stdout/stderr.
Option B — Paste cookies manually
Open LinkedIn in your browser → DevTools (F12) → Application → Cookies → linkedin.com
Copy these two values:
li_at— your session token (long string starting withAQED...)JSESSIONID— your session ID (starts withajax:)
linkedin login
# Paste your li_at and JSESSIONID when prompted
Or non-interactively:
linkedin login --li-at "AQEDxxxxxxx" --jsessionid "ajax:1234567890"
Manual paste + default Node fetch may still get the session killed. Prefer Option A plus LINKEDIN_HTTP=curl-impersonate on the local harness.
Use it
# View your profile
linkedin profile me --pretty
# Create a post
linkedin posts create --text "Hello LinkedIn! Posted from my terminal."
# Search for people
linkedin search people --keywords "software engineer" --network F --pretty
# Check your messages
linkedin messaging conversations --pretty
# React to a post
linkedin engage react 7123456789 --type LIKE
All Commands
Profile (9 commands)
linkedin profile me # Your own profile
linkedin profile view <public-id> # View any profile
linkedin profile contact-info <public-id> # Email, phone, websites
linkedin profile skills <public-id> # List skills
linkedin profile network <public-id> # Connections, followers, distance
linkedin profile badges <public-id> # Premium, influencer, etc.
linkedin profile privacy <public-id> # Privacy settings
linkedin profile posts <urn-id> # Recent posts by a user
linkedin profile disconnect <public-id> # Remove a connection
Posts (3 commands)
linkedin posts create --text "My post" # Text post
linkedin posts create --text "With image" --image ./pic.jpg # Image post
linkedin posts create --text "Inner circle" --visibility connections
linkedin posts edit <share-urn> --text "Updated text" # Edit a post
linkedin posts delete <share-urn> # Delete a post
Feed (3 commands)
linkedin feed view # Your feed (chronological)
linkedin feed view --count 50 # More items
linkedin feed user <profile-id> # Someone's activity
linkedin feed company <company-name> # Company updates
Engagement (5 commands)
linkedin engage react <post-urn> --type LIKE # Like
linkedin engage react <post-urn> --type PRAISE # Celebrate
linkedin engage react <post-urn> --type EMPATHY # Love
linkedin engage react <post-urn> --type INTEREST # Insightful
linkedin engage react <post-urn> --type ENTERTAINMENT # Funny
linkedin engage react <post-urn> --type APPRECIATION # Support
linkedin engage comment <post-urn> --text "Great post!"
linkedin engage comments-list <post-urn>
linkedin engage reactions <post-urn>
linkedin engage share <share-urn> --text "Worth reading"
Connections (7 commands)
linkedin connections send <profile-urn> # Send request
linkedin connections send <profile-urn> -m "Let's connect!" # With message
linkedin connections received # Pending received
linkedin connections sent # Pending sent
linkedin connections accept <id> --secret <secret> # Accept
linkedin connections reject <id> --secret <secret> # Reject
linkedin connections withdraw <id> # Withdraw sent
linkedin connections remove <public-id> # Unfriend
Messaging (6 commands)
linkedin messaging conversations # All conversations
linkedin messaging conversation-with <profile-urn> # With specific person
linkedin messaging messages <conversation-id> # Read messages
linkedin messaging send <conversation-id> -t "Hello!" # Reply
linkedin messaging send-new -r <urn1>,<urn2> -t "Hi!" # New conversation
linkedin messaging mark-read <conversation-id> # Mark as read
Search (4 commands)
linkedin search people --keywords "CTO" --network F # 1st connections
linkedin search people --keywords "engineer" --company 1035 # At a company
linkedin search people --title "VP Sales" --geo 103644278 # By region
linkedin search companies --keywords "AI startups"
linkedin search jobs --keywords "engineer" --remote --experience 4
# search posts is unavailable (LinkedIn CONTENT SRP). Use profile posts for a known author:
linkedin profile posts ACoAABxxxxxxx --limit 20
Companies (3 commands)
linkedin companies view <company-name> # Company info
linkedin companies follow <following-state-urn> # Follow
linkedin companies unfollow <entity-urn> # Unfollow
Jobs (2 commands)
linkedin jobs view <job-id> # Job details
linkedin jobs skills <job-id> # Skill match insights
Analytics (1 command)
linkedin analytics profile-views # Who viewed your profile
Global Options
Every command supports these flags:
| Flag | Description |
|---|---|
--li-at <cookie> |
Override li_at cookie |
--jsessionid <cookie> |
Override JSESSIONID cookie |
--from-chrome |
Read cookies from a Chrome profile on this local machine |
--chrome-profile <name> |
Chrome profile directory (default: Default) |
--output pretty |
Pretty-printed JSON |
--pretty |
Shorthand for --output pretty |
--quiet |
No output, exit codes only |
--fields <list> |
Comma-separated fields to include |
Environment Variables
export LINKEDIN_LI_AT="your_li_at_cookie"
export LINKEDIN_JSESSIONID="your_jsessionid_cookie"
# Opt-in: avoid Node fetch TLS fingerprint (requires curl_chrome123)
export LINKEDIN_HTTP=curl-impersonate
# export LINKEDIN_CURL_IMPERSONATE_BIN=/path/to/curl_chrome123
# Opt-in: read the full LinkedIn cookie jar from Chrome
export LINKEDIN_FROM_CHROME=1
# export LINKEDIN_CHROME_PROFILE="Profile 1"
Auth resolution order: --from-chrome / LINKEDIN_FROM_CHROME → --li-at/--jsessionid flags → env vars → ~/.linkedin-cli/config.json
linkedin status --verify now classifies LinkedIn 3xx login/challenge redirects as session_valid: false with an auth message instead of a generic network error.
MCP Server (AI Agents)
All 43 commands are available as MCP tools. The MCP process that talks to LinkedIn must run on the local harness. Cloud agents and Grok Bot may install the CLI binary or call this local MCP — they must not hold cookies or originate Voyager calls.
Local Claude Code / Cursor / Windsurf
Add to the MCP config on the local machine:
{
"mcpServers": {
"linkedin": {
"command": "linkedin",
"args": ["mcp"],
"env": {
"LINKEDIN_LI_AT": "your_li_at_cookie",
"LINKEDIN_JSESSIONID": "your_jsessionid_cookie",
"LINKEDIN_HTTP": "curl-impersonate"
}
}
}
}
Or if using npx:
{
"mcpServers": {
"linkedin": {
"command": "npx",
"args": ["-y", "@bcharleson/linkedincli", "mcp"]
}
}
}
Then a local AI agent can manage LinkedIn through that MCP process. Remote/cloud agents should call this local server rather than starting their own session.
Cookie Expiration
LinkedIn li_at cookies expire periodically (usually every few weeks). They can also be invalidated immediately when the client TLS fingerprint does not look like Chrome. When your session expires:
linkedin status --verify # Check if session is valid
linkedin login --from-chrome
# or: linkedin login
Search posts limitation
linkedin search posts is not available. LinkedIn's CONTENT resultType on voyagerSearchDashClusters.b0928897b71bd00a5a7291755dcd64f0 still returns HTTP 200 but included[] is only a FeedbackCard (issue #2). People and company search on the same queryId still work. A replacement content-search queryId has not been verified from public/in-repo sources, so this CLI does not invent one.
For posts by a specific member, use profile posts (identity/profileUpdatesV2):
linkedin profile posts <urn-id> --limit 20
Disclaimer
This tool uses LinkedIn's internal Voyager API via cookie session authentication. It is not affiliated with or endorsed by LinkedIn. Use responsibly and in compliance with LinkedIn's terms of service. The authors are not responsible for any account restrictions that may result from automated usage.
License
MIT
linkedincli MCPのよくある質問
linkedincliをLinkedInに認証するにはどうすればよいですか?
Cookieセッション認証を使用します。ローカルのChromeプロファイルからCookieを読み取るか、li_atとJSESSIONIDのCookieを手動で貼り付けます。認証情報はフラグ、環境変数、または ~/.linkedin-cli/config.json から解決されます。
クラウドVMやリモートエージェントからlinkedincliを使用できますか?
いいえ。ライブのLinkedInセッションはローカルマシンで実行する必要があります。クラウドエージェントは、CLIをインストールするか、すでにローカルで実行されているMCP serverを呼び出すことしかできません。
linkedincli MCP serverで何ができますか?
43個のすべてのコマンドがClaude Code、Cursor、Windsurf用のMCPツールとして公開されており、プロフィール、投稿、メッセージング、つながり、検索、フィード、アナリティクスをカバーしています。
なぜLinkedInセッションが無効になるのですか?
LinkedInはデフォルトのNode fetch TLSフィンガープリントを拒否することが多く、最初の呼び出しでli_at Cookieを無効にします。ローカルのみで可能な回避策として、curl-impersonateトランスポートの使用、またはChromeからのCookie読み取りの2つがあります。
linkedincliでLinkedInの投稿を検索できますか?
いいえ。LinkedInのCONTENT結果タイプはFeedbackCardのみを返すため、投稿の検索は利用できません。代わりに、profile postsを使用して特定の作成者の投稿をリストアップすることは可能です。