SuperAPI AI Directory

linkedin-mcp

LinkedIn via an authenticated browser session: profiles, people/job/company search, feed, messaging and gated writes (connect, post, react, comment).

Open website

About this tool

linkedin-mcp is a LinkedIn integration tool for AI assistants (MCP server) that provides MCP clients with structured LinkedIn data read and write capabilities through a local real browser session. It is developed by devag7, and the current release version is 3.1.0, containing 22 tools, and can be used in Claude, Cursor, or any client that supports MCP. This project is an unofficial integration; using automation to operate LinkedIn may violate its user agreement and may lead to account restrictions or bans. Before use, you should read the Account safety and SECURITY.md instructions in the project.

Main uses

  • Provide AI assistants with structured LinkedIn read capabilities: profiles, jobs, company information, feed, and inbox data.
  • Provide five write operations that require explicit confirmation: sending connection requests, sending messages, posting, liking/reacting, and commenting.
  • Suitable for starting workflows such as profile research, job/company research, and inbox triage.

Main capabilities

  • 22 tools, including local browser reads and five write operations.
  • Opens a persistent Google Chrome profile through Patchright, initiates Voyager requests from authenticated pages, and returns results as JSON to the MCP client; some discovery-type tools fall back to page data.
  • Built-in safety layer: writes are disabled by default; once enabled, a server-issued preview token and confirm:true are required, a limited attempt budget is consumed, and results including an unknown status are returned.
  • Default safety limits include: 20 connections/day, 50 messages/day, 50 likes+comments combined/day, 30 follows/day, and a total write cap of 150 per local day; 80 profile views/day, 30 searches/day. Read interval 4–12 seconds, write interval 45–150 seconds, including long breaks and working-hours gating.
  • Conservative warm-up limits, pending invitation caps, and acceptance-rate pauses; first verification use starts a persistent warm-up clock, with messages prohibited in week 1 and gradually allowed in weeks 2 and 3.
  • Persistent circuit breaker: after observing checkpoint URLs, HTTP 999, JSON endpoints returning challenge HTML, or supported challenge page signals, subsequent automated calls are blocked; it will not attempt to solve checkpoints.
  • Operation logs: record operation ID, inputhashes, action buckets, dates, and status codes, for replay protection and safety counting, without storing message/post text or raw response details.

How to use Requirements: Node.js 20 or higher, and Google Chrome installed.

  1. Offline diagnostics:
npx linkedin-mcp@3.1.0 --setup --client claude-desktop

Also accepts claude-desktop or vscode. After resolving the reported local issues, merge the generated entry into the existing client configuration file. The setup process will not log in or request a LinkedIn account.

  1. Log in once (this opens a real Chrome window; you need to log in and handle CAPTCHA/2FA):
npx linkedin-mcp@3.1.0 --login

Google Chrome must be installed (or run npx patchright install chrome once). The session (including Cloudflare clearance) is persisted to ~/.linkedin-mcp/profile/.

  1. Configure the client. Prefer using the generated entry above. For clients that accept mcpServers , you can use the version-pinned example. MCP configuration example:
"command": "node",
"args": ["/absolute/path/to/dist/index.js"]

Start from whoami to view local status. When account reads are explicitly authorized, you can try "read my own profile once, report the returned status and partial metadata, then close the session. Do not retry or write." Stop at the checkpoint.

Local HTTP option (loopback only):

  • Generate a local secret and start the server from the current checkout directory:
LINKEDIN_HTTP_TOKEN=<随机密钥> node dist/index.js --http 3000
  • The client configuration URL is http://127.0.0.1:3000/mcp, and add the request header Authorization: Bearer <相同的 LINKEDIN_HTTP_TOKEN 值>. The key should be kept in protected client-side configuration, not placed in URLs or committed to repositories.
  • Tokens must contain 32–256 letters, digits, underscores, or hyphens. All endpoints, including GET /health, require a token. Missing or invalid credentials return 401. HTTP binds to 127.0.0.1, and Host must be 127.0.0.1:<port> or localhost:<port>, and if Origin is present, it must exactly match http://<Host> . Invalid host/origin returns 403. No CORS access is granted.
  • POST /mcp accepts uncompressed JSON, maximum 1 MiB. Request body upload is limited to 10 seconds, and responses are limited to 180 seconds. At most 16 active HTTP requests and 32 TCP connections; exceeding this returns 503.

Write operations: All five alpha write tools require LINKEDIN_ENABLE_WRITES=true and confirm:true. When omitted or false, return a local preview without opening Chrome. After reviewing the preview's target, content, audience, and path, with human approval, use the returned action ID as operation_idand the token as preview_token. The token expires after five minutes, is bound to the exact action, target, and content, and is consumed after submission. Missing or changed proof is rejected before dispatch. Starting a new message thread also requires LINKEDIN_ENABLE_EXPERIMENTAL_MESSAGES=true, and there is currently no live success evidence. A unique operation_idmust be provided (8–128 letters, digits, underscores, or hyphens).

Recovery checkpoints: CHECKPOINT_REQUIRED indicates the challenge was observed;CIRCUIT_OPEN indicates the stored stop is still in effect.health_check reports blocked during the stop without probing LinkedIn.whoami and close_session remain available. Stop all servers/probes using that profile; run linkedin-mcp --login, manually complete the checkpoint in Chrome and open the LinkedIn feed; restart the server only after login reports that both the session and API are verified. Cookies, restarts, or --logout alone cannot clear the stop. Circuit breaker state is stored next to the profile:<LINKEDIN_PROFILE_DIR>.circuit.json(default ~/.linkedin-mcp/profile.circuit.json). A successful interaction recovery clears the hard stop and preserves the action cooldown. Invalid/unreadable state defaults to off; restore the state or fix the storage rather than deleting it to resume automation.

Applicable scenarios and limitations Applicable scenarios: profile research, job/company research, inbox triage, and performing a small number of LinkedIn interaction operations under controlled conditions. Limitations:

  • This is an unofficial integration; automation and account security risks are borne by the user; built-in safety features reduce risk but do not eliminate it.
  • Undocumented endpoints, query IDs, browser behavior, and response shapes may change.
  • Hosted deployments, remote browser/profile deployments, profile copying, reverse proxies, browser CORS clients, and serverless deployments are all unsupported.
  • First-use results in Claude Desktop, Cursor, and VS Code have not yet been measured; native client first-use queues and broad live provider compatibility remain unproven.
  • Writes may return an unknown status, indicating the request may have reached LinkedIn but whether it completed cannot be determined; the target must be checked manually.
  • Corrupted or unreadable state files prevent startup; save failures stop further data/action work until storage is fixed.
  • The job research tool research_jobs is not included in the version, and its job research brief is still in draft PR #5.

Other facts are not yet provided.