Skip to main content
Glama
amiradmin

LinkedIn MCP Server

by amiradmin

LinkedIn MCP Server

一个轻量级的 Model Context Protocol (MCP) 服务器,允许兼容 MCP 的 AI 助手向已认证的 LinkedIn 个人资料发布公开文本帖子。

架构

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

Related MCP server: LinkedIn Custom MCP Server

MCP 工具

linkedin_create_post

向已认证的 LinkedIn 个人资料发布公开文本帖子。

输入:

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

工具在成功时返回 LinkedIn 帖子 ID。

要求

  • Python 3.11+

  • 一个具有所需 API 权限的 LinkedIn 开发者应用

  • 一个有效的 LinkedIn 访问令牌

  • 已认证作者的 LinkedIn 人员 URN

安装依赖:

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

凭据

凭据有意保留在 Git 之外。

在项目根目录创建这些文件:

access_token.txt
person_urn.txt

access_token.txt 应仅包含 LinkedIn 访问令牌。

person_urn.txt 应包含类似以下的值:

urn:li:person:YOUR_SUBJECT_ID

设置严格的权限:

chmod 600 access_token.txt person_urn.txt

切勿提交令牌、OAuth 凭据或个人凭据文件。

运行 MCP 服务器

python -m src.linkedin_mcp.server

服务器使用 STDIO,因此它会一直保持运行并等待 MCP JSON-RPC 消息。不要将应用程序日志打印到 stdout,因为 stdout 保留给 MCP 协议使用。

MCP Inspector

用于本地开发:

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

然后连接到 STDIO 服务器,并从 Inspector 调用 linkedin_create_post

测试

运行:

pytest -q

安全说明

  • 机密存储在 Git 忽略的本地文件中。

  • .env.example 仅包含占位符。

  • GitHub 推送保护应保持启用。

  • 如果 LinkedIn 令牌曾经暴露,请立即撤销/轮换它。

作品集描述

一个面向生产的 MCP 服务器,将 LinkedIn 发布功能作为结构化 AI 工具暴露出来,结合了 Model Context Protocol、基于 OAuth 的 LinkedIn 认证、安全的本地凭据处理以及 REST API 集成。

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