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 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メッセージを待機します。標準出力はMCPプロトコル用に予約されているため、アプリケーションログを標準出力に出力しないでください。
MCPインスペクター
ローカル開発用:
npx @modelcontextprotocol/inspector \
python -m src.linkedin_mcp.serverその後、STDIOサーバーに接続し、インスペクターから linkedin_create_post を呼び出します。
テスト
実行:
pytest -qセキュリティに関する注意事項
機密情報はGitで無視されるローカルファイルに保存されます。
.env.exampleにはプレースホルダーのみが含まれています。GitHubのプッシュ保護は有効にしたままにしてください。
LinkedInトークンが漏洩した場合は、直ちに失効/ローテーションしてください。
ポートフォリオの説明
LinkedIn公開機能を構造化されたAIツールとして公開する、プロダクション志向のMCPサーバーです。Model Context Protocol、OAuthベースのLinkedIn認証、安全なローカル認証情報の取り扱い、REST API統合を組み合わせています。
This server cannot be deployed
Maintenance
Related MCP Connectors
Schedule and publish LinkedIn posts to profiles and company pages from AI agents.
Draft LinkedIn posts in your voice, then schedule or publish them through LinkedIn's official API.
- mcpOAuthcom.curviate
LinkedIn actions for AI agents: search, messaging, posts and invites, as hosted MCP tools.
PerfectPost is a LinkedIn content management platform. This MCP server gives AI assistants read and write access to a user's PerfectPost account: published posts with their engagement analytics, drafts lifecycle (create / edit / schedule), and LinkedIn profile data.
Related MCP Servers
- AlicenseBqualityCmaintenanceAllows AI agents to authenticate with LinkedIn and share posts or links via the Model Context Protocol.2115 npmMIT
- AlicenseBqualityDmaintenanceEnables drafting, formatting, analyzing, and publishing LinkedIn posts directly from MCP-compatible clients like Claude.5115 npmMIT
- AlicenseAqualityBmaintenanceEnables AI agents to publish posts, images, videos, and articles to LinkedIn.10MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to audit professional profiles, check policy compliance, preview posts, and publish explicitly confirmed text posts through LinkedIn's official API.MIT