LinkedIn MCP server — read your profile, publish posts, and manage your LinkedIn presence from Cursor, Claude Desktop, or any MCP-compatible AI client. Single Rust binary, no runtime required.
- Go to LinkedIn Developer Portal and click Create app
- Fill in app name, associate it with a LinkedIn Page, and accept terms
- Under Auth tab → OAuth 2.0 settings, add this redirect URL:
http://127.0.0.1:9876/callback - Under Products tab, request Sign In with LinkedIn using OpenID Connect (approved instantly)
- Go back to Auth tab and copy your Client ID and Client Secret
That's it — you now have everything needed to authenticate.
npm install -g @kembec/linkedin-mcpOr run without installing:
npx -y @kembec/linkedin-mcp authexport LINKEDIN_CLIENT_ID="your-client-id"
export LINKEDIN_CLIENT_SECRET="your-client-secret"
linkedin-mcp authYour browser opens automatically. Log in to LinkedIn, click Allow, and the token is saved. Done.
To use multiple accounts:
linkedin-mcp auth work
linkedin-mcp auth personalTokens are stored at ~/.config/kembec/linkedin-mcp/tokens/ with permissions 0600. Credentials are never written to disk.
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"linkedin": {
"command": "npx",
"args": ["-y", "@kembec/linkedin-mcp"],
"env": {
"LINKEDIN_CLIENT_ID": "your-client-id",
"LINKEDIN_CLIENT_SECRET": "your-client-secret"
}
}
}
}Add to claude_desktop_config.json:
{
"mcpServers": {
"linkedin": {
"command": "npx",
"args": ["-y", "@kembec/linkedin-mcp"],
"env": {
"LINKEDIN_CLIENT_ID": "your-client-id",
"LINKEDIN_CLIENT_SECRET": "your-client-secret"
}
}
}
}Add to ~/.codex/config.toml:
[mcp_servers.linkedin]
command = "npx"
args = ["-y", "@kembec/linkedin-mcp"]
[mcp_servers.linkedin.env]
LINKEDIN_CLIENT_ID = "your-client-id"
LINKEDIN_CLIENT_SECRET = "your-client-secret"| Tool | Description |
|---|---|
get-profile |
Your profile: name, email, profile picture URL |
create-post |
Publish a text post. Params: text (required), visibility (PUBLIC or CONNECTIONS, default PUBLIC) |
get-own-posts |
List your recent posts. Params: count (default 10), start (default 0) |
delete-post |
Delete a post by post ID or full URN |
get-company |
Organization details by org_id |
manage-accounts |
List or remove stored OAuth tokens. Params: action (list or remove), account (for remove) |
These tools are implemented and return a descriptive error if your app lacks the required scope. Apply at LinkedIn Developer — Product catalog.
| Tool | Required scope | Description |
|---|---|---|
get-connections |
r_network |
List 1st-degree connections |
search-jobs |
r_jobs |
Search job postings by keywords and location |
send-message |
w_messages |
Send a direct message to a member URN |
| Tool | Notes |
|---|---|
search-people |
Requires Recruiter, Talent Hub, or Sales Navigator — not part of the standard member API |
| Variable | Required | Description |
|---|---|---|
LINKEDIN_CLIENT_ID |
Yes | OAuth app client ID |
LINKEDIN_CLIENT_SECRET |
Yes | OAuth app client secret |
LINKEDIN_OAUTH_PORT |
No | Fixed port for the local OAuth callback server (default: dynamic). Set to 9876 if you registered http://127.0.0.1:9876/callback |
LINKEDIN_REDIRECT_URI |
No | Override the full redirect URI (advanced use) |
git clone https://github.com/Kembec/linkedin-mcp.git
cd linkedin-mcp
cargo build --release
export LINKEDIN_CLIENT_ID="your-client-id"
export LINKEDIN_CLIENT_SECRET="your-client-secret"
./target/release/linkedin-mcp authMIT — see LICENSE.