Skip to main content
Glama
sandeepramdas

LinkedIn MCP Server

LinkedIn MCP Server

A Model Context Protocol (MCP) server using the TypeScript SDK for LinkedIn integration. Allows an AI agent (e.g. Claude) to authenticate with LinkedIn and share posts or links.

Prerequisites

  • Node.js (>=14) and npm

  • LinkedIn Developer App:

    • Create an app at https://www.linkedin.com/developers/apps

    • Under "Products", add Sign In with LinkedIn (OpenID Connect) and Share on LinkedIn

    • Authorized Redirect URI must match .env: http://localhost:8000/auth/linkedin/callback

    • Copy your Client ID and Client Secret into .env

Related MCP server: LinkedIn MCP Server

Setup

git clone <repo_url>
cd linkedin-mcp
npm install

Create a .env in project root with:

SESSION_SECRET=your-session-secret
AUTH_PORT=8000          # OAuth callback server port
HTTP_PORT=8001          # HTTP/SSE server port
LINKEDIN_CLIENT_ID=your-client-id
LINKEDIN_CLIENT_SECRET=your-client-secret
LINKEDIN_REDIRECT_URI=http://localhost:8000/auth/linkedin/callback

Running

  1. OAuth Callback Server (must stay running):

    npm run dev:auth
  2. MCP Server:

    • Via Claude Desktop:

      claude-desktop
    • Or manually:

      npm run dev
    • This starts stdio transport + HTTP+SSE server.

  3. Inspector UI:

    npm run build
    npx @modelcontextprotocol/inspector node build/server.js
    • Open the Inspector in browser → Tools

    • Use linkedin-share-post or linkedin-share-link tools.

Testing

  1. Visit http://localhost:8000/auth/linkedin in browser → complete LinkedIn login.

  2. Confirm “Authentication successful!”.

  3. In Inspector, run sample post/link tools.

  4. Verify content on your LinkedIn profile.

Claude Desktop Integration

  1. Run npm run dev:auth

  2. Visit http://localhost:8000/auth/linkedin in browser → complete LinkedIn login.

  3. Confirm “Authentication successful!”. A token file should be generated. Do not close this terminal.

  4. Open Claude Desktop and verify the tools are listed

Configure your claude_desktop_config.json file:

{
  "mcpServers": {
    "linkedin": {
      "command": "node",
      "args": ["/Users/ken/Desktop/lab/linkedin-mcp/build/server.js"],
      "transport": "http",
      "url": "http://localhost:8001",
      "sseEndpoint": "/stream",
      "httpEndpoint": "/message",
      "env": {
        "SESSION_SECRET": "your-session-secret",
        "AUTH_PORT": "8000",
        "HTTP_PORT": "8001",
        "LINKEDIN_CLIENT_ID": "your-client-id",
        "LINKEDIN_CLIENT_SECRET": "your-client-secret",
        "LINKEDIN_REDIRECT_URI": "http://localhost:8000/auth/linkedin/callback"
      }
    }
  },
  "globalShortcut": "Ctrl+Space"
}

(You can find this file from Claude Desktop by going to settings > developer > edit config)

Save and restart Claude Desktop to apply changes.

Available Tools

2 tools
linkedin-share-postB

Shares a text post to LinkedIn.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe content of the post to share.

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations provided, and the description does not disclose any behavioral traits beyond posting a text post. Important aspects like authentication requirements, error handling, or side effects are not mentioned.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise (5 words) and front-loaded with the action. However, it could be slightly expanded to include more utility without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Without annotations or output schema, the description is inadequate. It does not explain return values, errors, prerequisites, or any other contextual information that would help an agent use this tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description does not need to add much parameter meaning. The description only mentions 'text' vaguely, while the schema already documents it clearly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it shares a text post to LinkedIn, using a specific verb ('Shares') and resource ('text post to LinkedIn'). This distinguishes it from the sibling tool 'linkedin-share-link', which likely shares links.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for text posts only, suggesting that for links the sibling tool should be used. However, it does not explicitly state when to use or not use this tool, nor does it mention alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.0.0
    • First observedlinkedin-share-link
    • First observedlinkedin-share-post

TDQS

B3.4/5.0
Disambiguation5/5

The two tools are clearly distinct: one shares a link with commentary, the other shares a text post. No overlap in purpose.

Naming Consistency5/5

Both tools follow the consistent pattern 'linkedin-share-{type}', using snake_case and a clear verb_noun structure.

Tool Count3/5

Two tools is somewhat thin for a LinkedIn server; while it covers two core posting actions, it feels like a minimal offering for the social network domain.

Completeness3/5

The server covers link sharing and text posting, but misses image/video posts, schedule, and profile operations, leaving notable gaps for typical LinkedIn usage.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables AI agents to manage professional networking on LinkedIn by providing tools for posting updates, searching for jobs, and analyzing profiles. It facilitates secure interaction with the LinkedIn platform through OAuth 2.0 authentication and the Model Context Protocol.
    17
    11
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    Enables AI agents with read/write access to LinkedIn API, including profile, posts, media, organizations, comments, reactions, and analytics.
    20
    15
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sandeepramdas/Linked-In-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server