Skip to main content
Glama

LinkedIn MCP Server

by baptitse-jn

LinkedIn MCP Server for Netlify

This is a comprehensive Model Context Protocol (MCP) server that provides complete LinkedIn integration for AI assistants. The server enables AI tools to interact with LinkedIn APIs for profile management, content creation, networking, messaging, and analytics.

This project includes both a serverless MCP server deployed on Netlify and a specialized FastAPI client for easy development and testing.

Features

LinkedIn MCP Server

  • Profile Management: Get user profiles and company information
  • Content Creation: Create and manage LinkedIn posts
  • Network Management: Manage connections and send connection requests
  • Messaging: Send and retrieve LinkedIn messages
  • Company Intelligence: Search and analyze companies
  • Analytics: Network analysis and insights
  • Comprehensive Documentation: Built-in API guides and best practices

FastAPI Client

  • Specialized LinkedIn API endpoints with intuitive REST interface
  • Interactive API documentation (Swagger UI) at /docs
  • Comprehensive testing suite with automated validation
  • Development tools for local testing and debugging
  • Professional error handling and authentication management

Getting Started

Quick Start

  1. Clone and setup:
    git clone <repository-url> cd llm_linkedin_mcp_deployment npm install
  2. Start LinkedIn MCP infrastructure:
    cd mcp-client ./start_linkedin.sh
    This starts both:
    • LinkedIn MCP server at http://localhost:8888/mcp
    • FastAPI client at http://localhost:8002
  3. Test the setup:
    python demo.py --quick
  4. Get LinkedIn access token (for full functionality):
    python oauth_helper.py

What You Get

After running the quick start, you'll have:

  • LinkedIn MCP Server: Complete LinkedIn integration via MCP protocol
  • FastAPI Client: REST API with Swagger docs at /docs
  • 10 LinkedIn Tools: Profile, posts, companies, connections, messaging, analytics
  • Documentation: Built-in guides and API references
  • Testing Suite: Comprehensive validation and testing tools

Testing Your MCP Server

You can test your MCP server using either the MCP Inspector or directly with curl commands.

Using MCP Inspector

While the development server is running, you can test your MCP server using the MCP inspector:

npx @modelcontextprotocol/inspector npx mcp-remote@next http://localhost:8888/mcp

After deployment, you can test your deployed version:

npx @modelcontextprotocol/inspector npx mcp-remote@next https://your-site-name.netlify.app/mcp

Then open http://localhost:6274/ in your browser to interact with the MCP inspector.

Using curl

You can also test the MCP server directly using curl commands:

  1. Initialize the MCP server:
    curl -X POST http://localhost:8888/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"mcp/init","params":{},"id":"1"}'
  2. List available tools:
    curl -X POST http://localhost:8888/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"mcp/listTools","params":{},"id":"2"}'
  3. Call a tool:
    curl -X POST http://localhost:8888/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"mcp/callTool","params":{"name":"run-analysis-report","args":{"days":5}},"id":"3"}'
  4. List available resources:
    curl -X POST http://localhost:8888/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"mcp/listResources","params":{},"id":"4"}'
  5. Read a resource:
    curl -X POST http://localhost:8888/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"mcp/readResource","params":{"uri":"docs://interpreting-reports"},"id":"5"}'

Deployment

Deploying to Netlify

  1. Push this repository to GitHub
  2. Connect your repository to Netlify
  3. Configure the build settings:
    • Build command: leave empty (no build required)
    • Publish directory: public

After deployment, your MCP server will be available at https://your-site-name.netlify.app/mcp

Using with Claude Desktop

To use this MCP server with Claude Desktop:

  1. Go to Claude Desktop settings
  2. Enable the MCP Server configuration
  3. Edit the configuration file:
    { "mcpServers": { "my-mcp": { "command": "npx", "args": [ "mcp-remote@next", "https://your-site-name.netlify.app/mcp" ] } } }
  4. Restart Claude Desktop

Using the MCP Client

The MCP client provides a REST API interface for interacting with the MCP server. It's built with FastAPI and offers a clean, modern API with automatic documentation.

Starting the Client

cd mcp-client pip install -r requirements.txt uvicorn main:app --reload

This will start the FastAPI server at http://localhost:8001. You can access the API documentation at http://localhost:8001/docs.

Managing the MCP Server and FastAPI Client

The template includes several scripts to manage both the MCP server and FastAPI client:

cd mcp-client ./start.sh # Start both services in the background ./stop.sh # Stop both services gracefully ./check_status.sh # Check if services are running and view logs ./test_client.py # Test the FastAPI client endpoints

These scripts ensure processes keep running in the background even after you close your terminal, properly manage log files, and provide clear status information.

Testing the Client

You can test the client using the provided test script:

cd mcp-client ./test_client.py

This will run a series of tests against the API endpoints and display the results.

API Endpoints

  • GET /server - Get server information
  • GET /tools - List available tools
  • POST /tools/call - Call a tool
  • GET /resources - List available resources
  • POST /resources/read - Read a resource

For more details, refer to the MCP Client README.

Extending

Extending the MCP Server

You can extend this MCP server by adding more tools and resources to the getServer function in netlify/functions/mcp-server.js. Follow the existing examples and refer to the Model Context Protocol documentation for more information.

Extending the MCP Client

To add new endpoints to the MCP client, edit the main.py file in the mcp-client directory. The client is built with FastAPI, which makes it easy to add new routes and functionality.

Learn More

-
security - not tested
F
license - not found
-
quality - not tested

A comprehensive Model Context Protocol server that enables AI assistants to interact with LinkedIn APIs for profile management, content creation, networking, messaging, and analytics.

  1. Features
    1. LinkedIn MCP Server
    2. FastAPI Client
  2. Getting Started
    1. Quick Start
    2. What You Get
    3. Testing Your MCP Server
  3. Deployment
    1. Deploying to Netlify
    2. Using with Claude Desktop
  4. Using the MCP Client
    1. Starting the Client
    2. Managing the MCP Server and FastAPI Client
    3. Testing the Client
    4. API Endpoints
  5. Extending
    1. Extending the MCP Server
    2. Extending the MCP Client
  6. Learn More

    Related MCP Servers

    • -
      security
      F
      license
      -
      quality
      A Model Context Protocol server that enables seamless interaction with LinkedIn for job applications, profile retrieval, feed browsing, and resume analysis through natural language commands.
      Last updated -
      10
      Python
    • -
      security
      A
      license
      -
      quality
      A Model Context Protocol server that provides comprehensive access to LinkedIn data and functionality, enabling data retrieval and user account management through the HorizonDataWave API.
      Last updated -
      113
      23
      JavaScript
      MIT License
      • Apple
    • -
      security
      F
      license
      -
      quality
      A server implementing the Model Context Protocol that enables users to retrieve LinkedIn profile information and activity data via EnrichB2B API, and generate text using OpenAI GPT-4 or Anthropic Claude models.
      Last updated -
      Python
      • Linux
    • -
      security
      F
      license
      -
      quality
      A comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.
      Last updated -
      16
      TypeScript

    View all related MCP servers

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/baptitse-jn/linkedin_mcp'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server