LinkedIn MCP Server
Click on "Install 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 MCP ServerPost on LinkedIn: 'Hiring for senior role'"
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 Server
A production-quality Model Context Protocol server that exposes LinkedIn actions (post, comment, search, connections, messaging, and anything else Composio's LinkedIn toolkit adds) to Claude and ChatGPT. Built for personal, single-user use with Composio as the auth/action layer, deployed on Alpic.
Features
Fully dynamic tool discovery — every LinkedIn action Composio exposes is registered as an MCP tool at startup and refreshed on demand via
linkedin_mcp_list_tools. No tool names are hardcoded.Automatic LinkedIn auth — on startup, checks whether the fixed user is connected; if not, starts the OAuth flow, logs the authorization URL, and waits (bounded timeout) for the connection to complete.
Structured logging — JSON logs via
structlog, rotating log file underlogs/, one line per startup, shutdown, tool call (with latency and outcome), and exception.Local stats tracking — total/successful/failed calls, average latency, last execution, startup time, and uptime, persisted to a local JSON file (
linkedin_mcp_healthtool, or readSTATS_FILEdirectly).Health reporting —
linkedin_mcp_healthreports server, LinkedIn connection, and Composio reachability.Never crashes — every Composio/network/auth failure is caught and returned as a normal (but error-flagged) tool result, never an unhandled exception.
Streamable-HTTP transport, binding
PORT/HOST— ready for Alpic's hosting model.
Related MCP server: LinkedIn MCP Server
Architecture
src/
├── server.py # FastMCP app + entrypoint; wires everything together
├── composio_client.py # Thin wrapper around the Composio SDK (LinkedIn toolkit only)
├── tool_registry.py # Dynamic MCP tool list/dispatch: static utility tools + every LinkedIn action
├── config.py # Settings loaded from environment / .env
├── logger.py # structlog + rotating file handler setup
├── stats.py # JSON-backed call statistics tracker
├── health.py # Health status aggregation
├── models.py # Shared Pydantic models
└── utils.py # Retry/backoff decorator, TimerThe four static tools (linkedin_mcp_ping, linkedin_mcp_health, linkedin_mcp_version,
linkedin_mcp_list_tools) are always available. Every other tool name is a Composio LinkedIn action slug
(e.g. LINKEDIN_CREATE_LINKED_IN_POST, LINKEDIN_GET_MY_INFO, LINKEDIN_CREATE_COMMENT_ON_POST, ...) —
call linkedin_mcp_list_tools at any time to see the current live list with descriptions.
Available LinkedIn Tools
The server's Composio session is scoped to exactly these 22 LinkedIn actions (see
ENABLED_LINKEDIN_TOOLS in src/composio_client.py) — this is what's actually enabled for the
connected account, not every action Composio's LinkedIn toolkit supports. Full JSON Schemas
(all fields, nested objects, enums) are always available live via the linkedin_mcp_list_tools
tool; this table is a quick-reference summary of required parameters and when to use each one.
Tool | Required parameters | Use case |
|
| Publish a post — as yourself or a company page you administer. Optional: |
|
| Share a link/article with optional commentary, via the older UGC Posts API. |
|
| Comment on a post, or reply to a comment via |
|
| Delete a post by its share id/URN. |
|
| Delete a post via the newer Posts API; idempotent. |
|
| Delete a post via the legacy UGC Post API; idempotent. |
| (none) | Get your own profile (name, headline, person URN) — needed to get your |
|
| Look up another member's basic profile by id. |
|
| Fetch the full content/metadata of an existing post by URN. |
|
| See who reacted to a post/comment and what reaction type. Optional: |
| (none) | List organizations you administer/manage — the way to find your company page's URN for posting as an org. |
|
| Get a company page's follower count. |
|
| Company page engagement stats (views, button clicks) — lifetime, or time-bound with |
|
| Company page content performance (impressions, clicks, likes, comments, shares). Optional |
| (none) | Discover which ad targeting categories exist (locations, industries, job functions, ...) before building a campaign. |
|
| Typeahead-search a targeting facet (e.g. resolve "United States" to its geo URN) before using it in targeting criteria. |
|
| Estimate the audience size for a given (URL-encoded) targeting criteria string, for ad campaign planning. |
|
| Step 1 of the newer image-upload flow: get a presigned |
|
| Step 1 of the legacy image-upload flow for feed shares; same upload-then-reference pattern as above. |
|
| Get one image's status, dimensions, and download URL. |
|
| Batch image metadata lookup. |
| one of | Get video metadata — single, batch, or every video for a sponsored account (paginated via |
Installation
Requires Python 3.12+ and uv.
git clone <this-repo>
cd linkedin-mcp
uv venv
uv pip install -e ".[dev]"Configuration
Copy .env.example to .env and fill in your Composio API key:
cp .env.example .envVariable | Required | Default | Description |
| Yes | — | Your Composio API key. Get one at https://app.composio.dev |
| Yes | — | Your Composio account's user id (from the dashboard) — tool calls are scoped to this user |
| No | — | Composio project id, for reference only (not sent to the SDK) |
| No | — | Composio org id, for reference only (not sent to the SDK) |
| No | — | Composio org member email, for reference only |
| No | Composio default | Use a specific LinkedIn auth config instead of the default one |
| No |
|
|
| No |
| Directory for the rotating log file |
| No |
| Path to the persisted stats JSON file |
| No |
| Max time to wait for LinkedIn OAuth to complete at startup |
| No |
| Bind port (Alpic sets this automatically at deploy time) |
Never hardcode COMPOSIO_API_KEY anywhere — it's read exclusively from the environment.
Running locally
uv run python -m src.serverOn first run, if LinkedIn isn't connected yet for the fixed user (selvin), the server logs an
authorization URL and waits for you to complete the OAuth flow in a browser before finishing startup.
Test it's alive:
curl -X POST http://localhost:8000/mcp \
-H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"0"}}}'Running with Docker
docker build -t linkedin-mcp .
docker run --rm -p 8000:8000 --env-file .env linkedin-mcpDeploying to Alpic
npm install -g alpic # once
alpic login # or set ALPIC_API_KEY
alpic environment-variable add --env-file .env --environment-id <id>
alpic deploy --runtime python3.13Alpic prints the live MCP server URL and a /try playground URL on success. See
alpic deployment logs --deployment-id <id> if a deploy fails — check that COMPOSIO_API_KEY is set on the
target environment first (missing env vars are the most common startup crash cause).
Connecting from Claude Desktop
Deploy first (or run locally and expose it, e.g. with
ngrok http 8000).In Claude Desktop: Settings → Connectors → Add custom connector.
Paste the Alpic-hosted MCP URL (ends in
/mcp).Claude will list
linkedin_mcp_ping,linkedin_mcp_health, and every discovered LinkedIn action.
Connecting from ChatGPT
In ChatGPT: Settings → Connectors → Advanced settings → Developer mode (required for full custom tool calling, not just search/fetch).
Add custom connector, paste the Alpic-hosted MCP URL.
Enable the connector in a chat and ChatGPT can call any LinkedIn action directly.
Troubleshooting
Symptom | Likely cause | Fix |
Server won't start / crashes immediately |
| Set it before first deploy/run — this is the one thing that must be present |
| OAuth never completed | Check server logs for the authorization URL, visit it, then call |
| Bad API key or Composio outage | Verify |
A LinkedIn tool call errors out | Expired auth, missing scope, or bad input | The error message is returned verbatim from Composio/LinkedIn in the tool result — read it, it's usually actionable |
New Composio LinkedIn action doesn't show up | Local schema cache | Call |
Alpic deploy fails at "start" phase | Missing env var or wrong port binding |
|
Testing
uv run pytestLicense
MIT — see LICENSE.
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-qualityCmaintenanceEnables AI agents to interact with LinkedIn for posting, commenting, liking, and managing connections via OAuth2 authentication.24MIT
- AlicenseBqualityCmaintenanceEnables AI agents to manage LinkedIn profiles, posts, connections, skills, education, and certifications through the LinkedIn API.1817664MIT
- AlicenseAqualityDmaintenanceEnables Claude to interact with LinkedIn for posting, commenting, sharing media, and viewing feed and profile.91473MIT
- Alicense-qualityDmaintenanceEnables AI assistants to interact with LinkedIn using the official API for profile access, company management, and job postings.Apache 2.0
Related MCP Connectors
Draft, schedule, publish, and analyze your LinkedIn posts from your AI assistant via Taplio.
Give AI agents the LinkedIn tools to find, qualify, engage, and follow up with prospects.
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/selvin-paul-raj/Linkedin-Alpic-Mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server