linkedin-mcp
LinkedIn MCP
AIアシスタントがLinkedInの求人を検索し、LinkedInのプロフィールを読むことを可能にするMCPサーバーです。DevToolsプロトコルを介して実際のChromeウィンドウを操作します。
これは読み取り専用です。ここには接続、メッセージ送信、推薦、投稿、応募を行うツールはありません。それは設定の問題ではなく、そのためのコードが存在しないからです。これは意図的な線引きです。LinkedInは自動化された書き込みを自動化された読み取りよりもはるかに厳しく扱い、この2つを混在させるとアカウントが制限される原因になります。
ツール
ツール | 戻り値 |
| タイトル、会社、場所、勤務形態、掲載時の給与、掲載からの経過日数、 |
| 1件の求人を完全に取得 — 会社、場所、LinkedInの求人インサイト、および「See more」の折りたたみを展開した全文。 |
| 名前、見出し、場所、概要テキスト、職歴、学歴、スキル。 |
| 保存されたブラウザセッションがまだサインインしているかどうか。 |
| Chromeから切り離し、ウィンドウとセッションをそのまま残す。 |
Related MCP server: LinkedIn MCP Server
インストール
Python 3.12以上、uv、Google Chromeが必要です。
git clone https://github.com/TSS99/linkedin-mcp.git
cd linkedin-mcp
uv sync一度サインインします。これによりChromeウィンドウが開き、手動でログインするのを待ちます — 資格情報がスクリプトによって入力されることはありません。LinkedInがスクリプトによる資格情報入力を検出するためです:
uv run linkedin-mcp --loginセッションは~/.linkedin-mcp/chrome-profileに保持されます。uv run linkedin-mcp --checkでいつでも確認でき、uv run linkedin-mcp --logoutで消去できます。
操作するChromeプロファイル
デフォルトでは、サーバーは独自の使い捨てプロファイルを開きます。そのウィンドウは新品同様に見えます — ブックマークも拡張機能もなく、LinkedIn以外には何もサインインしていません。それがポイントです: サーバーはLinkedInしか見ることができません。
代わりに日常使いのChromeを操作させたい場合、つまり既存のLinkedInセッションを再利用し、見知らぬウィンドウを開かないようにするには、次のように設定します:
LINKEDIN_MCP_PROFILE_DIR=systemまたは、任意のプロファイルディレクトリを明示的に指定します。MCPクライアント設定では、envブロックに記述します:
{
"mcpServers": {
"linkedin": {
"command": "uv",
"args": ["--directory", "/path/to/linkedin-mcp", "run", "linkedin-mcp"],
"env": { "LINKEDIN_MCP_PROFILE_DIR": "system" }
}
}
}その前に、理解しておくべきことが2つあります:
Chromeを一度再起動する必要があります。 --remote-debugging-portは起動時にのみ有効で、既に実行中のプロセスに対して有効にすることはできません。つまり、現在開いているChromeには、プロファイル設定に関係なく接続できません。完全に終了し(ウィンドウを閉じるだけでなくCmd+Q)、サーバーに起動させるか、--loginが表示するコマンドで自分で起動してください。
デバッグポートはLinkedInに限定されません。 127.0.0.1:9224に到達できるものは、そのChromeのすべてのタブを操作し、すべてのセッションを読むことができます — メール、銀行、すべてです。LinkedInだけではありません。隔離されたプロファイルでは他に到達できるものはありません。日常使いのプロファイルではすべてに到達できます。信頼できるマシンでのみそのように実行し、デバッグ用Chromeは使い終わったら閉じてください。
--logoutは自分が作成したプロファイル以外を削除することを拒否するため、実際のChromeを指定してもブラウザの状態を消去することはありません。
設定
MCPクライアント設定に追加します(mcp-config.example.jsonを参照):
{
"mcpServers": {
"linkedin": {
"command": "uv",
"args": ["--directory", "/path/to/linkedin-mcp", "run", "linkedin-mcp"]
}
}
}Claude Codeの場合: claude mcp add linkedin -- uv --directory /path/to/linkedin-mcp run linkedin-mcp
仕組みとその理由
起動したブラウザではなく、実際のChromeプロファイルに対するCDP。 Playwright独自のChromiumは、LinkedInがチェックする多くの方法で自身を宣伝します。自分でログインした実際のChromeに接続することで、フィンガープリントとCookieの整合性が保たれます。サーバーはデバッグポート9224で実行されるため、9222/9223の他のブラウザ駆動MCPサーバーと共存できます。
ナビゲーションはペース調整されます。 LinkedInは量だけでなく頻度でもレート制限を行うため、gotoはジッター付きの最小間隔を強制します。長時間のリサーチ実行は意図的に遅くなります。
LinkedInのDOM内のすべての文字列は2回表示されます — 1回は表示され、もう1回はスクリーンリーダー用のvisually-hiddenスパン内に表示されます — そのため、生のinnerTextは「Acme Corp\nAcme Corp」と読み取られます。dedupe_linesは連続する繰り返しを折りたたみます。これがないと、解析されたすべてのフィールドが2倍になって出力されます。
セレクタは順序付きフォールバックリストです。 LinkedInのクラス名は難読化され、頻繁に変更されます。可能な場合、パーサーはクラスの変更を生き延びたものにアンカーします — data-occludable-job-id属性、安定したdiv#experienceアンカーIDなど — そして、フィールドごとのフックに頼るのではなく、カードテキストの行順序の解析にフォールバックします。
壊れたスクレイピングが空の結果を返すことはありません。 すべてのツールは、アンカーが見つからない場合に{"status": "error", "error_type": "stale_selector", ...}としてセレクタとURLを返すようにラップされています。LLMが[]を受け取ると「求人が見つかりません」と完全な自信を持って報告します。これにより、ツールの破損と本当の空を区別できます。
テスト
uv run pytestテストは、LinkedInのDOMが実際に生成する形状のフィクスチャに対して、純粋なパーサー — URL/フィルター構築、カード解析、プロフィールエントリ解析、行の重複排除 — をカバーします。ブラウザもネットワークも必要ありません。
壊れたとき
壊れます。LinkedInはマークアップの変更を常に配信しており、スクレイパーは他人のHTMLに対する推測です。いずれstale_selectorエラーが発生することを想定してください。修正は通常、tools/jobs.pyまたはtools/profiles.pyのセレクタリストに1つ追加し、tests/test_parsers.pyにフィクスチャを追加することです。
checkpoint URL付きのauth_requiredが発生した場合、LinkedInは人間を求めています: Chromeウィンドウを開き、チャレンジをクリアして再試行してください。
利用規約について
実装がどれほど慎重であっても、自動アクセスはLinkedInのユーザー契約に違反しており、LinkedInはそのためにアカウントを制限することがあります。これは個人のリサーチツールです。読み取り専用の設計とペース調整されたリクエストはリスクを減らしますが、排除するものではありません。そして、そのリスクを負うのは、あなたが指定したアカウントです。ご自身の判断で使用してください。
ライセンス
Apache-2.0
Available Tools
5 toolslinkedin_check_sessionA
Check whether the browser is signed in to LinkedIn.
Every other tool needs this to be true; LinkedIn serves a login wall to anonymous visitors on job listings and profiles alike.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the behavioral burden. It states the check itself but does not explicitly confirm it is non-mutating or describe the return format. The login-wall context implies safety, but the description lacks explicit boundary details. It does not contradict anything, but could be more transparent about side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no filler. The purpose is stated first, and the second sentence adds valuable context about why this tool matters. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless check with no output schema, the description fully covers what an agent needs: what the tool does and why it's important before other tools. It is complete and self-sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the schema is already complete (100% coverage). Baseline is 4. The description adds no parameter information, which is appropriate since there are none to document.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states a specific verb ('check') and resource ('whether the browser is signed in to LinkedIn'). The description distinguishes it from sibling tools by its unique purpose—session verification—and adds context about the login wall, making it unambiguous what this tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states that 'every other tool needs this to be true,' implying it should be called before other LinkedIn operations. This provides clear usage context. It does not list exclusions or alternatives, but given its singular nature, the guidance is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
linkedin_close_sessionA
Disconnect from the browser and free resources.
This detaches from Chrome; it leaves the window and the saved session alone.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It transparently discloses the key side effect: it does NOT close the window or the saved session, and it indicates resource freeing. This goes beyond a simple 'close session' and prevents the agent from assuming destructive behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with zero waste. The core action is front-loaded, and the clarifying sentence adds essential side-effect information without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless tool with no output schema, the description is sufficient. It covers what it does and what it doesn't do. One could add typical usage timing (e.g., 'call at end of session'), but that is minor and not strictly necessary for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so schema coverage is trivially 100%. The description adds no parameter meaning because none exist; per rubric, a baseline of 4 is appropriate for a parameterless tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: 'Disconnect from the browser and free resources.' It further clarifies by specifying it detaches from Chrome and leaves the window and saved session intact, distinguishing it clearly from the search/get/check siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no explicit when-to-use or when-not-to-use guidance. It does not mention that it should be used after other LinkedIn operations or contrast itself with linkedin_check_session. The implication is present but not stated, leaving the agent to infer usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
linkedin_get_jobA
Get the full detail for one job posting.
Returns the title, company, location, posted age, LinkedIn's job insights (seniority, employment type, headcount) and the complete job description with the "See more" clamp expanded.
| Name | Required | Description | Default |
|---|---|---|---|
| job | Yes | Job id, or a /jobs/view/<id> LinkedIn URL |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must bear the burden. It discloses the output content, including the 'See more' clamp expansion, which is a concrete behavior. However, it does not mention prerequisites like authentication needs, rate limits, or error behavior. For a read operation, this is acceptable but not exhaustive, so a 3 is appropriate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two efficient sentences. The first states the overall purpose, and the second lists the return fields with the clamp expansion noted. No fluff, front-loaded key info, and every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having no output schema, the description lists the return values in detail, providing adequate information for an agent to know what to expect. It does not cover prerequisites like active sessions (sibling check_session exists) or error cases, but for a simple GET with clear return fields, it is nearly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for the single parameter, already specifying it accepts a job ID or URL. The description itself does not add additional semantics beyond what the schema provides. Baseline 3 is correct given the schema's completeness.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves full details for a single job posting and enumerates the exact fields returned (title, company, location, posted age, insights, complete description). This verb+resource focus distinguishes it from siblings like search, profile, and session tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage: it requires a job ID or URL to retrieve full details. The context is clear that this is for a single job, not searches or profiles, but it does not explicitly mention when not to use it or name alternatives. Still, for a straightforward GET tool, the usage context is unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
linkedin_get_profileA
Read a LinkedIn profile.
Returns name, headline and location, plus the about text, experience history, education and listed skills unless include_sections is false.
Set include_sections to false when you only need to confirm who someone is; it is one page load either way but a much smaller result.
| Name | Required | Description | Default |
|---|---|---|---|
| profile | Yes | Profile slug, e.g. 'satyanadella', or a full /in/<slug> URL | |
| include_sections | No | Include about, experience, education and skills |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It transparently discloses the return content and the page-load trade-off, but omits any session/auth prerequisite or error behavior. This is partially transparent but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three terse sentences, each earning its place: purpose, returns, and the parameter trade-off. The essential information is front-loaded with zero fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read-only profile tool with no output schema, the description covers what's returned and the parameter option. It omits explicit session requirements, but sibling tools (check_session/close_session) imply that context, so it's not a critical gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so parameters are documented. The description adds value for include_sections by explaining the decision rule and its result-size impact, and reinforces the profile format. This exceeds the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a clear verb-resource pair ('Read a LinkedIn profile') and then lists the specific fields returned (name, headline, location, about, experience, education, skills). This unambiguously distinguishes it from sibling job-search and session tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The purpose is explicit, and the include_sections guidance gives a concrete conditional ('Set include_sections to false when you only need to confirm who someone is') with a performance trade-off. It doesn't explicitly contrast with siblings, but the domain is distinct enough that this is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
linkedin_search_jobsA
Search job listings on LinkedIn.
Returns each listing with title, company, location, workplace type, posted salary where the employer provided one, how long ago it was posted, and the job_id. Pass that job_id to linkedin_get_job for the full description rather than re-searching.
Results are paged 25 at a time, so a large limit means several page loads.
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Order: 'date' or 'relevance' | |
| limit | No | Maximum number of results | |
| job_type | No | One of: full-time, part-time, contract, temporary, internship, volunteer, other | |
| keywords | Yes | Search keywords, e.g. 'machine learning engineer' | |
| location | No | City, region or country, e.g. 'Bengaluru' or 'India' | |
| easy_apply | No | Restrict to Easy Apply listings | |
| workplace_type | No | One of: on-site, remote, hybrid | |
| experience_level | No | One of: internship, entry, associate, mid-senior, director, executive | |
| posted_within_days | No | Only jobs posted within this many days |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses that results are paged 25 at a time and that salary may be absent, but it does not mention authentication/session requirements or rate limits. With no annotations provided, the description carries the full burden, and the existence of linkedin_check_session suggests a session prerequisite that is not mentioned. This is a notable gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is about 100 words, front-loaded with the main purpose, and the second paragraph covers pagination. It avoids redundancy and each sentence contributes value, such as noting the paging limit and the alternative tool. No fluff or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description explains the return fields and pagination, and guides to linkedin_get_job, which covers essential operational details. However, it does not mention prerequisites like an active LinkedIn session (implied by check_session sibling) or error/edge-case behavior. Given the parameter count and no output schema, the description is fairly complete but misses these key operational aspects.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides 100% description coverage for all 9 parameters, so the schema already documents their meaning. The description does not add additional parameter semantics beyond what the schema offers (e.g., it does not clarify how sort values map to behavior or the exact format of location). Baseline 3 is appropriate given the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches LinkedIn job listings, and explicitly distinguishes itself from the sibling linkedin_get_job by instructing to pass the returned job_id to that tool for full descriptions. This separates purpose from the retrieval sibling without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly tells the agent to use linkedin_get_job for the full description rather than re-searching, which is a clear directive about when to use an alternative. It also implicitly distinguishes from profile/session tools by focusing on job search, so usage context is evident.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
linkedin_check_session - First observed
linkedin_close_session - First observed
linkedin_get_job - First observed
linkedin_get_profile - First observed
linkedin_search_jobs
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: searching jobs, fetching job details, reading profiles, and managing session state. No overlap between the data-access tools and the session-management tools.
All five tools follow a consistent 'linkedin_<verb>_<noun>' pattern (search_jobs, get_job, get_profile, check_session, close_session). The naming is uniform and predictable.
Five tools is well within the ideal range for a focused server. Every tool contributes to a clear workflow: session management, job search, job details, and profile lookup.
The server covers the core read workflows for LinkedIn jobs and profiles, but lacks profile search or listing capabilities. However, for its stated purpose (searching jobs and reading profiles), the surface is largely complete.
Maintenance
Related MCP Connectors
LinkedIn jobs, companies and people for AI agents, plus messages and invites via your own account.
LinkedIn for AI agents: search people, read profiles, posts and connections via a connected account
LinkedIn for AI agents: inbox, invitations, Sales Navigator search, posts, jobs, quotas, webhooks.
Give AI agents the LinkedIn tools to find, qualify, engage, and follow up with prospects.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables AI assistants to interact with LinkedIn by scraping profiles, companies, job postings, and getting personalized job recommendations using authenticated browser automation.1711,396 PyPI4,026Apache 2.0
- AlicenseAqualityBmaintenanceEnables searching and scraping of LinkedIn for structured data on people, companies, and job listings. It allows AI clients to retrieve detailed profiles, experience, and activity sections using browser automation.7207MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search, filter, and extract job listings from LinkedIn using an automated headless browser with semantic AI filtering and deduplication.11 npmMIT
- AlicenseAqualityBmaintenanceLets an AI assistant operate LinkedIn through an authenticated browser session, enabling profile management, posting, networking, messaging, job search, and automated applications.10010 npm1MIT