Quick overview
This workflow exposes LinkedIn posting and engagement actions as MCP tools behind a bearer-authenticated endpoint, letting an MCP-compatible AI agent create text/image/link posts and manage or interact with posts (list, fetch, edit, delete, comment, react) using the LinkedIn REST API.
How it works
- Receives MCP tool calls via the MCP Server Trigger webhook secured with bearer token authentication.
- Creates a new LinkedIn post as either a text update, an image post (from incoming binary data), or an article/link share with a URL preview.
- Retrieves LinkedIn data by fetching the connected profile, listing the 10 most recent posts by the configured author, or fetching a specific post by URN.
- Manages published content by editing a post’s commentary text or deleting a post by its URN.
- Engages with existing posts by adding comments, listing comments, adding a reaction, listing reactions, removing the connected account’s reaction, or deleting a specific comment by ID.
Setup
- Create and select a LinkedIn OAuth2 credential with permissions/products to call the LinkedIn REST APIs used for posting and reading user info.
- Create a Bearer Auth credential for the MCP Server Trigger and use the same token in your AI client’s MCP configuration.
- In n8n Settings → Variables, add
linkedin_person_urn and set it to your LinkedIn person ID (you can retrieve it by calling the “Get my LinkedIn profile” tool).
- Copy the MCP Server Trigger production webhook URL into your MCP client so it can call these tools.
- For image posts, ensure your MCP client sends the image file as binary data and specify the correct input binary field name when calling the image-post tool.