Skip to content

Conversation

udaykakade25
Copy link
Collaborator

Description

Added the MCP server for LinkedIn

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New MCP feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please specify)

How has this been tested?

Worked perfectly fine with Claude.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes

@zihaolin96
Copy link
Contributor

@udaykakade25 Thanks! this is super helpful!
small feedbacks -

  1. could we manage tools code within a new folder, similar to https://github.com/Klavis-AI/klavis/tree/main/mcp_servers/affinity/tools
  2. Could you share some tests screenshots or demo?

@udaykakade25 udaykakade25 marked this pull request as draft July 21, 2025 14:16
@udaykakade25 udaykakade25 marked this pull request as ready for review July 21, 2025 14:29
@udaykakade25
Copy link
Collaborator Author

Here are some screenshots:

  1. SSE Connection established with server.py
ss1
  1. Get Profile Info
ss2
  1. Post Created
post1

Below image shows Text Post created by the mcp server
create11

  1. Article-Style Post
article1

Below image shows article-style post generated on LinkedIn by the server
art1

  1. Search on Linkedin (requires permission)
searchhh

"specificContent": {
"com.linkedin.ugc.ShareContent": {
"shareCommentary": {
"text": f"{title}\n\n{text}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see too much difference between text_post vs article_post, what do you think?

Copy link
Collaborator Author

@udaykakade25 udaykakade25 Jul 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both the functions are mostly same. Text Post has no title while Article Post includes Title and the content.
Should i create function in which title will be optional, so if there's no title - it's text_post otherwise article_post.
UPDATE:
tttt

Comment on lines 12 to 13
# Note: LinkedIn's people search API is heavily restricted and may not be available
# with standard access tokens. This function may return limited results or errors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw your test screenshot , do you know what's the restriction policy? if it requires partnership or more complicated, we can maybe remove this tool

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

search_people() and get_network_updates() requires LinkedIn Marketing Developer Platform Partnership and Marketing API access.
Should i remove these tools?

}

def _get_ssl_context():
"""Create SSL context that doesn't verify certificates (for development/testing)."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you elaborate a bit on this?
will it effect prod?

Copy link
Collaborator Author

@udaykakade25 udaykakade25 Jul 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right.
I had to disable SSL for development and testing temporarily.
Let me secure it before adding it to the codebase.
UPDATE: Fixed!

Copy link
Contributor

@zihaolin96 zihaolin96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! just left a few comments, Thank you!

@zihaolin96 zihaolin96 merged commit c493bb7 into Klavis-AI:main Jul 22, 2025
1 check passed
@udaykakade25 udaykakade25 deleted the mcplinkedin branch July 23, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants