Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables posting content, sharing articles, and managing your LinkedIn profile through Claude using the official LinkedIn API with OAuth 2.0.

README.md

linkedin-mcp-server

LinkedIn MCP Server — post content, share articles, and manage your LinkedIn profile through Claude using the official LinkedIn API.

![npm version](https://www.npmjs.com/package/@dev-hitesh-gupta/linkedin-mcp-server) ![License: MIT](https://opensource.org/licenses/MIT) ![Node.js](https://nodejs.org)

6 tools for creating posts, sharing articles, managing your profile, and more — powered by the official LinkedIn REST API with OAuth 2.0.

Tools

| Tool | Description | Permissions Required | |------|-------------|---------------------| | linkedin_get_profile | Get your LinkedIn profile information | Basic (OpenID) | | linkedin_create_post | Create a text post (up to 3000 chars) | Share on LinkedIn | | linkedin_create_article_post | Share an article link with commentary | Share on LinkedIn | | linkedin_get_posts | Get your recent posts | Share on LinkedIn ⚠️ | | linkedin_delete_post | Delete a post by ID | Share on LinkedIn | | linkedin_get_connections_count | Get your total connection count | ⚠️ May need partner access |

⚠️ API Limitations: linkedin_get_posts and linkedin_get_connections_count use LinkedIn endpoints that may require elevated or partner-level API access depending on your app's approval status. The core tools (get profile, create post, share article, delete post) work with standard access.

---

Setup

LinkedIn requires creating a Developer App to get OAuth credentials. This takes about 10 minutes.

Step 1 — Create a LinkedIn Developer App

  1. Go to developer.linkedin.com/apps
  2. Click "Create app"
  3. Fill in the required fields:
  • App name: e.g. My LinkedIn MCP
  • LinkedIn Page: You need a LinkedIn company page linked — create a simple one at linkedin.com/company/setup/new if you don't have one
  • App logo: Upload any image (required)
  1. Agree to the terms and click "Create app"

Step 2 — Configure OAuth Redirect URL

  1. In your new app, go to the "Auth" tab
  2. Under "OAuth 2.0 settings", find "Authorized redirect URLs for your app"
  3. Click "Add redirect URL" and enter exactly:
   http://127.0.0.1:3000/callback
  1. Click "Update"
  2. Copy your Client ID and Client Secret from this page — you'll need them next

Step 3 — Request API Products

  1. Go to the "Products" tab in your app
  2. Request access to both of these products:
  • Sign In with LinkedIn using OpenID Connect — click "Request access" → Select → Agree
  • Share on LinkedIn — click "Request access" → Select → Agree
  1. Both are typically approved instantly for personal use

Step 4 — Install & Configure

# Install globally
npm install -g @dev-hitesh-gupta/linkedin-mcp-server

# Create config directory and add your credentials
mkdir -p ~/.linkedin-mcp
cat > ~/.linkedin-mcp/credentials.json << 'EOF'
{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET"
}
EOF

# Authenticate — opens browser for LinkedIn sign-in
linkedin-mcp-server auth

Your access token is saved to ~/.linkedin-mcp/token.json and valid for 60 days.

Step 5 — Add to Claude Code

claude mcp add linkedin -- npx @dev-hitesh-gupta/linkedin-mcp-server

Or manually in your Claude config (~/.claude/claude_desktop_config.json):

{
  "mcpServers": {
    "linkedin": {
      "command": "npx",
      "args": ["@dev-hitesh-gupta/linkedin-mcp-server"]
    }
  }
}

---

Usage Examples

Create a post: `` Post to LinkedIn: "Just shipped a new open-source MCP server for LinkedIn automation! Check it out. #opensource #ai" ``

Share an article: `` Share this article on LinkedIn: https://example.com/article My commentary: "Great read on the future of AI tooling" ``

Control visibility:

| Value | Who sees it | |-------|-------------| | PUBLIC | Everyone on LinkedIn (default) | | CONNECTIONS | Your 1st-degree connections only | | LOGGED_IN | Any logged-in LinkedIn member |

---

Re-authentication

LinkedIn tokens expire after 60 days. Re-authenticate when needed:

rm ~/.linkedin-mcp/token.json
linkedin-mcp-server auth

---

Data & Auth Storage

All data is stored locally:

~/.linkedin-mcp/
├── credentials.json    # Your LinkedIn app Client ID + Secret
└── token.json          # OAuth access token (expires in 60 days)

Security: Never commit these files to version control.

---

Troubleshooting

"Not authenticated" error: ``bash linkedin-mcp-server auth ``

"Unable to determine member URN": Ensure the Sign In with LinkedIn using OpenID Connect product is approved in your app's Products tab.

Post creation fails: Ensure the Share on LinkedIn product is approved. Check the Products tab in your LinkedIn Developer app.

"Access blocked" during sign-in: Your LinkedIn app may still be under review. Check the Products tab for approval status.

Token expired: ``bash rm ~/.linkedin-mcp/token.json && linkedin-mcp-server auth ``

linkedin_get_posts or linkedin_get_connections_count returns errors: These tools use LinkedIn API endpoints that require elevated permissions not available with standard developer access. This is a LinkedIn API restriction.

---

Requirements

  • Node.js 18+
  • A LinkedIn account
  • LinkedIn Developer App with OAuth credentials (see setup above)

License

MIT — Hitesh Gupta

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Files & Docs servers.