LinkedIn MCP for OpenWorker
LinkedIn MCP for OpenWorker
一个面向 OpenWorker 的本地优先 LinkedIn MCP 服务器。它通过 stdio 运行,将令牌保存在环境变量或显式工具输入中,并提供小型、便于审批的工具,用于 LinkedIn 个人资料读取和帖子操作。
工具
linkedin_start_oauth_flow启动浏览器 OAuth 流程,捕获 localhost 回调,交换授权码,并将令牌存储在本地。linkedin_auth_status报告是否存在已存储的令牌以及该令牌何时过期。linkedin_logout删除已存储的令牌。linkedin_exchange_authorization_code交换 OAuth 授权码并存储令牌,用于手动回退流程。linkedin_get_my_profile从/v2/userinfo读取已认证成员的个人资料。linkedin_create_text_post通过/rest/posts发布或草拟纯文本帖子。linkedin_get_post按 URN 检索帖子。linkedin_find_posts_by_author列出成员或组织 URN 的帖子。
Related MCP server: linkedin-mcp-server
设置
npm i linkedin-mcp-openworker创建 LinkedIn 开发者应用并请求你需要的产品/作用域:
openid profile email用于通过 OpenID Connect 使用 LinkedIn 登录。w_member_social用于以已认证成员身份发布内容。组织发帖需要 LinkedIn 批准的组织作用域,例如
w_organization_social。
OpenWorker 通过 Manage -> Integrations 支持 MCP 服务器,使用与 Claude Desktop 和 Cursor 相同的 mcpServers JSON 格式。构建后,添加一个如下所示的服务器:
{
"mcpServers": {
"linkedin": {
"command": "npm",
"args": ["linkedin-mcp-openworker"],
"env": {
"LINKEDIN_CLIENT_ID": "paste-your-linkedin-client-id-here",
"LINKEDIN_CLIENT_SECRET": "paste-your-linkedin-client-secret-here",
"LINKEDIN_REDIRECT_URI": "http://127.0.0.1:33333/linkedin/oauth/callback",
"LINKEDIN_VERSION": "202607"
}
}
}
}LINKEDIN_VERSION 默认为 202607,与创建此项目时当前的 LinkedIn Marketing API 版本控制指南一致。
OAuth 流程
在你的 LinkedIn 开发者应用中,添加此授权重定向 URL:
http://127.0.0.1:33333/linkedin/oauth/callback使用
LINKEDIN_CLIENT_ID、LINKEDIN_CLIENT_SECRET和LINKEDIN_REDIRECT_URI将 MCP 服务器添加到 OpenWorker。让 OpenWorker 运行
linkedin_start_oauth_flow。MCP 启动一个 localhost 回调服务器,打开你的浏览器访问 LinkedIn,验证返回的
state,交换授权码,并将令牌存储在:
~/.linkedin-mcp-openworker/token.json之后,LinkedIn 工具会自动使用已存储的令牌。使用
linkedin_auth_status检查令牌状态,使用linkedin_logout删除令牌。
默认托管流程使用 LinkedIn 常规的三方 OAuth 授权端点:
https://www.linkedin.com/oauth/v2/authorization这是 LinkedIn 为 OpenID Connect 记录的端点。它默认请求 openid profile email w_member_social,使用你的 client_secret 交换授权码,并将返回的访问令牌和 ID 令牌元数据存储在本地。不要将 auth_method: "pkce" 与 OpenID 作用域一起使用;LinkedIn 会拒绝该组合,并提示 Open ID permission is not supported for PKCE flows.
LinkedIn 的常规三方 OAuth 文档说明重定向 URL 应为 HTTPS。如果 LinkedIn 拒绝你的应用的 localhost 回调 URL,请使用转发到此机器的 HTTPS 回调/隧道 URL,并将 LINKEDIN_REDIRECT_URI 设置为 LinkedIn 开发者门户中注册的准确 URL。
默认情况下,OAuth 工具会在工具结果中对令牌进行脱敏处理。仅当你明确希望结果包含令牌值时,才传递 return_access_token: true。
备注
LinkedIn API 访问权限取决于你的开发者应用已获批准的产品。没有 w_member_social 的令牌无法发布成员帖子,而组织帖子需要组织权限以及具有正确页面角色的已认证成员。
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-qualityDmaintenanceMCP server for LinkedIn, enabling posting, liking, commenting, and profile retrieval via official OAuth 2.0. Features CLI, HTTP admin, and optional Telegram bot.10MIT
- Flicense-qualityCmaintenanceMCP server for LinkedIn API integration. Enables authentication, profile access, connections, search, messaging, and feed management via OAuth2.
- Alicense-qualityBmaintenanceMCP server for AI-native LinkedIn prospecting. It enables lead research, audience building, conversation management, and controlled outreach actions such as messaging and publishing through an OAuth-protected remote endpoint.2MIT
- Alicense-qualityBmaintenanceMCP server that lets you publish text and image posts to LinkedIn, fetch your profile, and check auth status using natural language.MIT
Related MCP Connectors
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
MCP server for LeadDelta — manage LinkedIn connections and CRM data via AI assistants.
linkedin-humblebrag MCP — wraps StupidAPIs (requires X-API-Key)
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/Mohamed-Godaa/linkedin-mcp-openworker'
If you have feedback or need assistance with the MCP directory API, please join our Discord server