Skip to main content
Glama
ahmedselimmansor-ctrl

LinkedIn MCP Server

LinkedIn MCP Server

A comprehensive, containerized Model Context Protocol (MCP) server for LinkedIn. This professional-grade server allows large language models and agents to interact with LinkedIn's official REST API seamlessly. It provides granular tools to manage user profiles, handle network connections, author posts, and oversee organizations.

🚀 Key Features

The project leverages a highly modular architecture, making it easy to extend and maintain:

  • 👤 Profile Management (src/tools/profile)

    • Retrieve authenticated user profile information (get_my_profile).

  • 📝 Content Creation (src/tools/content)

    • Share simple text updates to the user's feed (create_text_post).

    • Share rich articles with URL and descriptive commentary (create_article_post).

  • 🔗 Network Management (src/tools/network)

    • View and list 1st-degree connections (get_connections) (requires r_network permission).

  • 🏢 Organization Management (src/tools/organization)

    • List the company pages and organizations you administer (get_organizations).

Related MCP server: LinkedIn MCP Server

📋 Prerequisites

To run this server, you will need:

  1. LinkedIn Developer Account: An application registered in the LinkedIn Developer Portal.

  2. Access Token: An OAuth 2.0 Access Token with necessary scopes (e.g., w_member_social, r_liteprofile, r_organization_admin).

  3. Docker (Optional but recommended for robust execution).

  4. Node.js v20+ (Required if running natively without Docker).


🛠️ Installation & Setup

Containerization ensures the MCP server runs consistently regardless of your environment.

  1. Build the Docker image:

    docker build -t linkedin-mcp-server .
  2. Configure your MCP client (e.g., mcp.json for Claude Desktop):

    {
      "mcpServers": {
        "linkedin": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "LINKEDIN_ACCESS_TOKEN=your_linkedin_access_token_here",
            "linkedin-mcp-server"
          ]
        }
      }
    }

Option B: Running Locally

  1. Install dependencies:

    npm install
  2. Build the TypeScript code:

    npm run build
  3. Configure your MCP client:

    {
      "mcpServers": {
        "linkedin": {
          "command": "node",
          "args": ["/absolute/path/to/Linekedin_MCP_server/build/index.js"],
          "env": {
            "LINKEDIN_ACCESS_TOKEN": "your_linkedin_access_token_here"
          }
        }
      }
    }

🔍 Available Tools Reference

  • get_my_profile: Fetches the currently authenticated user's profile details.

  • create_text_post: Posts a plain-text status update on the LinkedIn feed.

  • create_article_post: Shares a URL to an article with a customized title and description.

  • get_connections: Retrieves 1st-degree connections.

  • get_organizations: Gets a list of LinkedIn pages/organizations that the authenticated user manages.


🛡️ Troubleshooting

  • 401 Unauthorized: Ensure your LINKEDIN_ACCESS_TOKEN is correct, well-formed, and has not expired.

  • 403 Forbidden: Your LinkedIn App lacks the necessary permissions for the endpoint. Check your app's authorized "Products" in the LinkedIn Developer Portal and ensure your token includes the right scopes.

📁 Architecture

