LinkedIn

Publishes text posts to LinkedIn using the UGC Posts API via an MCP stdio server.
  • typescript

0

GitHub Stars

typescript

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "urfanazad-posterlinkedin": {
      "command": "node",
      "args": [
        "C:\\Users\\User\\Desktop\\mcp-linkedin-poster\\dist\\index.js"
      ],
      "env": {
        "LINKEDIN_VERSION": "202502",
        "LINKEDIN_AUTHOR_URN": "urn:li:person:PASTE_ID_HERE",
        "LINKEDIN_ACCESS_TOKEN": "PASTE_TOKEN_HERE"
      }
    }
  }
}

This MCP server allows your ChatGPT or Claude environment to post content to LinkedIn by using the official LinkedIn UGC Posts API and an OAuth 2.0 access token. It runs locally over stdio and is registered in your MCP client settings to publish text updates directly to your LinkedIn profile.

How to use

You run this MCP server locally and connect it to your MCP client. When you want to publish a LinkedIn post, your client sends a request to the stdio-based MCP server, and the server uses your LinkedIn access token to create a UGC post on your profile. Ensure you have your LinkedIn access token and your profile URN set up correctly as environment variables before starting the server.

How to install

Prerequisites: you need Node.js and npm installed on your machine.

  1. Install dependencies. Use your terminal in the project root.

  2. Build the TypeScript source to JavaScript.

  3. Run the server locally to verify it starts and reads environment variables.

  4. Register the MCP server in your MCP client configuration so your client can send requests to it.

Notes and configuration

Environment variables are required for the server to operate. Create a file named .env in the project root and populate the following values.

LINKEDIN_ACCESS_TOKEN=
LINKEDIN_AUTHOR_URN=
LINKEDIN_VERSION=202502

The LINKEDIN_ACCESS_TOKEN is your LinkedIn OAuth 2.0 member access token. LINKEDIN_AUTHOR_URN is your LinkedIn profile URN (for example, urn:li:person:YOUR_ID). LINKEDIN_VERSION is the API version header (optional but safe to specify).

When you are ready to run, compile and start the server. The following commands assume your project is at the typical layout shown in the source and that you are running from the project root.

npm install
npx tsc
node dist/index.js

Security and maintenance tips

Treat LinkedIn tokens like passwords. Do not commit secrets. Prefer injecting secrets through your MCP environment or a secure secret store in production.

If you encounter issues, verify that the required environment variables exist and that the server process can reach LinkedIn endpoints.

Available tools

publishLinkedInPost

Publishes a text post to LinkedIn using the UGC Posts API, including setting visibility and lifecycle state.

getLinkedInUserURN

Retrieves the LinkedIn user URN to identify the author for posts.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
LinkedIn MCP Server - urfanazad/posterlinkedin | VeilStrat