Skip to main content
Glama
rgthelen

LinkedIn MCP Server

by rgthelen
README.md
# LinkedIn MCP Server

A Model Context Protocol (MCP) server for LinkedIn integration, allowing Claude to create posts, comment on posts, manage your LinkedIn presence, and share content with media attachments.

## Features

- **Post Management**: Create, delete, and view LinkedIn posts
- **Media Sharing**: Upload and share images/videos with posts
- **Comment System**: Comment on LinkedIn posts
- **Feed Management**: View your LinkedIn feed
- **Profile Access**: Get your LinkedIn profile information
- **Post Engagement**: Like and share LinkedIn posts

## Prerequisites

- Node.js 18+
- LinkedIn Developer Account and Access Token
- Claude Desktop App

## Installation

1. Clone this repository:
```bash
git clone https://github.com/rgthelen/linkedin-mcp-server.git
cd linkedin-mcp-server
```

2. Install dependencies:
```bash
npm install
```

3. Set up LinkedIn API credentials:
   - Go to [LinkedIn Developer Portal](https://developer.linkedin.com/)
   - Create an app or use existing app
   - Generate an access token with appropriate scopes:
     - `r_liteprofile` (to read profile)
     - `r_emailaddress` (to read email)
     - `w_member_social` (to post content)

4. Configure environment variables:
```bash
cp .env.example .env
# Edit .env with your LinkedIn access token
```

5. Build the project:
```bash
npm run build
```

## Configuration

See [CLAUDE.md](./CLAUDE.md) for detailed Claude Desktop setup instructions.

## Available Tools

- `test_linkedin_connection` - Test the LinkedIn API connection
- `get_profile` - Get your LinkedIn profile information
- `create_post` - Create a new LinkedIn post (with optional media)
- `delete_post` - Delete a LinkedIn post
- `get_post` - Get details of a specific post
- `get_feed` - Get posts from your LinkedIn feed
- `comment_post` - Comment on a LinkedIn post
- `like_post` - Like a LinkedIn post
- `share_post` - Share a LinkedIn post

## Usage Examples

With Claude Desktop configured, you can ask Claude:

- "Create a LinkedIn post about my latest project"
- "Share this image with a caption about AI developments"
- "Comment on this LinkedIn post with my professional thoughts"
- "Show me my recent LinkedIn feed"
- "Get my LinkedIn profile information"

## Media Support

The server supports uploading images and videos according to LinkedIn's official API v2 specification:

- **Supported formats**: JPG, PNG, GIF (images), MP4, MOV, AVI (videos)
- **Process**: Automatic media upload, registration, and post creation
- **Usage**: Just provide the file path when creating posts

## License

MIT

TDQS

A3.6/5.0

Scored across 9 tools

Disambiguation5/5

Each tool has a distinct purpose: commenting, posting, deleting, viewing feed/post/profile, liking, sharing, and testing. No overlapping functionality.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with underscores (e.g., create_post, get_feed, like_post). The naming convention is uniform.

Tool Count5/5

9 tools is well-scoped for a LinkedIn server, covering essential actions without being excessive or insufficient.

Completeness4/5

The set covers core LinkedIn interactions (posting, commenting, liking, sharing, viewing), but lacks tools for retrieving comments or updating posts, which are minor gaps.

Maintenance

ActivityInactive
ResponsivenessNo issues