Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@linkedapi/mcp",
"version": "2.0.1",
"version": "2.1.0",
"description": "MCP server that lets AI assistants control LinkedIn accounts and retrieve real-time data.",
"main": "dist/index.js",
"bin": {
Expand Down Expand Up @@ -30,7 +30,7 @@
"author": "Linked API",
"license": "MIT",
"dependencies": {
"@linkedapi/node": "^2.0.0",
"@linkedapi/node": "^2.0.4",
"@modelcontextprotocol/sdk": "^1.17.4",
"zod": "^4.1.1"
},
Expand Down
4 changes: 4 additions & 0 deletions src/linked-api-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { CommentOnPostTool } from './tools/comment-on-post.js';
import { CreatePostTool } from './tools/create-post.js';
import { ExecuteCustomWorkflowTool } from './tools/execute-custom-workflow.js';
import { FetchCompanyTool } from './tools/fetch-company.js';
import { FetchJobTool } from './tools/fetch-job.js';
import { FetchPersonTool } from './tools/fetch-person.js';
import { FetchPostTool } from './tools/fetch-post.js';
import { GetApiUsageTool } from './tools/get-api-usage-stats.js';
Expand All @@ -34,6 +35,7 @@ import { RetrievePendingRequestsTool } from './tools/retrieve-pending-requests.j
import { RetrievePerformanceTool } from './tools/retrieve-performance.js';
import { RetrieveSSITool } from './tools/retrieve-ssi.js';
import { SearchCompaniesTool } from './tools/search-companies.js';
import { SearchJobsTool } from './tools/search-jobs.js';
import { SearchPeopleTool } from './tools/search-people.js';
import { SendConnectionRequestTool } from './tools/send-connection-request.js';
import { SendMessageTool } from './tools/send-message.js';
Expand Down Expand Up @@ -69,9 +71,11 @@ export class LinkedApiTools {
new RemoveConnectionTool(),
new SearchCompaniesTool(),
new SearchPeopleTool(),
new SearchJobsTool(),
new FetchCompanyTool(),
new FetchPersonTool(),
new FetchPostTool(),
new FetchJobTool(),
new ReactToPostTool(),
new CommentOnPostTool(),
new CreatePostTool(),
Expand Down
32 changes: 32 additions & 0 deletions src/tools/fetch-job.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { OPERATION_NAME, TBaseFetchJobParams } from '@linkedapi/node';
import { Tool } from '@modelcontextprotocol/sdk/types.js';
import { z } from 'zod';

import { OperationTool } from '../utils/linked-api-tool.js';

export class FetchJobTool extends OperationTool<TBaseFetchJobParams, unknown> {
public override readonly name = 'fetch_job';
public override readonly operationName = OPERATION_NAME.fetchJob;
protected override readonly schema = z.object({
jobUrl: z.string(),
});

public override getTool(): Tool {
return {
name: this.name,
description:
'Open a LinkedIn job and retrieve its details such as company, location, salary, and description (st.openJob action).',
inputSchema: {
type: 'object',
properties: {
jobUrl: {
type: 'string',
description:
"LinkedIn URL of the job. (e.g., 'https://www.linkedin.com/jobs/view/4416248954/')",
},
},
required: ['jobUrl'],
},
};
}
}
172 changes: 172 additions & 0 deletions src/tools/search-jobs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
import { OPERATION_NAME, TSearchJobsParams } from '@linkedapi/node';
import { Tool } from '@modelcontextprotocol/sdk/types.js';
import { z } from 'zod';

import { OperationTool } from '../utils/linked-api-tool.js';

export class SearchJobsTool extends OperationTool<TSearchJobsParams, unknown> {
public override readonly name = 'search_jobs';
public override readonly operationName = OPERATION_NAME.searchJobs;
protected override readonly schema = z.object({
term: z.string().optional(),
limit: z.number().min(1).max(1000).optional(),
filter: z
.object({
location: z.string().optional(),
datePosted: z.enum(['anyTime', 'past24Hours', 'pastWeek', 'pastMonth']).optional(),
experienceLevels: z
.array(
z.enum([
'internship',
'entryLevel',
'associate',
'midSeniorLevel',
'director',
'executive',
]),
)
.optional(),
employmentTypes: z
.array(
z.enum([
'fullTime',
'partTime',
'contract',
'temporary',
'volunteer',
'internship',
'other',
]),
)
.optional(),
workplaceTypes: z.array(z.enum(['onSite', 'remote', 'hybrid'])).optional(),
companies: z.array(z.string()).optional(),
industries: z.array(z.string()).optional(),
jobFunctions: z.array(z.string()).optional(),
easyApply: z.boolean().optional(),
hasVerifications: z.boolean().optional(),
under10Applicants: z.boolean().optional(),
inYourNetwork: z.boolean().optional(),
fairChanceEmployer: z.boolean().optional(),
})
.optional(),
customSearchUrl: z.string().optional(),
});

public override getTool(): Tool {
return {
name: this.name,
description:
'Allows you to search jobs applying various filtering criteria (st.searchJobs action).',
inputSchema: {
type: 'object',
properties: {
term: {
type: 'string',
description: 'Optional. Keyword or phrase to search.',
},
limit: {
type: 'number',
description:
'Optional. Number of search results to return. Defaults to 10, with a maximum value of 1000.',
},
filter: {
type: 'object',
description:
'Optional. Object that specifies filtering criteria for jobs. When multiple filter fields are specified, they are combined using AND logic.',
properties: {
location: {
type: 'string',
description: 'Optional. Free-form location string.',
},
datePosted: {
type: 'string',
enum: ['anyTime', 'past24Hours', 'pastWeek', 'pastMonth'],
description: 'Optional. How recently the job was posted.',
},
experienceLevels: {
type: 'array',
description: 'Optional. Array of experience levels.',
items: {
type: 'string',
enum: [
'internship',
'entryLevel',
'associate',
'midSeniorLevel',
'director',
'executive',
],
},
},
employmentTypes: {
type: 'array',
description: 'Optional. Array of employment types.',
items: {
type: 'string',
enum: [
'fullTime',
'partTime',
'contract',
'temporary',
'volunteer',
'internship',
'other',
],
},
},
workplaceTypes: {
type: 'array',
description: 'Optional. Array of workplace types.',
items: {
type: 'string',
enum: ['onSite', 'remote', 'hybrid'],
},
},
companies: {
type: 'array',
description: 'Optional. Array of company names.',
items: { type: 'string' },
},
industries: {
type: 'array',
description: 'Optional. Array of industry names.',
items: { type: 'string' },
},
jobFunctions: {
type: 'array',
description: 'Optional. Array of job function names.',
items: { type: 'string' },
},
easyApply: {
type: 'boolean',
description: 'Optional. When true, only jobs with Easy Apply.',
},
hasVerifications: {
type: 'boolean',
description: 'Optional. When true, only jobs with verification signals.',
},
under10Applicants: {
type: 'boolean',
description: 'Optional. When true, only jobs with fewer than 10 applicants.',
},
inYourNetwork: {
type: 'boolean',
description: 'Optional. When true, only jobs from your network.',
},
fairChanceEmployer: {
type: 'boolean',
description: 'Optional. When true, only fair chance employer jobs.',
},
},
},
customSearchUrl: {
type: 'string',
description:
'Optional. URL copied from a LinkedIn jobs search page. When specified, overrides term and filter.',
},
},
},
};
}
}