Skip to main content
Glama
amiradmin

LinkedIn MCP Server

by amiradmin

LinkedIn MCP Server

A lightweight Model Context Protocol (MCP) server that lets an MCP-compatible AI assistant publish public text posts to an authenticated LinkedIn profile.

Architecture

AI Assistant
     |
     | MCP / stdio
     v
LinkedIn MCP Server
     |
     | HTTPS REST API
     v
LinkedIn

Related MCP server: LinkedIn Custom MCP Server

MCP tool

linkedin_create_post

Publishes a public text post to the authenticated LinkedIn profile.

Input:

{
  "text": "Hello from my MCP server 🚀"
}

The tool returns the LinkedIn post ID on success.

Requirements

  • Python 3.11+

  • A LinkedIn developer application with the required API permissions

  • A valid LinkedIn access token

  • The authenticated author's LinkedIn person URN

Install dependencies:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Credentials

Credentials are intentionally kept outside Git.

Create these files in the project root:

access_token.txt
person_urn.txt

access_token.txt should contain only the LinkedIn access token.

person_urn.txt should contain a value such as:

urn:li:person:YOUR_SUBJECT_ID

Set restrictive permissions:

chmod 600 access_token.txt person_urn.txt

Never commit tokens, OAuth credentials, or personal credential files.

Run the MCP server

python -m src.linkedin_mcp.server

The server uses STDIO, so it intentionally stays running and waits for MCP JSON-RPC messages. Do not print application logs to stdout because stdout is reserved for the MCP protocol.

MCP Inspector

For local development:

npx @modelcontextprotocol/inspector \
  python -m src.linkedin_mcp.server

Then connect to the STDIO server and call linkedin_create_post from the Inspector.

Testing

Run:

pytest -q

Security notes

  • Secrets are stored in local files ignored by Git.

  • .env.example contains placeholders only.

  • GitHub push protection should remain enabled.

  • If a LinkedIn token is ever exposed, revoke/rotate it immediately.

Portfolio description

A production-minded MCP server that exposes LinkedIn publishing as a structured AI tool, combining the Model Context Protocol, OAuth-based LinkedIn authentication, secure local credential handling, and REST API integration.

F
license - not found
-
quality - not tested
B
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

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
    D
    maintenance
    Allows AI agents to authenticate with LinkedIn and share posts or links via the Model Context Protocol.
    2
    126
    MIT

View all related MCP servers

Related MCP Connectors

  • Give AI agents the LinkedIn tools to find, qualify, engage, and follow up with prospects.

  • Scrape and analyze public LinkedIn posts as structured JSON via the Apify LinkedIn Posts API.

  • Let AI tools securely access your LinkedIn network and DMs

View all MCP Connectors

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/amiradmin/linkedin-mcp-server'

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