# LinkedIn Page Management MCP

> LinkedIn Page Management gives your AI agent full control over a company's LinkedIn presence. You can programmatically list all managed pages, publish new text posts to the feed using `create_page_post`, moderate comments with `list_post_comments`, and track engagement metrics like likes or reactions via `list_post_likes`. It handles content creation and community moderation through natural language commands.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** social-media-management, content-publishing, community-moderation, engagement-tracking, social-analytics

## Description

You've got full control over a company’s LinkedIn presence with this server. Your AI agent can handle everything from posting updates to moderating comment threads, all through natural language commands. You don't have to leave your workflow tool just because you need to manage social media.

**Auditing and Scope:** First things first, you gotta know what accounts are even available. If you run `list_managed_pages`, it pulls up a complete list of every single LinkedIn Company Page where your account has admin rights. That gives you the full scope of pages you can actually work with.

**Content Publishing and Management:** When you're ready to talk shop, you use `create_page_post` to write and publish new text updates straight to a specific Company Page feed. You don't just post it; your agent makes sure the content hits exactly where it needs to go. If you need to clean up old noise, you first pull the history of existing posts using `list_page_posts`. Then, if something's out of date or off-brand, you use `delete_page_post` to permanently remove that specific post from the feed.

**Tracking and Metrics:** To figure out if your content is actually landing right, you track engagement. You run `list_post_likes` against a specific post ID, which lists all the likes and reactions attached, letting you measure how much of an impact your posts are having. If you want to see exactly what people are saying about that post—the good, the bad, or the totally off-topic stuff—you run `list_post_comments`. This retrieves every comment left on a specific post ID, giving your agent all the data it needs for community moderation checks.

**Community Moderation and Interaction:** Once you see those comments using `list_post_comments`, your agent can jump in. You'll use `create_post_comment` to add an official reply or comment directly onto a specific post, making sure the organization speaks with one voice. This lets you analyze discussions and respond immediately when needed.

In short, this set of tools gives your AI client everything it needs: **list_managed_pages** shows you what's available; **create_page_post** publishes new content; **list_page_posts** helps you audit the history; **delete_page_post** cleans up messes; **list_post_likes** tracks engagement metrics; and finally, combining **list_post_comments**, **create_post_comment**, and **list_post_comments** gives your agent full power over community moderation.

## Tools

### create_page_post
Writes and publishes a new text update to a specified Company Page feed.

### create_post_comment
Adds an official comment or reply to a specific post on behalf of the organization.

### delete_page_post
Removes and deletes a specified, existing post from a Company Page feed.

### list_managed_pages
Retrieves a list of all LinkedIn Company Pages where the authenticated user has administrative management roles.

### list_page_posts
Fetches and lists recent posts that have been published by a specified Company Page.

### list_post_comments
Retrieves all comments left on a specific post ID, allowing for community moderation checks.

### list_post_likes
Lists the likes and reactions attached to a specified post ID for engagement tracking.

## Prompt Examples

**Prompt:** 
```
List all LinkedIn Company Pages I manage.
```

**Response:** 
```
I've retrieved your managed pages. You have roles on 2 pages: 'Global Tech Solutions (ID: 12345)' and 'Creative Agency (ID: 67890)'.
```

**Prompt:** 
```
Create a new post on page '12345' with the text 'Welcome to our weekly update!'.
```

**Response:** 
```
Successfully published your post to Global Tech Solutions. The post URN is 'urn:li:share:987654321'.
```

**Prompt:** 
```
Show comments for the post 'urn:li:share:987654321'.
```

**Response:** 
```
I found 3 comments on that post. Highlights include a question from 'Jane Smith' about product availability and a thank you message from 'Robert Brown'.
```

## Capabilities

### Publish Company Updates
Write and post text updates directly to any managed LinkedIn Company Page feed.

### Moderate Comment Threads
Retrieve all comments made on a specific post, allowing your agent to analyze discussions or draft official replies.

### Track Post Engagement
List likes and reactions attached to any given post ID so you can measure how much content resonated with the audience.

### Delete Old Content
Permanently remove specific posts from a Company Page feed, maintaining brand cleanliness and relevance.

