# LinkedIn — how to use (mcp.ai)

LinkedIn in natural language, within the scope LinkedIn auto-approves for self-serve apps: read your own profile, publish posts on your wall and delete your own posts. The platform provides the OAuth app, just click Connect and pick your LinkedIn account. Multiple accounts can be connected to the same MCP. Reading other people's profiles, search, Sales Navigator and Recruiter require LinkedIn partner approval and are not available here.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_linkedin?ms=1788955920000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `linkedin_get_my_info`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/linkedin`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/linkedin/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/linkedin/get/my/info` — Fetches the authenticated LinkedIn user's profile information including name, headline, picture and the author URN (sub) needed to publish. Open Permissions only (openid/profile/email).
- `POST https://api.mcp.ai/api/linkedin/create/linked/in/post` — Creates a new text post on LinkedIn for the authenticated user, on their own wall. Uses the w_member_social Open Permission.
  - body: { author: string, commentary: string, visibility?: string, lifecycleState?: string }
- `POST https://api.mcp.ai/api/linkedin/delete/linked/in/post` — Deletes one of the authenticated user's own LinkedIn posts (share) by its unique share_id. Uses the w_member_social Open Permission.
  - body: { share_id: string }

## Example prompts
- "Post on my LinkedIn a summary of my latest project"
- "Publish an announcement on my LinkedIn with this text"
- "Delete my last LinkedIn post"

## More
- Page: https://mcp.ai/linkedin
- Agent spec (llms.txt): https://mcp.ai/linkedin/llms.txt
- Postman collection: https://mcp.ai/linkedin/postman.json