The project is split cleanly into isolated modules:

  • src/index.ts: The MCP Server entry point.

  • src/linkedin-client.ts: The robust API wrapper using axios.

  • src/tools/*: Directory containing individually exported toolsets.

Available Tools

5 tools
create_article_postB

Share an article with a URL and description.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe text commentary accompanying the article.
articleUrlYesThe URL of the article to share.
articleTitleYesThe title of the article.
articleDescriptionNoAn optional description of the article.

TDQS

B3.2/5.0
Behavior2/5

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

No annotations provided; description is minimal and does not disclose behavioral traits such as post visibility, authentication requirements, or side effects beyond 'share'.

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

Conciseness3/5

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

Single sentence, no waste, but too terse to add substantial value. Could be more informative without being lengthy.

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?

No output schema and no description of return values or side effects. For a tool with 4 parameters, this feels incomplete.

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 adds little meaning beyond what the schema already provides. It mentions 'URL and description' but that is redundant.

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 the action ('Share an article') and includes the key components ('URL and description'), distinguishing it from sibling 'create_text_post' which likely handles text-only posts.

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?

No explicit guidance on when to use this tool versus 'create_text_post' or other tools. The purpose is implied but not clarified.

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

create_text_postC

Share a simple text update on the user's feed.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe text content of the post.

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description must convey behavioral traits, but it lacks details on permissions, visibility, character limits, or what happens after posting. The agent cannot infer important operational characteristics.

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

Conciseness5/5

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

The description is a single, concise sentence with no unnecessary words. It is efficiently front-loaded.

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?

Given the simple tool with one parameter and no output schema, the description is too brief. It misses crucial context such as authentication requirements, feed scope, and length constraints, reducing its completeness.

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 description coverage is 100%, so the baseline is 3. The description does not add any extra meaning to the 'text' parameter beyond what the schema already provides.

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

Purpose4/5

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

The description clearly states the action (share a simple text update) and the target (user's feed). It implies creation of a text post, distinguishing it from the sibling 'create_article_post' tool, though not explicitly.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'create_article_post'. There is no mention of prerequisites or context for appropriate usage.

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

get_connectionsA

List the user's 1st-degree connections (requires r_network permission).

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of connections to retrieve (default: 50).

TDQS

A3.8/5.0
Behavior3/5

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

No annotations provided, so description carries burden. States permission requirement and that it lists connections (implying read-only), but lacks details on rate limits, idempotency, or side effects.

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

Conciseness5/5

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

Single, focused sentence with front-loaded purpose. No extraneous words; efficient for an agent.

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

Completeness3/5

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

Adequately describes the basic function and permission requirement, but omits details like default limit, pagination behavior, and potential errors. Sufficient for a simple tool with no output schema.

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

Parameters2/5

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

Schema coverage is 100%, but description adds no extra meaning beyond the schema. Does not mention the limit parameter or its default value, missing an opportunity to enhance clarity.

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?

Description clearly states the tool lists the user's 1st-degree connections, using a specific verb and resource, and distinguishes it from sibling tools like create_article_post or get_my_profile.

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

Usage Guidelines4/5

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

Specifies the required r_network permission, giving clear prerequisites. Implicitly distinct from siblings, but no explicit when-not-to-use or alternatives.

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

get_my_profileB

Retrieve the authenticated user's LinkedIn profile information.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description must fully disclose behavior. It only says 'Retrieve', implying a read operation, but lacks details on idempotency, rate limits, or any side effects.

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 a single, clear sentence with no extraneous words. However, it is extremely minimal, which slightly reduces efficiency.

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?

Given no output schema, the description should hint at return fields (e.g., name, headline, etc.). It does not, leaving the agent uncertain about the tool's output.

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?

The input schema has zero parameters, so coverage is 100% by default. The description adds no extra meaning about what the profile contains, which is a missed opportunity for a 0-param tool (baseline 4, but no added value).

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 the verb 'Retrieve' and the resource 'authenticated user's LinkedIn profile information', making it distinct from sibling tools like get_connections or get_organizations.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like get_connections. The description implicitly suggests it is for the current user, but no explicit context is given.

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

get_organizationsA

List organizations the user administers.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior2/5

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

Without annotations, the description should disclose behaviors like authentication needs or pagination, but it only says 'list organizations', lacking any behavioral context.

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

Conciseness5/5

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

The description is a single, concise sentence with no extraneous information, earning its place efficiently.

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

Completeness3/5

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

For a simple list tool with no params or output schema, the description is adequate but minimal. It could specify return format or the meaning of 'administers' for full completeness.

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

Parameters4/5

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

The input schema has zero parameters, so the description cannot add parameter meaning. The baseline score of 4 is appropriate as the description is sufficient for param semantics.

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 the tool lists organizations the user administers, using specific verb and resource. It is easily distinguishable from sibling tools like create_article_post or get_connections.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, such as when to list organizations versus retrieving profiles or connections.

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. 5 tool updatesv1.0.0
    • First observedcreate_article_post
    • First observedcreate_text_post
    • First observedget_connections
    • First observedget_my_profile
    • First observedget_organizations

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a clear and distinct purpose: two for posting (article vs text), three for retrieval (connections, profile, organizations). No overlap or ambiguity.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (create_*, get_*), making the API predictable and easy to navigate.

Tool Count4/5

5 tools is slightly lean for a social network API, but covers essential profile and posting operations. The set feels focused rather than incomplete.

Completeness3/5

Core operations are present (post, retrieve profile/connections/organizations), but notable gaps exist such as updating or deleting posts, commenting, or searching.

Maintenance

ActivityInactive
ResponsivenessSyncing

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

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/ahmedselimmansor-ctrl/Linekedin_MCP_server'

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