Loading connector details…
Loading connector details…
Choose a unique username to continue using AgentHotspot
by eliasbiondo • Uncategorized
🔗 A Model Context Protocol (MCP) server for LinkedIn — search people, companies, and jobs, scrape profiles, and get structured data via any MCP-compatible AI client.
🔗 A Model Context Protocol (MCP) server for LinkedIn — search people, companies, and jobs, scrape profiles, and get structured data via any MCP-compatible AI client.
Generate the LinkedIn OAuth 2.0 authorization URL for browser login. This tool generates the authorization URL that users must visit in their browser to grant permissions to this MCP server. After authorization, LinkedIn redirects to the configured redirect URI with an authorization code. This tool does NOT perform the authentication itself, only generates the URL. Returns: str: Markdown-formatted message containing: - Authorization URL with proper OAuth 2.0 parameters - Step-by-step instructions for completing authentication - Instructions for using linkedin_exchange_code tool Or error message if client credentials are not configured. Examples: - Use when: Starting a new authentication flow - Use when: Access token has expired and needs refresh - Don't use when: You already have a valid access token - Don't use when: You need to exchange an auth code (use linkedin_exchange_code) Error Handling: - Returns "Error: LINKEDIN_CLIENT_ID not configured in .env" if credentials missing - No network errors possible (URL generation only) OAuth Scopes Requested: - openid: Standard OIDC authentication - profile: Access to basic profile information - email: Access to email address - w_member_social: Create posts and shares
Exchange the browser-provided authorization code for a persistent access token. After a user authorizes via the OAuth URL, LinkedIn redirects with an authorization code in the URL. This tool exchanges that code for an access token and saves it to the .env file for future use. The access token is required for all LinkedIn API operations. This tool modifies the .env file. Args: code (str): The authorization code from LinkedIn OAuth redirect URL (e.g., "AQTvqXXXXXXXXXXX" - found in the 'code' parameter after redirect) Returns: str: Success message with token expiration time in format: "✅ Success! Access Token saved. Expires in {seconds} seconds." Or error message: "Error: Missing client credentials (ID or Secret)." "Error exchanging code: {details}" "Error: {exception message}" Examples: - Use when: You have an authorization code from OAuth redirect - Use when: Setting up authentication for the first time - Don't use when: You already have a valid access token - Don't use when: You need to generate the OAuth URL (use linkedin_get_oauth_url) Error Handling: - Returns "Error: Missing client credentials" if LINKEDIN_CLIENT_ID or LINKEDIN_CLIENT_SECRET not set - Returns detailed error message if token exchange fails (invalid code, network error, etc.) - Automatically updates .env file with new token on success Side Effects: - Writes LINKEDIN_ACCESS_TOKEN to .env file - Creates .env file if it doesn't exist
Fetch the authenticated user's profile information (Name, Email, Picture). This tool retrieves the profile information for the currently authenticated user using the OpenID Connect userinfo endpoint. It provides reliable access to basic profile data including name, email, and profile picture. This tool does NOT retrieve connection information, work history, or detailed profile sections. Returns: str: JSON-formatted string containing profile data with the following schema: Success response: { "id": str, # LinkedIn member ID (e.g., "Ab12CDeFgH") "name": str, # Full name (e.g., "John Doe") "given_name": str, # First name (e.g., "John") "family_name": str, # Last name (e.g., "Doe") "email": str, # Email address (e.g., "john.doe@example.com") "email_verified": bool, # Whether email is verified "picture": str, # Profile picture URL "locale": str # Locale preference (e.g., "en_US") } Error response: "Error: Unauthorized (401). Your access token might be invalid or expired." "Error: {error message}" Examples: - Use when: "What's my LinkedIn email address?" - Use when: "Show me my profile information" - Use when: Need to get the authenticated user's ID for other operations - Don't use when: Looking for another user's profile (use linkedin_get_member_profile) - Don't use when: Need detailed work history or connections Error Handling: - Returns "Error: Unauthorized (401)" if access token is invalid or expired - Returns "Error: Rate limit exceeded" for 429 status - Returns formatted error message for other API failures Required Permissions: - openid, profile, email scopes (standard with OAuth flow)
Fetch a specific member's profile by their URN (e.g., 'urn:li:person:123'). This tool retrieves public profile information for a LinkedIn member specified by their URN (Uniform Resource Name). The available data depends on the viewer's relationship with the member and the member's privacy settings. This tool does NOT modify profiles or send connection requests. Args: member_urn (str): The LinkedIn member URN in format 'urn:li:person:{id}' (e.g., "urn:li:person:Ab12CDeFgH") Returns: str: JSON-formatted string containing available profile data Success response includes fields like: { "id": str, # Member URN "firstName": str, # Member's first name "lastName": str, # Member's last name "headline": str, # Professional headline ... # Additional fields based on permissions } Error response: "Error: Resource not found" if member doesn't exist or is inaccessible "Error: Forbidden (403)" if lacking permissions "Error: {error message}" Examples: - Use when: "Get profile for member urn:li:person:XYZ" - Use when: Need details about a specific LinkedIn member - Don't use when: You want your own profile (use linkedin_get_my_profile) - Don't use when: Searching for members by name (use linkedin_search_people) Error Handling: - Returns "Error: Resource not found" for invalid or inaccessible URNs (404) - Returns "Error: Forbidden (403)" if you lack permissions to view the profile - Returns "Error: Unauthorized (401)" if access token is invalid - Returns formatted error for other API failures Required Permissions: - r_basicprofile or equivalent profile viewing permissions - Access depends on connection relationship and privacy settings
Create a new text-based update on the user LinkedIn feed. This tool publishes a text-only post to the authenticated user's LinkedIn feed. The post will be visible to the specified audience (public or connections only). This tool does NOT support images, videos, articles, or polls - use linkedin_create_image_post for posts with images. Args: text (str): The content of the post, supports plain text and LinkedIn-formatted text (e.g., "Excited to announce my new project! #innovation #tech") Maximum length: 3000 characters visibility (str): Post visibility setting, must be 'PUBLIC' or 'CONNECTIONS' (default: 'PUBLIC') - PUBLIC: Visible to anyone on LinkedIn - CONNECTIONS: Only visible to your connections Returns: str: Success message with post ID in format: "✅ Post created successfully. ID: urn:li:share:123456789" Or error message: "Error: {error message}" Examples: - Use when: "Post 'Just published a new article on AI' to LinkedIn" - Use when: "Share an update with my connections about the project launch" - Use when: Creating text-only status updates or announcements - Don't use when: You want to include an image (use linkedin_create_image_post) - Don't use when: You want to edit an existing post (use linkedin_update_post) - Don't use when: You want to share a URL with rich preview (may need image post) Error Handling: - Returns "Error: Unauthorized (401)" if access token is invalid or expired - Returns "Error: Forbidden (403)" if lacking w_member_social permission - Returns "Error: Rate limit exceeded" for 429 status - Returns formatted error for validation failures or other API errors Required Permissions: - w_member_social: Required to create posts and shares
Scores are informational only and provided “as is” without warranty. AgentHotspot assumes no liability for actions taken based on these ratings.