Minimal Model Context Protocol (MCP) server that speaks JSON-over-stdio for use with Codex CLI.
1.4K
Minimal Model Context Protocol (MCP) server that speaks JSON-over-stdio for use with Codex CLI. It wraps LinkedIn REST endpoints so an agent can fetch your profile.
You will need a valid LinkedIn OAuth access token with the appropriate scopes. Tokens are not handled here; provide them via env vars.
Build and run:
docker build -t linkedin-mcp-server .
docker run --rm -e LINKEDIN_ACCESS_TOKEN="$LINKEDIN_ACCESS_TOKEN" linkedin-mcp-server
Run with an alternate base URL (e.g., sandbox or proxy):
docker run --rm -e LINKEDIN_ACCESS_TOKEN=... -e LINKEDIN_BASE_URL=https://api.linkedin.com linkedin-mcp-server
Public image guidance: Do not bake secrets into the image. Pass creds at runtime via -e or a bind-mounted .env:
docker run --rm --env-file .env linkedin-mcp-server
An example env file is provided in .env.example. Never commit your filled-in .env.
OAuth in Docker (fetch token on start):
docker run --rm \
-p 8765:8765 \ # expose redirect port
-e LINKEDIN_CLIENT_ID=... \
-e LINKEDIN_CLIENT_SECRET=... \
-e LINKEDIN_REDIRECT_URI=http://127.0.0.1:8765/callback \
linkedin-mcp-server python -m src.mcp_server --auth
Open the printed URL, approve, and the container will start the MCP server with the token.
get_profile – fetch current profile (identityMe)get_verification_report – fetch verification reportget_userinfo – fetch OpenID Connect userinfo profilecreate_text_post – create a text-only LinkedIn postcreate_reshare – reshare an existing LinkedIn postinitialize_image_upload – register an image upload (returns image URN + upload URL)upload_image_binary – upload a local image file to the upload URLcreate_image_post – create a post with a single uploaded imagecreate_multi_image_post – create a post with multiple uploaded imagescreate_article_post – create a LinkedIn article post with a linkContent type
Image
Digest
sha256:8bb7fc1c0…
Size
52.1 MB
Last updated
7 months ago
docker pull hashan0314/linkedin-mcp-server