### Audit Managed Pages
List all LinkedIn Company Pages where the connected user has management rights, providing a clear scope of available accounts.

## Use Cases

### Responding to a Viral Question
A key stakeholder notices high engagement on an old product announcement. They ask their agent, 'What are people saying about the pricing?' The agent first runs `list_post_comments` for that post, filters through the results to find questions, and drafts a comprehensive answer for review.

### Weekly Content Audit
A social media manager needs to prepare for next week's content. They run `list_managed_pages` to confirm all relevant accounts are connected, then use `list_page_posts` to pull the last 20 posts, identifying which ones need updating or deleting.

### Cleaning Up Old Promotions
The marketing team needs to remove several old holiday sale announcements. They identify the post URNs and use `delete_page_post` for each one in a single command, ensuring the page looks clean without manual logging in.

### Monitoring Campaign Success
A community lead wants to know if their latest article resonated. They feed the agent the post URN and ask it to check engagement. The agent runs `list_post_likes` immediately, giving them a clear view of positive reception.

## Benefits

- **Post Content Fast:** Use `create_page_post` to publish updates instantly. Your agent writes the copy and hits 'send' for your Company Page feed—no manual dashboard switching required.
- **Moderate Comments Effortlessly:** Never miss a conversation. With `list_post_comments`, you pull all comments on a post right into your chat window, letting your agent draft replies immediately.
- **Track Engagement Simply:** Stop guessing about performance. `list_post_likes` gives you the exact count and details of reactions for any given post ID, giving real-time metrics.
- **Maintain Clean Pages:** Outdated content clutters things up. Use `delete_page_post` to permanently remove specific posts across your managed accounts, keeping the feed sharp.
- **Know Your Scope:** Need to know which pages you can actually post to? Run `list_managed_pages`. It gives a clear list of every page where your user has management access.

## How It Works

The bottom line is: You set up authentication once, and your AI client handles all the API calls for you.

1. Subscribe to this server and provide your LinkedIn Access Token (must include organization social scopes) and API Version.
2. Tell your AI client exactly what you need done—for example, 'Get all comments for post X.'
3. The agent uses the appropriate tool (e.g., `list_post_comments`) to execute the action and returns a structured list of data.

## Frequently Asked Questions

**How do I list all LinkedIn Company Pages I manage using `list_managed_pages`?**
You call the `list_managed_pages` tool. It returns a structured JSON object containing IDs and names of every page where your connected account has management rights. This is vital before you attempt to post anywhere.

**What do I need to do before calling `create_page_post`?**
You must first confirm the Page ID using `list_managed_pages`. Then, structure your prompt with both the target Page ID and the full text content for the post. The agent executes it in one go.

**Can I delete a comment thread using `delete_page_post`?**
No. `delete_page_post` only deletes the entire post container. If you want to moderate, use `list_post_comments` first to see all comments, and then address them via replies or manually deleting individual comments (if that tool were available).

**How do I check if a post got likes using `list_post_likes`?**
You need the unique URN of the post. Pass this URN to the `list_post_likes` tool, and it returns a list containing details about every like or reaction recorded on that specific piece of content.

**How do I list all comments on a post using `list_post_comments`?**
It retrieves every comment associated with a specific post URN. The output includes the commenter's name, their profile link, and the full text of the comment.

**What details should I provide when calling `create_page_post`?**
You must provide the target page ID and the content string for the post. It's best practice to include hashtags or mentions in the text itself for better visibility.

**Is there a way to remove older posts using `delete_page_post`?**
Yes, you can delete specific posts by providing their unique URN. You need this identifier because the function requires an exact post reference for deletion.

**What happens if I try to comment on a private page using `create_post_comment`?**
The server will return a permissions error, preventing the action. This means your agent must have appropriate organizational roles assigned to the target page.

**Which scopes are required to post as an organization?**
Your access token must include `w_organization_social` to create posts and comments, and `r_organization_social` to list them.

**How do I find my Organization ID?**
Use the `list_managed_pages` tool. It will return all organizations where you have management roles along with their unique IDs.

**Can I reply to a specific comment?**
The current version supports creating top-level comments on posts. Support for threaded replies (using the `parent` field) is handled via the same comment tool by providing the parent URN if supported by the engine.