LinkedIn MCP Server
LinkedIn MCP Server
一个轻量级的 Model Context Protocol (MCP) 服务器,允许兼容 MCP 的 AI 助手向已认证的 LinkedIn 个人资料发布公开文本帖子。
架构
AI Assistant
|
| MCP / stdio
v
LinkedIn MCP Server
|
| HTTPS REST API
v
LinkedInRelated 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.txtaccess_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 集成。
This server cannot be installed
Maintenance
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
- Alicense-qualityFmaintenanceEnables posting text and media content directly to LinkedIn from Claude Desktop with support for authentication and visibility controls.10MIT
- AlicenseAqualityDmaintenanceEnables 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.1711MIT
- AlicenseAqualityDmaintenanceEnables posting content, sharing articles, and managing LinkedIn profile through natural language using the official LinkedIn REST API with OAuth 2.0.710MIT
- AlicenseBqualityDmaintenanceAllows AI agents to authenticate with LinkedIn and share posts or links via the Model Context Protocol.2126MIT
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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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