npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

linkedin-post-mcp

v1.0.0

Published

MCP server for creating LinkedIn posts via the LinkedIn REST API

Downloads

158

Readme

linkedin-post-mcp

A Model Context Protocol (MCP) server that lets AI agents (Claude, Cursor, etc.) create and manage LinkedIn posts on your behalf via the LinkedIn REST API.

Features

  • 🔐 OAuth 2.0 Authentication — Secure 3-legged OAuth flow with automatic token refresh
  • 📝 Text Posts — Create plain text posts on your personal profile or company page
  • 🔗 URL/Article Shares — Share links with custom commentary
  • 🗑️ Delete Posts — Remove posts programmatically
  • 👤 Profile Lookup — Fetch your LinkedIn profile and URN
  • 🏢 Company Page Support — Post as a company/organization page

Prerequisites

  1. LinkedIn Developer App — Create one here

    • Enable the "Share on LinkedIn" product
    • Enable "Sign In with LinkedIn using OpenID Connect"
    • Add http://localhost:8080/callback as an authorized redirect URL
    • Copy your CLIENT_ID and CLIENT_SECRET
  2. npm account — Sign up at npmjs.com (only needed to publish)

Installation

npx linkedin-post-mcp@latest

Or install globally:

npm install -g linkedin-post-mcp

Configuration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "linkedin": {
      "command": "npx",
      "args": ["-y", "linkedin-post-mcp@latest"],
      "env": {
        "LINKEDIN_CLIENT_ID": "your_client_id_here",
        "LINKEDIN_CLIENT_SECRET": "your_client_secret_here",
        "LINKEDIN_REDIRECT_URI": "http://localhost:8080/callback"
      }
    }
  }
}

Cursor / Other MCP Hosts

{
  "linkedin-post-mcp": {
    "command": "npx",
    "args": ["-y", "linkedin-post-mcp@latest"],
    "env": {
      "LINKEDIN_CLIENT_ID": "your_client_id_here",
      "LINKEDIN_CLIENT_SECRET": "your_client_secret_here"
    }
  }
}

Authentication Flow

On first use:

  1. Ask the AI: "Get the LinkedIn auth URL"
  2. Open the URL in your browser and authorize the app
  3. LinkedIn redirects you to http://localhost:8080/callback?code=XXX
  4. Copy the code value and tell the AI: "Exchange this code: XXX"
  5. Done! Tokens are stored in ~/.linkedin-mcp-tokens.json

Available Tools

| Tool | Description | |------|-------------| | linkedin_get_auth_url | Generate the OAuth authorization URL | | linkedin_exchange_token | Exchange auth code for access token | | linkedin_get_auth_status | Check if you're authenticated and token expiry | | linkedin_logout | Remove stored tokens | | linkedin_get_profile | Fetch your name, email, and person URN | | linkedin_create_text_post | Create a plain text LinkedIn post | | linkedin_create_post_with_url | Create a post with a shared URL/article | | linkedin_delete_post | Delete a post by its URN |

Example Prompts

"Post on LinkedIn: Excited to announce our new product launch! #tech #startup"

"Share this article on LinkedIn with the comment 'Great read!': https://example.com/article"

"Create a LinkedIn post on behalf of our company page (org ID: 12345678): ..."

"Check my LinkedIn auth status"

"Delete my last LinkedIn post with URN urn:li:share:..."

Environment Variables

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | LINKEDIN_CLIENT_ID | ✅ Yes | — | Your LinkedIn app's Client ID | | LINKEDIN_CLIENT_SECRET | ✅ Yes | — | Your LinkedIn app's Client Secret | | LINKEDIN_REDIRECT_URI | No | http://localhost:8080/callback | OAuth callback URL |

Rate Limits

LinkedIn's API allows approximately 100 API calls per day per member on standard access. The server does not implement rate limit tracking, so be mindful of how frequently you call the tools.

License

MIT