MCP Documentation
LinkedIn

Install

Get your LinkedIn session cookie into the OS keyring, then point your MCP client at the server.

The server never sees your password. It borrows the session your browser already has.

  1. Log in to linkedin.com as normal
  2. Open DevTools, ⌥⌘I on macOS, F12 on Windows
  3. ApplicationCookieshttps://www.linkedin.com
  4. Find the row named li_at and copy its Value

It's a long opaque string, around 200 characters.

This cookie is your account

Anyone holding that string is logged in as you. It survives a password change, and LinkedIn gives you no list of active sessions to revoke. Never paste it into a chat, an issue, or a config file you might commit. If you think it has leaked, log out of LinkedIn everywhere, that is the only thing that invalidates it.

Store it

uvx linkedin-api-mcp auth

It prompts, the input is hidden and never echoed, and the value goes into your OS keyring, macOS Keychain, Windows Credential Manager, or Secret Service on Linux. Not a dotfile.

Verify before wiring anything up

uvx linkedin-api-mcp --test

This loads your feed and prints the resolved configuration with the cookie redacted, you'll see "cookie": "<set, 216 chars>", never the value. If it reports not_authenticated, the cookie is stale: grab a fresh one and re-run auth.

Point your client at it

~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "linkedin": {
      "command": "uvx",
      "args": ["linkedin-api-mcp"]
    }
  }
}

No env block is needed, the cookie is already in the keyring. Restart the client and ask it something like "what's my LinkedIn headline?" to confirm.

Environment variables

All optional. The cookie belongs in the keyring; the rest tune behaviour.

VariableDefaultWhat it does
LINKEDIN_COOKIE,Overrides the keyring. Useful for a throwaway or containerised run; skip auth entirely if you set it.
LINKEDIN_HEADLESStrueSet to 0 to watch the browser work, useful when a selector breaks.
LINKEDIN_MIN_INTERVAL2Seconds between LinkedIn actions.
LINKEDIN_MAX_PER_HOUR120Hard ceiling per rolling hour. Past it, calls fail immediately rather than queueing.
LINKEDIN_NAV_TIMEOUT_MS30000Page load timeout.

If something goes wrong

ErrorMeansDo
not_authenticatedLinkedIn redirected to login, the cookie is staleGet a fresh li_at, re-run auth
checkpointLinkedIn wants a CAPTCHA or verificationOpen linkedin.com in your normal browser and complete it. Repeated checkpoints mean LinkedIn has noticed, slow down rather than retrying
rate_limitedYou hit the hourly ceilingStop making calls. linkedin_status shows when the next slot frees
parse_failedLinkedIn changed its markupA bug in the server, not you, report it
missing_browserChromium isn't installeduvx --from linkedin-api-mcp patchright install chromium

On this page