LinkedIn MCP for OpenWorker
LinkedIn MCP for OpenWorker
OpenWorker向けのローカルファーストなLinkedIn MCPサーバー。stdioで動作し、トークンを環境変数または明示的なツール入力に保持し、LinkedInプロフィールの読み取りと投稿操作用の小規模で承認しやすいツールを公開します。
ツール
linkedin_start_oauth_flowは、ブラウザのOAuthフローを開始し、localhostコールバックをキャプチャし、コードを交換して、トークンをローカルに保存します。linkedin_auth_statusは、保存されたトークンが存在するかどうかと、いつ期限切れになるかを報告します。linkedin_logoutは、保存されたトークンを削除します。linkedin_exchange_authorization_codeは、手動フォールバックフローのために、OAuthコードを交換してトークンを保存します。linkedin_get_my_profileは、/v2/userinfoから認証済みメンバーのプロフィールを読み取ります。linkedin_create_text_postは、/rest/postsを通じてテキストのみの投稿を公開または下書き保存します。linkedin_get_postは、URNで投稿を取得します。linkedin_find_posts_by_authorは、メンバーまたは組織のURNの投稿を一覧表示します。
Related MCP server: linkedin-mcp-server
セットアップ
npm i linkedin-mcp-openworkerLinkedIn開発者アプリを作成し、必要な製品/スコープをリクエストしてください:
openid profile emailは、OpenID Connectを使用したSign In with LinkedIn用です。w_member_socialは、認証済みメンバーとして投稿するためのものです。組織への投稿には、
w_organization_socialなどLinkedInが承認した組織スコープが必要です。
OpenWorkerは、Claude DesktopやCursorと同じ mcpServers JSON形式を使用して、Manage -> Integrations 経由でMCPサーバーをサポートしています。ビルド後、次のようにサーバーを追加してください:
{
"mcpServers": {
"linkedin": {
"command": "npm",
"args": ["linkedin-mcp-openworker"],
"env": {
"LINKEDIN_CLIENT_ID": "paste-your-linkedin-client-id-here",
"LINKEDIN_CLIENT_SECRET": "paste-your-linkedin-client-secret-here",
"LINKEDIN_REDIRECT_URI": "http://127.0.0.1:33333/linkedin/oauth/callback",
"LINKEDIN_VERSION": "202607"
}
}
}
}LINKEDIN_VERSION はデフォルトで 202607 になり、このプロジェクトが作成された時点のLinkedIn Marketing APIのバージョニングガイダンスに一致します。
OAuthフロー
LinkedIn開発者アプリで、この認証済みリダイレクトURLを追加します:
http://127.0.0.1:33333/linkedin/oauth/callbackLINKEDIN_CLIENT_ID、LINKEDIN_CLIENT_SECRET、LINKEDIN_REDIRECT_URIを使用して、MCPサーバーをOpenWorkerに追加します。OpenWorkerに
linkedin_start_oauth_flowの実行を依頼します。MCPはlocalhostコールバックサーバーを起動し、ブラウザでLinkedInを開き、返された
stateを検証し、認可コードを交換して、トークンを次の場所に保存します:
~/.linkedin-mcp-openworker/token.jsonその後、LinkedInツールは保存されたトークンを自動的に使用します。
linkedin_auth_statusでトークンの状態を確認し、linkedin_logoutで削除できます。
デフォルトの管理フローは、LinkedInの標準的な3-legged OAuth認可エンドポイントを使用します:
https://www.linkedin.com/oauth/v2/authorizationこれはLinkedInがOpenID Connect用に文書化しているエンドポイントです。デフォルトで openid profile email w_member_social をリクエストし、client_secret を使用して認可コードを交換し、返されたアクセストークンとIDトークンのメタデータをローカルに保存します。OpenIDスコープで auth_method: "pkce" を使用しないでください。LinkedInはその組み合わせを Open ID permission is not supported for PKCE flows. というエラーで拒否します。
LinkedInの一般的な3-legged OAuthドキュメントでは、リダイレクトURLはHTTPSであるべきとされています。LinkedInがアプリのlocalhostコールバックURLを拒否する場合は、このマシンに転送するHTTPSコールバック/トンネルURLを使用し、LINKEDIN_REDIRECT_URI をLinkedIn Developer Portalに登録した正確なURLに設定してください。
デフォルトでは、OAuthツールはツール結果内のトークンをマスクします。明示的に結果にトークン値を含めたい場合のみ、return_access_token: true を渡してください。
注記
LinkedIn APIへのアクセスは、開発者アプリで承認された製品に依存します。w_member_social がないトークンはメンバーの投稿を公開できず、組織の投稿には組織の権限と、適切なページロールを持つ認証済みメンバーが必要です。
Available Tools
8 toolslinkedin_auth_statusARead-only
Check whether this MCP server has a stored LinkedIn OAuth token.
Inputs: no named parameters.
linkedin_create_text_postADestructive
Publish or draft a text-only LinkedIn post for a member or organization author URN.
Inputs: author_urn (required), commentary (required), visibility, access_token, +2 more.
linkedin_exchange_authorization_codeA
Exchange a LinkedIn OAuth authorization code for tokens and store the token locally.
Inputs: code (required), client_id (required), redirect_uri (required), client_secret (required), +1 more.
linkedin_find_posts_by_authorBRead-only
Find LinkedIn posts by member or organization author URN.
Inputs: author_urn (required), count, start, access_token, +1 more.
linkedin_get_my_profileARead-only
Read the authenticated LinkedIn member profile using the OIDC userinfo endpoint.
Inputs: access_token.
linkedin_get_postARead-only
Retrieve a LinkedIn post by URN.
Inputs: post_urn (required), access_token, view_context.
linkedin_logoutADestructive
Delete the locally stored LinkedIn OAuth token for this MCP server.
Inputs: no named parameters.
linkedin_start_oauth_flowA
Start a browser-based LinkedIn OAuth flow, capture the localhost callback, exchange the code, and store the token locally.
Inputs: scopes, client_id, auth_method, redirect_uri, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools are clearly distinct, but linkedin_start_oauth_flow and linkedin_exchange_authorization_code overlap since the start flow already includes exchanging the authorization code. An agent could be unsure which to use for a given OAuth scenario.
All tool names follow a consistent linkedin_verb_noun snake_case pattern. Verbs are clear and predictable, making the toolset easy to navigate.
Eight tools is well-scoped for a LinkedIn MCP covering authentication, profile access, and post management. Each tool earns its place without unnecessary bloat.
Core auth and post workflows are covered, but the post surface is read/create only—there is no update or delete post tool. This is a minor gap for typical LinkedIn content management workflows.
Related MCP Connectors
LinkedIn API as MCP tools to retrieve profile data and publish content. Powered by HAPI MCP.
A hosted LinkedIn MCP server for your own account. Paste one address into Claude, ChatGPT, Cursor or n8n to read your inbox, send messages and invitations, and search people. Free to start. Not made by LinkedIn.
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
Hosted LinkedIn MCP server: search people, read profiles, send invitations and messages.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for LinkedIn, enabling posting, liking, commenting, and profile retrieval via official OAuth 2.0. Features CLI, HTTP admin, and optional Telegram bot.14 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server for LinkedIn API integration. Enables authentication, profile access, connections, search, messaging, and feed management via OAuth2.MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for AI-native LinkedIn prospecting. It enables lead research, audience building, conversation management, and controlled outreach actions such as messaging and publishing through an OAuth-protected remote endpoint.2MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that lets you publish text and image posts to LinkedIn, fetch your profile, and check auth status using natural language.MIT