LinkedIn Member Data Portability MCP Server
Official-API LinkedIn tools (no scraping) for the Member Data Portability API (3rd Party): the authenticated member's profile, their archived data snapshots by domain, the 28-day activity changelog, and their 1st-degree connections.
Standalone bundle. It shares no code with keos-linkedin-leadsync-mcp and runs on its own.
Why this is a separate bundle, and why there is no profile tool
LinkedIn does not allow Lead Sync and Member Data Portability to be requested on the same developer app, so the two products need two apps with two client ids. One app, one client id, one token, one MCP server.
The app behind this bundle was denied Sign In with LinkedIn using OpenID Connect, so
its token carries only r_dma_portability_3rd_party. There is therefore no
linkedin_get_profile tool here and no userinfo call anywhere in the code — requesting
openid, profile or email on this app would make LinkedIn reject the whole
authorization request.
For the member's profile, use dma_get_snapshot(domain='PROFILE'). That is the archived
profile record from the portability API rather than the live OIDC claims, and the
portability scope already covers it.
This server does not log in. The calling application owns the LinkedIn OAuth flow, user consent, token storage and re-authentication, and passes one access token with every request. The server writes nothing to disk and needs no client id or secret.
Run
uvx keos-linkedin-memberdata-mcp # stdio, from PyPI
uvx --from . keos-linkedin-memberdata-mcp # stdio, from this folder
python -m linkedin_memberdata_mcp # stdio, from source
python -m linkedin_memberdata_mcp --http --port 8766 # streamable HTTP at /mcp
keos-linkedin-memberdata-mcp --http --remote --host 0.0.0.0 --port 8766 # hosted / multi-user
Tools (8)
| Tool | What it does |
|---|---|
linkedin_auth_status() |
Whether a token reached the server, where it came from, and the scope your app must request. Never returns token values. |
dma_list_snapshot_domains() |
The 60+ valid, case-sensitive domain names accepted by dma_get_snapshot. |
dma_get_authorization_status() |
Whether LinkedIn is archiving changelog events for the consenting member. |
dma_enable_changelog() |
Manually turns on changelog event generation (normally automatic after consent). |
dma_get_snapshot(domain, start=0) |
One page of archived data for a domain — PROFILE, POSITIONS, CONNECTIONS, SKILLS, JOB_APPLICATIONS, and so on. Use domain='PROFILE' as the profile lookup for this bundle. |
dma_get_changelog(start_time_ms, count=10) |
Activity events (posts, comments, reactions) from the trailing 28 days. |
dma_get_connections(max_pages=20, limit=200) |
1st-degree connections, paged out of the CONNECTIONS snapshot and normalized to name / company / position / connected-on / profile URL / email. |
dma_find_connections_by_company(company, exact=False, max_pages=20) |
The same set filtered by employer, case- and punctuation-insensitive, substring or exact. |
Token
One token covers every tool here.
| Source | Value |
|---|---|
| HTTP header | Authorization: Bearer <token> |
| Local fallback | LINKEDIN_ACCESS_TOKEN env / .env |
The single scope your application must request on it:
r_dma_portability_3rd_party
That is the whole list. Do not add openid, profile or email — this app is not
approved for OpenID Connect, and including those scopes makes LinkedIn reject the entire
authorization request rather than just dropping the extras.
Only EEA members can consent to the portability scope. Snapshot data may also take time to
become available after consent — dma_get_snapshot reports "Snapshot not available yet."
until LinkedIn has built it.
What the calling application must implement
- Send the user to
https://www.linkedin.com/oauth/v2/authorizationwithresponse_type=code, yourclient_id, aredirect_uriregistered on your LinkedIn app (HTTPS, not localhost, for a hosted app), astatevalue, and the scopes above. - Exchange the returned code at
https://www.linkedin.com/oauth/v2/accessToken. - Store the token per user and send it on every MCP request.
There is no token refresh in this server. LinkedIn access tokens last about 60 days and
refresh tokens are only issued to approved apps, so your application has to track expiry
and re-run consent. A lapsed token surfaces here as HTTP 401.
Configuration
| Key | Purpose |
|---|---|
LINKEDIN_ACCESS_TOKEN |
Local-only token fallback. Ignored with --remote. |
LINKEDIN_ENV_FILE |
Path to the .env file. Defaults to ./.env. |
LINKEDIN_REMOTE_MODE |
1 is equivalent to --remote. |
LINKEDIN_DMA_API_VERSION |
Linkedin-Version header. Defaults to 202312, the only version memberSnapshotData supports. |
.env is read, never written. Process env overrides .env.
Responses
{ "ok": true, "data": ... } or { "ok": false, "error": "linkedin_error", "message": "..." }.
Remote / hosted mode
keos-linkedin-memberdata-mcp --http --remote --host 0.0.0.0 --port 8766 # or LINKEDIN_REMOTE_MODE=1
Use this whenever more than one user's tokens pass through the server.
- The token comes only from the request header. The env/
.envfallback is refused, so a request without a header errors instead of borrowing another caller's stored credential. --remoterequires--http.- Serve it behind HTTPS and restrict who can reach it (API key or network rules at the proxy). The server has no TLS or authentication of its own.
- If your gateway uses
Authorizationfor its own API key, it will collide with the LinkedIn token. Use a different header for gateway auth, or have the proxy rewrite it.
Without --remote, an --http server falls back to the environment or .env. That is for
local development only; do not expose it to a network.
Scope of the data
Every tool is limited to the consenting member's own data. There is no company-wide access
and no 2nd-degree network access. dma_get_connections returns that member's own
connections only, with each connection's employer as listed on their profile at snapshot
time. This is personal data about third parties: handle it accordingly.
Metadata
Release files for keos-linkedin-memberdata-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| keos_linkedin_memberdata_mcp-0.1.0.tar.gz | 11.2 kB | Without provenance | Details for keos_linkedin_memberdata_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| keos_linkedin_memberdata_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for keos_linkedin_memberdata_mcp-0.1.0-py3-none-any.whl |
Total release size: 23.8 kB
Release files / keos_linkedin_memberdata_mcp-0.1.0.tar.gz
| Download URL | keos_linkedin_memberdata_mcp-0.1.0.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4d7732af08dcbddb471105ffb97ab40bc141ea9f69876c4e109dbc2fbb041195
|
|
BLAKE2b-256 checksum How to use checksums |
edc321a16aa8988eebde5fd5ad6624286b892f9248250bc3057f6974e75bad62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / keos_linkedin_memberdata_mcp-0.1.0-py3-none-any.whl
| Download URL | keos_linkedin_memberdata_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7de2f63e45a41fafa5b774872715cbfc4056346afa9e53ce911a73a5a848c6a1
|
|
BLAKE2b-256 checksum How to use checksums |
a3e79766ee0b9539c8bf8a126f209b32a118825a21b9320cf497853a4b97f436
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for keos-linkedin-memberdata-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.