شعار LinkedIn MCP Server

LinkedIn MCP Server

المجتمع
souravdasbiswas

MCP server for LinkedIn's official API - create posts, manage events, and interact with LinkedIn through AI assistants

الناشرsouravdasbiswas
المستودعlinkedin-mcp-server
اللغةTypeScript
التفريعات
9
النجوم
10
الأدوات المتاحة
0
نوع نقل البياناتstdio
الفئات
الترخيصMIT
الروابط
  • اربط الأدوات بمسارات عمل الذكاء الاصطناعي

    يتيح LinkedIn MCP Server إمكانات MCP لتطبيقات الذكاء الاصطناعي العميلة المتوافقة معه، وكذلك لوكلاء الذكاء الاصطناعي المتوافقين معه.

  • الأدوات المتاحة: 0

    تصفّح الإجراءات القابلة للاستدعاء أدناه، بما في ذلك أسماؤها وأوصافها عندما يوفّرها الخادم.

  • إعدادات جاهزة للنسخ

    استخدم مقتطفات التثبيت لتهيئة هذا الخادم في تطبيق MCP العميل المفضّل لديك.

  • مؤشرات اهتمام المجتمع بالمستودع مفتوح المصدر

    إحصاءات المستودع المرتبط: النجوم: 10، والتفريعات: 9.

LinkedIn MCP Server

linkedin-mcp-server MCP server

A Model Context Protocol (MCP) server that provides AI assistants with access to LinkedIn's official API. Create posts, manage events, and interact with LinkedIn - all through natural language via any MCP-compatible client.

Official API only. No scraping, no unofficial endpoints, no account risk.

Features

Self-Serve Tools (No LinkedIn Approval Required)

ToolDescription
linkedin_auth_startStart OAuth 2.0 authentication flow
linkedin_auth_callbackComplete OAuth with authorization code
linkedin_auth_logoutRevoke token and log out
linkedin_get_my_profileGet your LinkedIn profile (name, headline, photo, email)
linkedin_get_my_emailGet your email address
linkedin_get_auth_statusCheck authentication status
linkedin_get_rate_limitsView API rate limit usage
linkedin_create_postCreate text, article, or image posts
linkedin_delete_postDelete your posts
linkedin_create_commentComment on posts
linkedin_react_to_postReact to posts (like, celebrate, support, love, insightful, funny)
linkedin_upload_imageUpload images for posts
linkedin_list_my_postsList posts created through this server with URNs for reference
linkedin_create_eventCreate LinkedIn events
linkedin_get_eventGet event details

Architecture Highlights

  • OAuth 2.0 - Secure authentication with persistent token storage
  • Session auto-restore - Survives server restarts without re-authentication (until token expires)
  • Post history tracking - Local SQLite log of posts created through the server for easy reference and deletion
  • Adaptive rate limiting - Learns LinkedIn's actual limits from response headers
  • Automatic retry - Exponential backoff for transient failures (429, 5xx)
  • Capability detection - Only exposes tools matching your granted scopes
  • API versioning - Handles LinkedIn's monthly API version rotation

Prerequisites

  1. Node.js 20+
  2. LinkedIn Developer App (see setup steps below)

LinkedIn App Setup

Step 1: Create a LinkedIn Developer App

  1. Go to linkedin.com/developers/apps and sign in
  2. Click Create app
  3. Fill in the required fields:
    • App name: Choose any name (e.g., "My MCP LinkedIn")
    • LinkedIn Page: Select your LinkedIn page, or create one if needed
    • Privacy policy URL: Can use your website URL or a placeholder
    • App logo: Upload any image (required)
  4. Check the legal agreement box and click Create app

Step 2: Get Your Client ID and Client Secret

  1. After creating the app, you'll land on the app settings page
  2. Go to the Auth tab
  3. Copy the Client ID - you'll need this for configuration
  4. Copy the Client Secret (click the eye icon to reveal it) - you'll need this too

Step 3: Add the Redirect URL

  1. Still on the Auth tab, scroll to OAuth 2.0 settings
  2. Under Authorized redirect URLs for your app, click Add redirect URL
  3. Enter: http://localhost:3000/callback
  4. Click Update to save

