# LinkedIn — how to use (mcp.ai)

LinkedIn in natural language. Read your own profile, publish posts on your wall, delete your own posts and list the companies you administer. 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 may return permission errors.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_linkedin?ms=1781412300000`
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_create_linked_in_post`).

## 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/create/linked/in/post` — Creates a new post on linkedin for the authenticated user or an organization they manage; ensure the user has necessary permissions if posting for an organization.
  - body: { author: string, commentary: string, visibility?: string, distribution?: object, lifecycleState?: string, isReshareDisabledByAuthor?: boolean }
- `POST https://api.mcp.ai/api/linkedin/delete/linked/in/post` — Deletes a specific linkedin post (share) by its unique `share id`, which must correspond to an existing share.
  - body: { share_id: string }
- `POST https://api.mcp.ai/api/linkedin/get/company/info` — Retrieves organizations where the authenticated user has specific roles (acls), to determine their management or content posting capabilities for linkedin company pages.
  - body: { role?: string, count?: integer, start?: integer, state?: string }
- `POST https://api.mcp.ai/api/linkedin/get/my/info` — Fetches the authenticated linkedin user's profile, notably including the 'author id' required for attributing content such as posts or articles.

## Example prompts
- "Post on my LinkedIn a summary of my latest project"
- "Share this link on my LinkedIn with a short intro"
- "Comment on post X saying Y"

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