摘要
通过MCP将LinkedIn API连接到ChatGPT。使用AnythingMCP以自然语言分析公司页面、帖子和关注者分析。
使用ChatGPT分析你的LinkedIn存在
LinkedIn没有官方的MCP连接器。通过AnythingMCP,你可以将LinkedIn的营销和社区管理API转换为MCP服务器,让ChatGPT分析你的公司页面表现。
分步指南
第一步:部署AnythingMCP
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
第二步:获取LinkedIn API访问权限
在https://www.linkedin.com/developers/创建一个应用。请求营销API产品。生成具有r_organization_social和r_organization_followers范围的OAuth 2.0访问令牌。
第三步:创建REST连接器
创建一个基础URL为https://api.linkedin.com/v2的REST连接器。设置Bearer令牌身份验证,并添加X-Restli-Protocol-Version: 2.0.0头。
第四步:暴露关键端点
GET /organizationalEntityFollowerStatistics— 关注者人口统计GET /organizationalEntityShareStatistics— 帖子表现GET /shares— 已发布的帖子GET /organizationPageStatistics— 页面浏览量和访客
第五步:连接ChatGPT
ChatGPT 从 OpenAI 的服务器发起连接,因此你的 AnythingMCP 实例需要公网 HTTPS URL,localhost 无法使用。也可以直接使用 cloud.anythingmcp.com。
- 前往 chatgpt.com/plugins,点击 Add,然后选择 Add custom MCP server。
- 填写名称,例如 Name:
AnythingMCP。 - 在 Connection 下的 Server URL 中填入
https://your-anythingmcp-instance.com/mcp,Authentication 保持为 OAuth。 - 选择 I understand and want to continue,然后点击 Create as a plugin。ChatGPT 提示时,登录 AnythingMCP 并允许访问。
- 在个人插件中安装这个新插件,然后在对话中输入 @ 并选择它。
第六步:分析你的LinkedIn表现
- "我们公司页面这个月获得了多少新关注者?"
- "哪些帖子获得了最高的互动?"
- "我们的关注者来自哪些行业?"
- "比较我们本季度与上季度的页面表现"
下一步
- 如何将REST API转换为MCP
- 将Instagram连接到ChatGPT
- 连接到 Claude
- 连接到 Cursor
- 连接到 Gemini
- 连接到 Meta Muse
- 连接到 Microsoft Copilot
这份指南对你有帮助吗?