Skip to main content
Glama
AriOliv
by AriOliv

LinkedIn MCP

非公式の Model Context Protocol サーバー for LinkedIn — プロフィール、ネットワーク、コネクションの閲覧、人材・求人の検索、メッセージの送信を、あらゆる MCP クライアント(Claude など)から行えます。

動作モードは2つあります:

  • HTTP + OAuth 2.1(推奨)— サーバーは MCP クライアント向けの OAuth 2.1 認可サーバーとして動作し、LinkedIn の正式な 3-legged OAuth 同意画面にブリッジします。各ユーザーは linkedin.com でサインインし、サーバーがパスワードを見ることはありません。

  • stdio — 環境変数 LINKEDIN_ACCESS_TOKEN を読み取るローカルサーバー。単一ユーザーや簡単なテストに便利です。

これは @aol/ifood-mcp および @aol/uber-mcp の認証アーキテクチャを踏襲しつつ、それらのリバースエンジニアリングによるログインを LinkedIn のファーストクラスの OAuth に置き換えたものです。


ツール

ツール

LinkedIn エンドポイント

備考

linkedin_me

GET /v2/userinfo

デフォルトの openid profile email スコープで動作します。

linkedin_network_stats

GET /v2/networkSizes/{urn}

r_1st_connections_size が必要です。

linkedin_connections

GET /v2/connections

承認済みの connections プロダクトが必要です。

linkedin_get_profile

GET /v2/people/{id}

承認済みの profile プロダクトが必要です。

linkedin_search_people

GET /v2/search/people

承認済みの search プロダクトが必要です。

linkedin_search_jobs

GET /v2/jobs/search

承認済みの jobs プロダクトが必要です。

linkedin_send_message

POST /v2/messages

w_member_social(メッセージング)が必要です。

LinkedIn API アクセスについて。 標準の LinkedIn アプリでは、初期状態では OpenID Connect スコープ(openid profile email)のみが付与されるため、linkedin_me はすぐに動作します。その他のツールが呼び出すエンドポイントは、LinkedIn が承認済みプロダクト(Sign In、Marketing、Talent Solutions など)の背後にゲートしているものです。アプリがそれらの承認を受けるまで、これらのツールは 403 を返します — これは LinkedIn プラットフォーム側の制限であり、バグではありません。承認後は、付与されたスコープを LINKEDIN_SCOPES に追加してください。


Related MCP server: Linkd MCP Server

クイックスタート(HTTP + OAuth)

1. LinkedIn アプリを作成する

  1. https://www.linkedin.com/developers/apps にアクセス → Create app をクリック。

  2. Auth セクションで Client IDClient Secret をコピーします。

  3. Authorized redirect URLs にコールバックを追加します: http://localhost:3000/login/callback(または PUBLIC_URL + /login/callback)。

  4. Products セクションで Sign In with LinkedIn using OpenID Connect(および必要に応じて他のプロダクト)を追加します。

2. 設定

cp .env.example .env
# then edit .env:
#   MCP_JWT_SECRET=$(openssl rand -hex 32)
#   LINKEDIN_CLIENT_ID=...
#   LINKEDIN_CLIENT_SECRET=...
#   PUBLIC_URL=http://localhost:3000

3. 実行

npm install
npm run build
npm run start:http      # or: npm run dev  (tsx watch)

MCP クライアントを http://localhost:3000/mcp に向けます。初回接続時に OAuth 2.1 フローが実行され、LinkedIn へのサインインにリダイレクトされた後、代理でツールを呼び出します。


クイックスタート(stdio)

cp .env.example .env
# set LINKEDIN_ACCESS_TOKEN=... (e.g. from the LinkedIn developer console token generator)
npm install && npm run build
npm start

MCP クライアント設定:

{
  "mcpServers": {
    "linkedin": {
      "command": "node",
      "args": ["/absolute/path/to/linkedin-mcpserver/build/index.js"],
      "env": { "LINKEDIN_ACCESS_TOKEN": "AQV..." }
    }
  }
}

OAuth ブリッジの仕組み

