linkedin-relay-mcp 3.12.0 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/linkedin-relay/SKILL.md +122 -4
- package/README.md +73 -8
- package/dist/cli.js +769 -203
- package/dist/cli.js.map +1 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-shim.js +693 -127
- package/dist/mcp-shim.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: linkedin-relay
|
|
3
|
-
description: Research LinkedIn from the user's own account — search
|
|
3
|
+
description: Research LinkedIn from the user's own account — find people by company, past company, school, place, title, degree or whose connections they are, search companies, hunt jobs with every filter LinkedIn has and collect their apply links, read profiles, read the chronological feed — and, through the lnrelay CLI, post (text, image or video), comment, reply, react, delete and edit the user's own profile (headline, About, roles, skills) under the approval mode the owner chose. Use when finding or evaluating people (who works or worked somewhere, alumni, people in a role or a city, someone's connections), companies, roles or job openings on LinkedIn, when the user wants job listings or application links, when reading what the user's network is posting, or when the user asks to post, engage or update their profile on LinkedIn. Not for messaging, connection requests or applying to jobs, which do not exist.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# linkedin-relay
|
|
@@ -44,11 +44,91 @@ risk / budget free — check standing BEFORE spending
|
|
|
44
44
|
Search rows already carry name, headline, location and URL. **Rank on those.** Calling `profile` on
|
|
45
45
|
every search result is how a day's budget disappears in one request.
|
|
46
46
|
|
|
47
|
+
## Finding people — the recipe
|
|
48
|
+
|
|
49
|
+
`people` is the people search with every filter LinkedIn has. Each call moves 50 people; a company
|
|
50
|
+
or school given by name costs one extra call to look up.
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
1. people_filters (optional, 1 call) ids and live counts for places, companies, schools,
|
|
54
|
+
industries, services — for this query
|
|
55
|
+
2. people ALL keyword sets in ONE call, the filters, compact:true
|
|
56
|
+
3. rank on headline, location, degree, insight — from the rows alone
|
|
57
|
+
4. profile ONLY the 2-3 finalists, if the row is not enough
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
A worked call, the shape to copy:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
people keywords:["engineering manager", "head of engineering"] company:["Microsoft"]
|
|
64
|
+
location:"Hungary" network:["2nd"] limit:100 compact:true
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
From a shell: `lnrelay people "engineering manager" "head of engineering" --company Microsoft
|
|
68
|
+
--location Hungary --network 2nd --limit 100 --compact`.
|
|
69
|
+
|
|
70
|
+
- **Check `data.resolved`.** Company and school names, and `location`, are looked up to ids, and the
|
|
71
|
+
choice is reported there. A name can land on a different organisation ("Microsoft Cloud", a
|
|
72
|
+
similarly named school); if it did, re-run with the id from `people_filters` or the row it shows.
|
|
73
|
+
- **Ask the question with filters, not keywords.** "Who works at X" is `company`, not keywords;
|
|
74
|
+
"alumni of Y" is `school`; "in Z" is `location`; "people I can get an intro to" is `network:["2nd"]`;
|
|
75
|
+
"who does A know" is `connectionOf` with A's `id`. Keywords match anywhere on a profile.
|
|
76
|
+
- **`title` is free text against the current title**; `companyText`/`schoolText` are free text too,
|
|
77
|
+
for when there is no single organisation to name.
|
|
78
|
+
- **LinkedIn pages at most 1000 people per query.** `meta.servedLimit` means it claimed more: split
|
|
79
|
+
the query (by location, by company) rather than reporting the 1000 as everyone.
|
|
80
|
+
- **Not everyone is named.** LinkedIn may return people outside the user's network as
|
|
81
|
+
`"LinkedIn Member"` with no `url`. That is LinkedIn withholding them from this account; count them,
|
|
82
|
+
do not drop them silently, and say so.
|
|
83
|
+
- A row's `id` is the profile id: it goes into `connectionOf` / `followerOf`, and `profile` takes it.
|
|
84
|
+
|
|
85
|
+
## Job hunting — the recipe
|
|
86
|
+
|
|
87
|
+
Jobs have their own commands, their own budget (150 job searches, 60 job reads a day) and their own
|
|
88
|
+
funnel. Each call moves 100 jobs, so a whole hunt is a few dozen calls, not hundreds.
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
1. job_filters (optional, 1 call) the ids for company / industry / title / place, and live counts
|
|
92
|
+
2. jobs ALL keyword sets in ONE call, the same filters, compact:true
|
|
93
|
+
→ one merged list; `matched` says which sets found each job
|
|
94
|
+
3. rank on title, company, location, workplace, listed — from the rows alone
|
|
95
|
+
4. job ALL finalists in ONE call (a list of ids) → description + apply.url
|
|
96
|
+
5. report title · company · location · apply.url, and say how the list was cut
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
A worked call, the shape to copy:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
jobs keywords:["frontend engineer", "AI agent developer", "agent engineer"]
|
|
103
|
+
location:"European Union" workplace:["remote"] posted:"week" limit:200 compact:true
|
|
104
|
+
job job:["4479248573", "4475225930", "4476083905"]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
From a shell the same is
|
|
108
|
+
`lnrelay jobs "frontend engineer" "AI agent developer" --location "European Union" --workplace remote --posted week --limit 200 --compact`
|
|
109
|
+
and `lnrelay job 4479248573 4475225930 4476083905`.
|
|
110
|
+
|
|
111
|
+
- **Put every keyword set in one `jobs` call**, never one call per keyword: the tool merges them by
|
|
112
|
+
job id, so you read each job once and `job` reads it once. Separate calls leave the merging to you
|
|
113
|
+
and spend reads twice on the same job.
|
|
114
|
+
- **Use filters, not keywords, to narrow.** `posted:"week"`, `workplace`, `experience` and `geoId`
|
|
115
|
+
cut a list from hundreds to tens. Keywords are matched loosely by LinkedIn, so "AI agent
|
|
116
|
+
developer" also returns plain frontend jobs; a narrow keyword is not a narrow search.
|
|
117
|
+
- **`compact:true` for the wide pass** (one line per job, under half the size of the full rows), the full rows or
|
|
118
|
+
`job` only for what you will actually judge.
|
|
119
|
+
- **`details:true` only when you need every job's apply link** (for a full export, say). It costs one
|
|
120
|
+
read per 100 jobs and adds the employer, applicant count and apply link to every row; add
|
|
121
|
+
`description:true` only if you will read them all, because descriptions are long.
|
|
122
|
+
- **Most results are promoted** (often three in four). That is LinkedIn's ranking, not a filter we
|
|
123
|
+
can turn off; `promoted` on each row says which.
|
|
124
|
+
- **This tool cannot apply.** It finds the job and the link. `apply.type: "external"` is the
|
|
125
|
+
employer's own site; `"easy-apply"` is LinkedIn's form, done by the user in a browser.
|
|
126
|
+
|
|
47
127
|
## Commands
|
|
48
128
|
|
|
49
129
|
### `search` — cheap. The net.
|
|
50
130
|
```
|
|
51
|
-
search kind:people|companies query:"<terms>" [limit:1-25] (jobs:
|
|
131
|
+
search kind:people|companies query:"<terms>" [limit:1-25] (people with filters: `people`; jobs: `jobs`)
|
|
52
132
|
```
|
|
53
133
|
Returns `{items, meta}`. Each item: `name`, `headline`, `location`, `url`, `urn`.
|
|
54
134
|
|
|
@@ -59,6 +139,34 @@ Out-of-network people come back as `name: "LinkedIn Member"` with a `/headless`
|
|
|
59
139
|
LinkedIn behaviour, not a bug — LinkedIn will not name them to this account. Say so rather than
|
|
60
140
|
presenting it as a data problem.
|
|
61
141
|
|
|
142
|
+
### `people` — 1 search call per 50 people. People search with every filter.
|
|
143
|
+
```
|
|
144
|
+
people [keywords:"<terms>" | ["<terms>", …]] [company:["<name|id>"]] [pastCompany:["<name|id>"]]
|
|
145
|
+
[school:["<name|id>"]] [location:"<place>" | geo:["<id>"]] [network:[1st|2nd|3rd+]]
|
|
146
|
+
[industry:[ids]] [language:["en"]] [service:[ids]] [title:"<text>"] [firstName] [lastName]
|
|
147
|
+
[companyText] [schoolText] [connectionOf:"<id>"] [followerOf:"<id>"] [openToVolunteer]
|
|
148
|
+
[filter:["key=v1,v2"]] [limit:1-1000 per keyword set] [start:N] [compact]
|
|
149
|
+
```
|
|
150
|
+
CLI: `lnrelay people "<terms>" ["<more>" …] [--company "<name|id>" …] [--location "<place>"]
|
|
151
|
+
[--network 2nd] [--title "<text>"] [--limit N] [--compact]` — every option is in `lnrelay help`.
|
|
152
|
+
Company, past company and school take names or ids; repeat the flag for several names (a name may
|
|
153
|
+
contain commas), or comma-separate ids.
|
|
154
|
+
|
|
155
|
+
Each item: `id`, `name`, `headline`, `location`, `degree` (`1st`, `2nd`, `3rd+`, `out of network`),
|
|
156
|
+
`verified`, `insight` (mutual connections, followers, services offered), `url`, and `matched` with
|
|
157
|
+
several keyword sets. `compact` gives one line per person. `data.resolved` lists each name and the
|
|
158
|
+
id it became. Paging and `meta` work as for `jobs`, plus `meta.servedLimit` when LinkedIn claimed
|
|
159
|
+
more people than the 1000 it serves. Filters alone are a search: `connectionOf` with no keywords
|
|
160
|
+
lists that person's connections.
|
|
161
|
+
|
|
162
|
+
### `people-filters` — 1 search call. The knobs, with ids.
|
|
163
|
+
```
|
|
164
|
+
people_filters [keywords:"<terms>"] [any people filter]
|
|
165
|
+
```
|
|
166
|
+
Every people filter for the query: its key, whether it takes ids or free text, and its options'
|
|
167
|
+
`value`, `label` and live `count`. The ids go into `geo`, `industry`, `service`, `company`, … or raw
|
|
168
|
+
`filter:["<key>=<value>"]`.
|
|
169
|
+
|
|
62
170
|
### `jobs` — 1 job-search call per 100 results. Job search with every filter.
|
|
63
171
|
```
|
|
64
172
|
jobs keywords:"<terms>" | ["<terms>", "<terms>", …] [location:"<place>" | geoId:"<id>"] [distance:<miles>]
|
|
@@ -68,8 +176,14 @@ jobs keywords:"<terms>" | ["<terms>", "<terms>", …] [location:"<place>" | geoI
|
|
|
68
176
|
[company|industry|function|title|place:[ids]] [filter:["key=v1,v2"]] [sort:recent|relevant]
|
|
69
177
|
[limit:1-1000 per keyword set] [start:N] [details] [description] [compact]
|
|
70
178
|
```
|
|
179
|
+
CLI: `lnrelay jobs "<terms>" ["<more terms>" …] [--location … | --geo …] [--workplace remote,hybrid]
|
|
180
|
+
[--posted week] [--experience mid-senior] [--easy-apply] [--limit N] [--details] [--compact]` — every
|
|
181
|
+
option is in `lnrelay help`; list options take commas or repeat.
|
|
182
|
+
|
|
71
183
|
Each item: `id`, `title`, `company`, `location`, `workplace`, `listed` (YYYY-MM-DD), `easyApply`,
|
|
72
|
-
`promoted`, `salary` (when the card shows one), `insights`, `url
|
|
184
|
+
`promoted`, `salary` (when the card shows one), `insights`, `url`, and `matched` with several
|
|
185
|
+
keyword sets. `compact` gives one line per job:
|
|
186
|
+
`<id> | <title> | <company> | <location> | <workplace> | <listed> | easy apply | promoted | matched: a + b`.
|
|
73
187
|
|
|
74
188
|
- **Several keyword sets in one call.** Pass `keywords` as a list: each set is searched with the
|
|
75
189
|
same filters, and the results are merged by job id. A job found by several sets comes back once,
|
|
@@ -234,7 +348,11 @@ Every collection carries:
|
|
|
234
348
|
|---|---|
|
|
235
349
|
| `state: complete` | every reference resolved; an empty `items` here genuinely means none |
|
|
236
350
|
| `state: partial` | **some references failed to resolve** — the record is incomplete, not small |
|
|
237
|
-
| `state: unknown` | we stopped at the limit and cannot prove exhaustion (
|
|
351
|
+
| `state: unknown` | we stopped at the limit and cannot prove exhaustion (people/company `search`, `post`, `reactions`) |
|
|
352
|
+
| `next` | `jobs` / `people`: the `start` that continues this search; absent when the results ran out |
|
|
353
|
+
| `servedLimit` | `people`: LinkedIn claimed more matches than it serves (1000 a query) — the list is NOT everyone; narrow the query |
|
|
354
|
+
| `searches` / `duplicates` | `jobs` / `people` with several keyword sets: each set's own count and state, and how many repeats were merged |
|
|
355
|
+
| `unread` | `jobs --details` / `job`: jobs LinkedIn did not return in full — they are not closed, just unread |
|
|
238
356
|
| `returnedCount` vs `claimedCount` | `claimed > 0` with `returned === 0` is a **failed fetch**, never "no results" |
|
|
239
357
|
| `excludedCount` | ads and UI chrome deliberately dropped |
|
|
240
358
|
| `unknownCount` / `unknownTypes` | **LinkedIn shipped a shape we don't recognise.** Data is still returned, but the parser is behind. Worth telling the user. |
|
package/README.md
CHANGED
|
@@ -9,7 +9,11 @@ Sibling to [`x-relay`](../x-relay), [`github-relay`](../github-relay) and
|
|
|
9
9
|
```bash
|
|
10
10
|
npm i -g linkedin-relay-mcp
|
|
11
11
|
lnrelay login # mint a session from your own Chrome
|
|
12
|
-
lnrelay
|
|
12
|
+
lnrelay people "engineering manager" --company Microsoft --location Hungary --compact
|
|
13
|
+
# people search with every filter, names looked up
|
|
14
|
+
lnrelay jobs "frontend engineer" "AI agent developer" --workplace remote --posted week --compact
|
|
15
|
+
# one merged job list across keyword sets
|
|
16
|
+
lnrelay job 4479248573 4475225930 # full jobs, with their apply links
|
|
13
17
|
lnrelay feed --compact # your feed, with engagement counts
|
|
14
18
|
lnrelay post <activity-urn> # a post's comment thread
|
|
15
19
|
lnrelay sync connections
|
|
@@ -18,7 +22,10 @@ lnrelay local "rust" # then search it offline, free
|
|
|
18
22
|
|
|
19
23
|
## As an MCP server
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
Twenty-one read-only tools, so an agent does the reading. Writes are not on that surface at any price.
|
|
26
|
+
The bundled Claude Code skill (`.claude/skills/linkedin-relay/SKILL.md`) teaches an agent the
|
|
27
|
+
funnels, the budget, and how to read `meta` — including step-by-step recipes for finding people and
|
|
28
|
+
for job hunting.
|
|
22
29
|
|
|
23
30
|
```bash
|
|
24
31
|
claude mcp add linkedin-relay -s user -- bun "$(npm root -g)/linkedin-relay-mcp/dist/mcp-shim.js"
|
|
@@ -28,11 +35,16 @@ claude mcp add linkedin-relay -s user -- bun "$(npm root -g)/linkedin-relay-mcp/
|
|
|
28
35
|
|
|
29
36
|
| | |
|
|
30
37
|
|---|---|
|
|
31
|
-
| `
|
|
38
|
+
| `people` · `people-filters` | people search with every filter: company, past company, school, place, degree, title, someone's connections |
|
|
39
|
+
| `search` · `profile` · `feed` | one-page search of people or companies, a profile, your feed |
|
|
40
|
+
| `jobs` · `job` · `job-filters` | job search with every filter, several keyword sets merged in one call, and apply links |
|
|
32
41
|
| `post` · `reactions` | a post's comment thread, and who engaged |
|
|
42
|
+
| `scheduled` · `experience` · `skills` | your queued posts, and your own roles and skills |
|
|
33
43
|
| `sync` · `local` · `connections` · `my-posts` | fill a local cache, then query it for free |
|
|
34
44
|
| `whoami` · `doctor` · `risk` · `budget` · `cache-status` | session, standing and spend |
|
|
35
|
-
| `
|
|
45
|
+
| `share` · `comment` · `reply` · `edit` · `react` · `delete` | writes to your feed — OAuth when available, private API otherwise |
|
|
46
|
+
| `edit headline\|about` · `role` · `skill` | writes to your own profile |
|
|
47
|
+
| `oauth` · `approval` | the write credential, and how writes are approved |
|
|
36
48
|
| `purge` | delete cached data |
|
|
37
49
|
|
|
38
50
|
Every command prints a JSON envelope on stdout. `--compact` and `--fields a,b` trim the output;
|
|
@@ -56,8 +68,60 @@ private API using the same session your reads use. It breaches §8.2 and puts th
|
|
|
56
68
|
the prompt says so, names the transport, and asks anyway. An expired OAuth token is never silently
|
|
57
69
|
demoted to it. Reasoning and alternatives: **[docs/DECISION-writes.md](docs/DECISION-writes.md)**.
|
|
58
70
|
|
|
59
|
-
Every write
|
|
60
|
-
|
|
71
|
+
Every write shows exactly what it will send, over which surface, and how reversible it is, and is
|
|
72
|
+
approved the way **you** chose with `lnrelay approval set` (only at a real terminal):
|
|
73
|
+
|
|
74
|
+
| mode | how a write is approved |
|
|
75
|
+
|---|---|
|
|
76
|
+
| `interactive` (default) | a token typed at the terminal; no TTY means no write and no network call |
|
|
77
|
+
| `agent` | `--plan` returns a preview and a token; you approve it in chat; `--confirm <token>` runs exactly that content |
|
|
78
|
+
| `unattended` | runs as given |
|
|
79
|
+
|
|
80
|
+
There is no `--yes` and no environment variable. Every approval and outcome is logged to
|
|
81
|
+
`~/.lnrelay/writes.jsonl`.
|
|
82
|
+
|
|
83
|
+
## Finding people
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
lnrelay people "engineering manager" "head of engineering" --company Microsoft --location Hungary --network 2nd --compact
|
|
87
|
+
lnrelay people --school "Budapest University of Technology" --company OTP --limit 200 # alumni at a company
|
|
88
|
+
lnrelay people --connection-of <profile-id> --network 2nd # their connections you are not yet connected to
|
|
89
|
+
lnrelay people-filters "frontend developer" --location Budapest # every filter, ids and counts
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
- **Every filter the people search has:** current and past company, school, place, connection
|
|
93
|
+
degree, industry, profile language, service category, the connections or followers of a person,
|
|
94
|
+
open to volunteering, and free-text first name, last name, title, company and school.
|
|
95
|
+
- **Names, not ids.** `--company`, `--past-company`, `--school` and `--location` take names and look
|
|
96
|
+
them up; `data.resolved` says what each became, so a wrong match is visible.
|
|
97
|
+
- **50 people a call** (the page asks for 10). Asking for 100 is answered with an *empty success*, so
|
|
98
|
+
the tool never does. Several keyword sets merge by person, as for jobs.
|
|
99
|
+
- **LinkedIn serves at most 1000 people per query**, whatever it claims to have matched;
|
|
100
|
+
`meta.servedLimit` says when it held back, and the list is reported partial, not complete.
|
|
101
|
+
|
|
102
|
+
## Job hunting
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
lnrelay job-filters "frontend engineer" --location "European Union" # every filter, its ids and counts
|
|
106
|
+
lnrelay jobs "frontend engineer" "AI agent developer" "agent engineer" \
|
|
107
|
+
--location "European Union" --workplace remote --posted week --limit 200 --compact
|
|
108
|
+
lnrelay job <id> <id> <id> # finalists in full, apply links
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
- **Every filter the jobs page has:** location or exact geo id, distance, date posted, experience,
|
|
112
|
+
job type, workplace, Easy Apply, under 10 applicants, verified, in your network, fair chance,
|
|
113
|
+
company, industry, function, title, city, sort — and any other by its own name with
|
|
114
|
+
`--filter key=value`.
|
|
115
|
+
- **Several keyword sets, one list.** Each set is searched with the same filters and the results are
|
|
116
|
+
merged by job id: a job found by three sets comes back once, saying which. Live, four sets of 200
|
|
117
|
+
gave 800 rows, of which 280 were repeats.
|
|
118
|
+
- **100 jobs a call, both ways.** Searches ask for 100 results a page (the browser asks for 25), and
|
|
119
|
+
`job` / `--details` read up to 100 jobs in full in one batch call. 250 jobs with every apply link
|
|
120
|
+
took 6 calls.
|
|
121
|
+
- **The apply link** is the employer's own site (`external`) or LinkedIn's Easy Apply. This tool
|
|
122
|
+
finds jobs; it does not apply to them.
|
|
123
|
+
- Job hunting has its own daily budget — 150 search calls, 60 job reads — so it neither uses up nor
|
|
124
|
+
is stopped by people and company research.
|
|
61
125
|
|
|
62
126
|
## Design in one screen
|
|
63
127
|
|
|
@@ -76,7 +140,8 @@ surface, and how reversible it is — no TTY means no write and no network call.
|
|
|
76
140
|
`claimedCount`; a claimed-but-empty response is an error, not "no results".
|
|
77
141
|
- **Third-party data is not cached by default.** When retained, a 30-day TTL swept on the read path;
|
|
78
142
|
on expiry the body dies and only an identity stub survives.
|
|
79
|
-
- **Writes
|
|
143
|
+
- **Writes are approved under a mode only the owner can set** — at a terminal, behind a typed token.
|
|
144
|
+
An agent can plan a write but never choose its own approval.
|
|
80
145
|
- **Single account by construction** — multi-account isn't disallowed, it's unrepresentable.
|
|
81
146
|
|
|
82
147
|
Full reasoning: **[docs/DESIGN.md](docs/DESIGN.md)** · Engine internals:
|
|
@@ -109,7 +174,7 @@ position under argument. The convergence and the full disagreement record are in
|
|
|
109
174
|
## Development
|
|
110
175
|
|
|
111
176
|
```bash
|
|
112
|
-
bun run check # typecheck + lint +
|
|
177
|
+
bun run check # typecheck + lint + tests
|
|
113
178
|
bun run build
|
|
114
179
|
bun run dev -- <command>
|
|
115
180
|
```
|