LinkedIn MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LinkedIn MCPDraft a LinkedIn post about our launch, don't publish yet"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
LinkedIn MCP
An approval-first Model Context Protocol (MCP) server for authorized LinkedIn workflows. It supports OAuth token exchange, basic OpenID profile retrieval, profile rewrite planning, post drafts, and explicit-approval publishing through LinkedIn's official Posts API.
API limitation: LinkedIn does not generally allow ordinary developer apps to edit a member's headline, About, experience, or skills directly. Those features are draft-and-review workflows unless LinkedIn grants a supported API capability. Access to products and scopes is controlled by LinkedIn.
Features
MCP tools usable by compatible LLM clients.
OAuth 2.0 authorization-code flow; secrets are read from environment variables.
Basic member profile fields through OpenID Connect
userinfo.Profile restructuring proposals without pretending to write unsupported fields.
Post drafting and explicit-approval publishing through the official API.
No browser scraping, password collection, or session-cookie automation.
Related MCP server: LinkedIn MCP Server
Quick start
Requirements: Python 3.11+, a LinkedIn developer app, and access to the products/scopes required for your intended operations.
git clone https://github.com/rohankumbhar-01/linkedin-mcp.git
cd linkedin-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e .
cp .env.example .envSet LINKEDIN_CLIENT_ID, LINKEDIN_CLIENT_SECRET, and LINKEDIN_REDIRECT_URI in .env. Add the exact redirect URI in the LinkedIn Developer Portal. Do not commit .env or token files.
Run locally:
linkedin-mcpThe default transport is stdio, suitable for local MCP clients. The server also supports MCP_TRANSPORT=streamable-http, but do not expose it publicly until authentication, TLS, and network access controls have been configured. A public MCP endpoint needs its own client authentication and authorization layer; LinkedIn OAuth alone does not protect the MCP endpoint.
OAuth flow
Call
linkedin_start_oauth.Open the returned authorization URL and approve the permissions.
The redirect URL includes
codeandstate. Pass both tolinkedin_exchange_codein the same running server session.Call
linkedin_connection_statusandlinkedin_get_my_profile.
The configured redirect URI must exactly match the LinkedIn developer app setting. Requested scopes only work if the app has the relevant product access. The token is stored in ~/.linkedin-mcp/token.json with owner-only permissions where supported. For production, use a managed secret store or encrypted token storage and add refresh/revocation handling.
MCP tools
Tool | Purpose |
| Check token status without revealing it |
| Generate authorization URL and CSRF state |
| Exchange the code and store token |
| Read basic OpenID profile data |
| Prepare profile rewrite instructions; no writes |
| Prepare a post draft |
| Publish only when |
| Report implemented capabilities and API limitations |
LinkedIn API access
OAuth: https://learn.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow
OpenID Connect: https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin-v2
Posts API: https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/posts-api
API terms: https://developer.linkedin.com/legal
Before production use, confirm the current supported LINKEDIN_API_VERSION, endpoint payload requirements, and app permissions against the official documentation. API access can vary by app/product approval.
Security checklist before remote hosting
Add authentication for MCP clients; never expose an unauthenticated public MCP endpoint.
Use HTTPS and a reverse proxy with strict access controls.
Store client secrets and tokens in a secret manager or encrypted store.
Implement token refresh/revocation and OAuth callback handling appropriate for the deployment.
Add audit logging without logging secrets or full tokens.
Keep publishing approval explicit and show the exact text before publishing.
Add tests and CI before using this with a real LinkedIn account.
Current scope and limitations
This is an initial implementation, not a promise that every LinkedIn action is available. It does not scrape LinkedIn pages or bypass access restrictions. Direct edits to headline, About, work experience, and skills are not implemented because those write operations are not generally available through standard member APIs. The initial OAuth exchange expects the authorization code and state to be submitted manually to the MCP tool; a production deployment should add a dedicated callback flow and state/session persistence.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
- linkedinOAuthio.reachium
LinkedIn campaigns, content, leads and inbox from your AI client. Scoped, revocable keys.
LinkedIn jobs, companies and people for AI agents, plus messages and invites via your own account.
LinkedIn for AI agents: inbox, invitations, Sales Navigator search, posts, jobs, quotas, webhooks.
OAuth 2.1 short-link tools for AI agents with scoped tokens, approvals, audit logs, and revocation.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with LinkedIn for posting, commenting, liking, and managing connections via OAuth2 authentication.9 npmMIT
- FlicenseAqualityDmaintenanceEnables LLMs and agents to interact with LinkedIn's REST API for managing profiles, creating posts, viewing connections, and overseeing organizations.52-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with LinkedIn using the official API for profile access, company management, and job postings.Apache 2.0
- 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