MCP client ──/authorize──▶ this server ──302──▶ /login ──▶ /login/start
                                                              │
                                                    302 ▼ linkedin.com/oauth/v2/authorization
                                              user signs in on LinkedIn
                                                              │
      /login/callback ◀──302 code&state──────────────────────┘
            │  exchange code → LinkedIn access + refresh token
            │  fetch /v2/userinfo → stable member id (sub)
            │  store tokens per‑user, mint an MCP auth code
            ▼
MCP client ──/token──▶ this server ──▶ HS256 JWT (audience‑bound to /mcp)
MCP client ──/mcp (Bearer JWT)──▶ tools call LinkedIn with the member's token
  • MCP アクセストークンは MCP_JWT_SECRET で署名された短命の HS256 JWT で、/mcp リソースに audience がバインドされ(RFC 8707)、ローテーション式のリフレッシュトークンを備えています。

  • 下流の LinkedIn トークンは、アプリがリフレッシュトークン承認を受けている場合は透過的に更新され、それ以外の場合はユーザーが再認証します。

  • すべての状態はメモリ内(単一プロセス)に保持されます。水平スケールするには src/http/store.ts のストアを Redis/DB に置き換えてください。


環境変数

変数

必須

デフォルト

目的

PORT

3000

HTTP ポート。

PUBLIC_URL

HTTP

http://localhost:PORT

クライアントと LinkedIn から見える URL。

MCP_JWT_SECRET

HTTP

HS256 キー(32文字以上)。openssl rand -hex 32

LINKEDIN_CLIENT_ID

HTTP

LinkedIn アプリのクライアント ID。

LINKEDIN_CLIENT_SECRET

HTTP

LinkedIn アプリのクライアントシークレット。

LINKEDIN_SCOPES

openid profile email

リクエストする OAuth スコープ。

LINKEDIN_REDIRECT_URI

PUBLIC_URL/login/callback

OAuth コールバックの上書き。

LINKEDIN_ACCESS_TOKEN

stdio

stdio モード用のトークン。

LINKEDIN_API_BASE

https://api.linkedin.com

API ホストの上書き。

LINKEDIN_VERSION

/rest 用の LinkedIn-Version ヘッダー(YYYYMM)。


構成

src/
  index.ts                 stdio server + tool catalog + executeTool + TokenProvider
  http-server.ts           remote MCP server (Streamable HTTP + OAuth 2.1)
  http/
    provider.ts            LinkedInOAuthProvider (OAuthServerProvider, HS256 JWTs)
    login-router.ts        /login → LinkedIn consent → /login/callback
    linkedin-auth.ts       LinkedIn OAuth client (authorize / token / userinfo)
    session-provider.ts    per-user token lookup + transparent refresh
    store.ts               in-memory OAuth + downstream token stores

スクリプト

スクリプト

アクション

npm run build

build/ にコンパイル。

npm run start:http

HTTP/OAuth サーバーを実行。

npm start

stdio サーバーを実行。

npm run dev

HTTP サーバーを tsx watch で実行。

npm run dev:stdio

stdio サーバーを tsx watch で実行。

npm run typecheck

tsc --noEmit を実行。

ライセンス

MIT。 LICENSE を参照。

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables seamless interaction with LinkedIn for job applications, profile retrieval, feed browsing, and resume analysis through natural language commands.
    31
  • A
    license
    A
    quality
    D
    maintenance
    An unofficial Model Context Protocol server that enables programmatic access to LinkedIn data through tools like user search, company search, profile enrichment, and contact retrieval.
    8
    7
    17
    3
    ISC
  • F
    license
    Not graded
    quality
    D
    maintenance
    A comprehensive Model Context Protocol server that enables AI assistants to interact with LinkedIn APIs for profile management, content creation, networking, messaging, and analytics.
    2
  • A
    license
    A
    quality
    F
    maintenance
    An unofficial Model Context Protocol server that provides LinkedIn tools for searching users, enriching profiles, retrieving contact information, and conducting deep research through natural language interfaces.
    5
    13
    5
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

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/AriOliv/linkedin-mcp'

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