Important: The redirect URL must match exactly - including the protocol (http://), port (:3000), and path (/callback). No trailing slash.

Step 4: Enable Required Products

  1. Go to the Products tab on your app page
  2. Request access to these two products:
    • Sign In with LinkedIn using OpenID Connect - click Request access, review terms, and accept
    • Share on LinkedIn - click Request access, review terms, and accept
  3. Both products are typically approved instantly for self-serve use

Verify: After enabling, go back to the Auth tab. Under OAuth 2.0 scopes, you should see: openid, profile, email, w_member_social.

Quick Start

1. Install

bash
git clone https://github.com/souravdasbiswas/linkedin-mcp-server.git
cd linkedin-mcp-server
npm install
npm run build

2. Configure Your MCP Client

For Claude Code (recommended):

bash
claude mcp add linkedin \
  -e LINKEDIN_CLIENT_ID=your_client_id \
  -e LINKEDIN_CLIENT_SECRET=your_client_secret \
  -- node /path/to/linkedin-mcp-server/dist/index.js

Or add manually to ~/.claude.json:

json
{
  "mcpServers": {
    "linkedin": {
      "command": "node",
      "args": ["/path/to/linkedin-mcp-server/dist/index.js"],
      "env": {
        "LINKEDIN_CLIENT_ID": "your_client_id",
        "LINKEDIN_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}

For Claude Desktop, add to claude_desktop_config.json:

json
{
  "mcpServers": {
    "linkedin": {
      "command": "node",
      "args": ["/path/to/linkedin-mcp-server/dist/index.js"],
      "env": {
        "LINKEDIN_CLIENT_ID": "your_client_id",
        "LINKEDIN_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}

Replace your_client_id and your_client_secret with the values from Step 2.

3. Authenticate

Once connected, tell your AI assistant:

"Authenticate with LinkedIn"

The assistant will generate an OAuth URL. Here's what happens:

  1. Open the URL in your browser
  2. Sign in to LinkedIn and click Allow to authorize the app
  3. LinkedIn redirects to http://localhost:3000/callback?code=XXX&state=YYY
  4. Since there's no local server listening, you'll see a "page not found" error - that's expected
  5. Copy the full URL from your browser's address bar and paste it back to the assistant
  6. The assistant extracts the code and state parameters and completes authentication

After the first authentication, your session persists across server restarts (token is valid for 60 days). You only need to re-authenticate when the token expires.

4. Use It

Example prompts:

  • "Post to LinkedIn: Just shipped a new feature that reduces API latency by 40%"
  • "List my LinkedIn posts" - see all posts you've made through the server
  • "Delete my last LinkedIn post"
  • "Create a LinkedIn event for our team meetup next Friday at 2pm"
  • "React to this LinkedIn post with a celebrate reaction"
  • "What's my LinkedIn profile info?"

Environment Variables

VariableRequiredDefaultDescription
LINKEDIN_CLIENT_IDYes-LinkedIn app client ID
LINKEDIN_CLIENT_SECRETYes-LinkedIn app client secret
LINKEDIN_REDIRECT_URINohttp://localhost:3000/callbackOAuth redirect URI
LINKEDIN_MCP_DATA_DIRNo~/.linkedin-mcpDirectory for token storage
LINKEDIN_API_BASE_URLNohttps://api.linkedin.comAPI base URL (override for testing)
LINKEDIN_AUTH_BASE_URLNohttps://www.linkedin.com/oauth/v2Auth base URL

Development

bash
# Install dependencies
npm install

# Type check
npm run typecheck

# Run tests
npm test

# Run tests in watch mode
npm run test:watch

# Run with coverage
npm run test:coverage

# Lint
npm run lint

# Dev mode (tsx, no build needed)
npm run dev

Testing Architecture

Tests run entirely against a mock LinkedIn API server - no real API calls are made.

LayerWhat It TestsFiles
Unit testsAuth, PKCE, token store, rate limiter, errors, capabilitiestests/unit/
Integration testsFull MCP protocol flow via in-memory transporttests/integration/
Contract testsRequest/response shapes match LinkedIn API spectests/contract/

Project Structure

src/
  index.ts              # Entry point, stdio transport
  server.ts             # MCP server wiring
  auth/
    oauth2.ts           # OAuth 2.0 flow + token exchange
    token-store.ts      # SQLite token persistence + session auto-restore
    pkce.ts             # PKCE challenge generation (available for public clients)
    tools.ts            # Auth MCP tools
  client/
    api-client.ts       # HTTP client with retry
    rate-limiter.ts     # Adaptive rate limiting
    version-manager.ts  # LinkedIn API versioning
    errors.ts           # Structured error types
    post-history.ts     # Local post tracking (SQLite)
  capabilities/
    detector.ts         # Scope-based capability detection
  modules/
    profile/tools.ts    # Profile reading tools
    posting/tools.ts    # Post creation/management tools
    events/tools.ts     # Event management tools
  types/
    linkedin.ts         # LinkedIn API type definitions
    config.ts           # Server configuration types

Limitations

These are LinkedIn API restrictions, not server limitations:

  • Cannot read others' profiles - Only the authenticated user's own profile
  • Cannot search for people - No public search API
  • Cannot send messages - Only available to Sales Navigator partners
  • Cannot read feeds - r_member_social scope is closed
  • Cannot access connections - Only connection count with Marketing API approval
  • Rate limits - ~500 app calls/day, ~100 per member/day (development tier)

Extending to Pro Tier

If your LinkedIn app has Community Management API or Advertising API approval, the server's capability detection will automatically enable additional modules when you authenticate with the corresponding scopes. The modular architecture supports adding new API modules without modifying the core server.

License

MIT

استخدم MCP الخاص بـ LinkedIn MCP Server مع نماذج ذكاء اصطناعي متعددة

يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا بمجرد توصيل LinkedIn MCP Server، يمكنك استخدامه مع نماذج ذكاء اصطناعي مختلفة في TypingMind بدلًا من إعداده لكل نموذج على حدة. يعمل تكامل MCP هذا محليًا عبر موصل MCP الخاص بـ TypingMind على جهازك.

دليل الإعداد لاستخدام الموصل المحلي

استخدم هذا الخيار عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات أو موارد خاصة على جهاز الكمبيوتر لديك.

1

فتح إعدادات MCP

في TypingMind، انتقل إلى «الإعدادات»، ثم «الإعدادات المتقدمة»، ثم «بروتوكول سياق النموذج»، واختر «إعداد الموصل».

  1. افتح TypingMind في متصفحك.
  2. انقر على أيقونة الإعدادات.
  3. انتقل إلى الإعدادات المتقدمة.
  4. افتح قسم بروتوكول سياق النموذج.
  5. انقر على «إعداد الموصل» واختر «هذا الجهاز».
شاشة إعداد موصل MCP في TypingMind مع تحديد «هذا الجهاز»
2

تنفيذ أمر الموصل

اختر «هذا الجهاز»، وانسخ الأمر من TypingMind وشغّله في Terminal. أبقِ العملية قيد التشغيل أثناء استخدام MCP.

  1. انسخ أمر الإعداد الذي يعرضه TypingMind.
  2. افتح Terminal على macOS أو Windows Terminal على Windows.
  3. الصق الأمر ونفّذه.
  4. وافق على تثبيت الحزمة إذا طلب منك Terminal تأكيد المتابعة.
  5. أبقِ نافذة Terminal مفتوحة واترك العملية قيد التشغيل أثناء استخدام أدوات MCP.
3

إضافة LinkedIn MCP Server كخادم

عندما تظهر حالة الموصل «جاهز»، انقر على «تعديل الخوادم» والصق إعدادات خادم MCP.

  1. انتظر حتى تظهر حالة الموصل «جاهز».
  2. انقر على «تعديل الخوادم».
  3. الصق إعدادات خادم MCP الخاص بـ LinkedIn MCP Server.
  4. احفظ قائمة الخوادم.
  5. حدّث الحالة إذا أردت التأكد من أن الموصل لا يزال جاهزًا.
إعدادات MCP في TypingMind تعرض خادمًا نشطًا وزر «تعديل الخوادم»
{
  "mcpServers": {
    "souravdasbiswas-linkedin-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

استخدام الاتصال مع نماذج مختلفة

احفظ قائمة الخوادم، وافتح «الإضافات»، وفعّل أدوات MCP الخاصة بـ LinkedIn MCP Server، ثم اختر أي نموذج ذكاء اصطناعي مدعوم في TypingMind واستخدم الأدوات في المحادثة أو أسندها إلى وكيل ذكاء اصطناعي.

  1. افتح صفحة الإضافات في TypingMind.
  2. فعّل أدوات MCP الخاصة بـ LinkedIn MCP Server.
  3. ابدأ محادثة واختر نموذج الذكاء الاصطناعي الذي تريد استخدامه.
  4. استخدم أدوات MCP في المحادثة أو عيّنها لوكيل ذكاء اصطناعي.
  5. انتقل إلى نموذج ذكاء اصطناعي آخر عند الحاجة دون إعادة الاتصال بـ MCP.
محادثة في TypingMind تستخدم أدوات MCP المفعّلة مع نموذج ذكاء اصطناعي محدّد
هل يمكنك استخدام LinkedIn MCP Server لمساعدتي في هذه المهمة؟
LinkedIn MCP Server
بالتأكيد. قرأته.
إليك ما وجدته باستخدام LinkedIn MCP Server.

الأسئلة الشائعة

ما استخدامات خادم MCP LinkedIn MCP Server؟

LinkedIn MCP Server هو خادم MCP يتيح لتطبيقات الذكاء الاصطناعي المتوافقة الاتصال بأدوات ومصادر سياق خارجية. في TypingMind، يمكنك إضافة خادم MCP هذا مرة واحدة وإتاحة أدواته في مساحة عملك للذكاء الاصطناعي.

هل يمكنني استخدام خادم MCP LinkedIn MCP Server مع نماذج ذكاء اصطناعي متعددة في TypingMind؟

نعم. يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا يمكنك استخدام LinkedIn MCP Server مع نماذج ذكاء اصطناعي مختلفة مثل Claude أو ChatGPT أو Gemini أو غيرها من النماذج التي أعددتها في TypingMind، دون إعداد خادم MCP لكل نموذج على حدة.

لماذا تستخدم خادم MCP LinkedIn MCP Server مع TypingMind؟

يُعد TypingMind من أفضل واجهات المحادثة مع النماذج اللغوية الكبيرة، إذ يجمع نماذج ذكاء اصطناعي متعددة ومطالبات وإضافات ووكلاء ذكاء اصطناعي ومفاتيح API وأدوات MCP في مساحة عمل واحدة. بعد توصيل LinkedIn MCP Server، يمكنك استخدام أدوات MCP الخاصة به عبر نماذجك المفضلة مع الحفاظ على سير عمل محادثاتك منظمًا في TypingMind.

كيف أوصّل خادم MCP LinkedIn MCP Server بـ TypingMind؟

يعمل LinkedIn MCP Server عبر موصل MCP المحلي في TypingMind. هذا هو الخيار الأنسب عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات سطح المكتب أو أدوات سطر الأوامر أو موارد خاصة على حاسوبك.

ما الأدوات التي يوفّرها خادم MCP LinkedIn MCP Server في TypingMind؟

يتيح LinkedIn MCP Server إمكانات MCP يمكنك تفعيلها من صفحة الإضافات في TypingMind واستخدامها في المحادثات أو تعيينها لوكلاء ذكاء اصطناعي.

هل أحتاج إلى مشاركة مفاتيح API الخاصة بي مع TypingMind لاستخدام خادم MCP LinkedIn MCP Server؟

لا. يعطي TypingMind الأولوية للعمل المحلي ويتيح لك التحكم بنفسك في مزوّدي النماذج ومفاتيح API والمطالبات وإعدادات MCP. إذا كان LinkedIn MCP Server يتطلب مصادقة، فأضف الترويسات أو إعدادات OAuth أو الإعدادات المحلية المطلوبة لخادم MCP هذا عند إنشاء الاتصال.

خوادم MCP ذات صلة

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