HO

HorizonDataWave MCP Server: LinkedIn Profile Management

Manage LinkedIn profiles and access user data securely via the HorizonDataWave MCP server to control and update your HorizonDataWave.ai account.

Quick Install
npx -y @horizondatawave/hdw-mcp-server

Overview

The HorizonDataWave MCP Server is a lightweight Model Context Protocol (MCP) implementation for managing LinkedIn profiles and securely exposing user data to HorizonDataWave.ai. It implements an OAuth-style workflow and a small set of API endpoints so your application — or the HorizonDataWave.ai platform — can request permissioned access to a user’s LinkedIn profile, update profile data, and revoke access when needed.

This server is useful when you need a self-hosted bridge between LinkedIn data and the HorizonDataWave.ai account system. It centralizes consent management, token exchange, and profile synchronization, while keeping sensitive credentials and tokens in your controlled environment.

Features

  • OAuth-style authorization and token exchange for LinkedIn account access
  • Secure storage of access/refresh tokens (via environment-backed secret stores or local DB)
  • Endpoints to read LinkedIn profile data and update HorizonDataWave.ai account state
  • Webhook support for async events (token refresh, profile changes)
  • Simple configuration via environment variables and Docker
  • Lightweight codebase intended for self-hosting and integration into CI/CD pipelines

Installation / Configuration

Prerequisites: Node.js (14+), Docker (optional), a HorizonDataWave.ai API key and LinkedIn OAuth credentials.

Clone the repo:

git clone https://github.com/horizondatawave/hdw-mcp-server.git
cd hdw-mcp-server

Install dependencies and run locally:

npm install
npm run start

Example Docker run:

docker build -t hdw-mcp-server .
docker run -e PORT=3000 \
  -e HDW_API_KEY="your-hdw-api-key" \
  -e LINKEDIN_CLIENT_ID="li-client-id" \
  -e LINKEDIN_CLIENT_SECRET="li-client-secret" \
  -p 3000:3000 \
  hdw-mcp-server

Example docker-compose.yml:

version: '3.7'
services:
  mcp-server:
    image: hdw-mcp-server:latest
    ports:
      - "3000:3000"
    environment:
      - PORT=3000
      - HDW_API_KEY=${HDW_API_KEY}
      - LINKEDIN_CLIENT_ID=${LINKEDIN_CLIENT_ID}
      - LINKEDIN_CLIENT_SECRET=${LINKEDIN_CLIENT_SECRET}
      - SESSION_SECRET=${SESSION_SECRET}

Recommended environment variables:

  • PORT — server listen port (default 3000)
  • HDW_API_KEY — HorizonDataWave.ai API key for account updates
  • LINKEDIN_CLIENT_ID — LinkedIn OAuth client ID
  • LINKEDIN_CLIENT_SECRET — LinkedIn OAuth client secret
  • SESSION_SECRET — secret for encrypting session cookies or tokens
  • STORAGE_URL / DATABASE_URL — optional, for persistent token storage

Security notes: always supply secrets via environment variables or a secret manager. Run behind TLS in production.

Available Resources

API endpoints (common):

MethodPathDescription
GET/mcp/authorizeRedirect users to LinkedIn consent screen (start auth flow)
GET/mcp/callbackOAuth callback to exchange code for tokens
POST/mcp/tokenExchange refresh token / issue MCP token to clients
GET/mcp/profileFetch stored LinkedIn profile data for a user
POST/mcp/update-profilePush profile updates to HorizonDataWave.ai account
POST/mcp/disconnectRevoke tokens and disconnect account
POST/mcp/webhookOptional webhook receiver for background events

Typical responses use JSON and standard HTTP status codes. Authentication for MCP consumer apps can be via short-lived JWTs issued by the server after successful OAuth exchange.

Useful links:

  • GitHub: https://github.com/horizondatawave/hdw-mcp-server
  • HorizonDataWave.ai docs: (use your account documentation link)

Use Cases

  1. Onboard a user’s LinkedIn profile to HorizonDataWave.ai

    • Flow: Your app redirects user to GET /mcp/authorize. After consent, the MCP server exchanges the authorization code and persists tokens. The server fetches profile data and calls /mcp/update-profile to sync the user’s HorizonDataWave.ai account.
  2. Regular profile synchronization

    • Use a scheduled job to call GET /mcp/profile for each user and compare fields. When changes are detected, POST /mcp/update-profile to push updates into HorizonDataWave.ai so models have up-to-date context.
  3. Token refresh and revocation

    • The server handles refresh tokens automatically. If a user disconnects, POST /mcp/disconnect will revoke LinkedIn tokens and remove stored data, then notify HorizonDataWave.ai to remove the associated context.
  4. Programmatic access for integrations

    • Third-party tools can request temporary MCP tokens from POST /mcp/token (after appropriate authorization) to read a user’s profile without storing long-lived LinkedIn credentials.

Example curl: start auth (client-side pattern)

# Redirect the browser to this URL to start consent flow
https://your-mcp-host.example.com/mcp/authorize?redirect_uri=https://your-app.example.com/after-auth

Example curl: fetch profile (server-to-server, after obtaining a client token)

curl -H "Authorization: Bearer <mcp-token>" \
  https://your-mcp-host.example.com/mcp/profile

Notes for Developers

  • Treat this server as an integration layer: keep HorizonDataWave.ai logic separate from LinkedIn API handling where possible.
  • Implement robust error handling for API rate limits and token expiry.
  • Use HTTPS and rotate secrets regularly.
  • If you intend to scale, plug a database (Postgres, Redis) for token/session persistence and configure webhooks for event-driven updates.