jobseek-mcp 0.2.0 → 0.3.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/README.md +12 -0
- package/dist/index.js +4 -5
- package/dist/resources.d.ts +25 -0
- package/dist/resources.js +122 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,6 +51,18 @@ After saving the config, restart Claude Code. Type `/mcp` to verify the server i
|
|
|
51
51
|
|
|
52
52
|
## Available Tools
|
|
53
53
|
|
|
54
|
+
### `upload_resume`
|
|
55
|
+
Upload a PDF resume to JobSeek.
|
|
56
|
+
|
|
57
|
+
**Example prompts:**
|
|
58
|
+
- "Upload my resume from ~/Documents/resume.pdf"
|
|
59
|
+
- "Upload /Users/me/Downloads/Resume_2025.pdf to JobSeek"
|
|
60
|
+
|
|
61
|
+
**What it does:**
|
|
62
|
+
- Reads PDF from your local filesystem
|
|
63
|
+
- Extracts text and parses with AI
|
|
64
|
+
- Stores the parsed resume in JobSeek
|
|
65
|
+
|
|
54
66
|
### `optimize_resume`
|
|
55
67
|
Optimize your resume for ATS (Applicant Tracking Systems).
|
|
56
68
|
|
package/dist/index.js
CHANGED
|
@@ -5,13 +5,14 @@ import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSche
|
|
|
5
5
|
import { optimizeResumeTool, handleOptimizeResume } from "./tools/optimize-resume.js";
|
|
6
6
|
import { downloadResumePdfTool, handleDownloadResumePdf } from "./tools/download-resume-pdf.js";
|
|
7
7
|
import { uploadResumeTool, handleUploadResume } from "./tools/upload-resume.js";
|
|
8
|
+
import { allResources, handleReadResource } from "./resources.js";
|
|
8
9
|
// Configuration
|
|
9
10
|
const JOBSEEK_API_URL = process.env.JOBSEEK_API_URL || "https://jobseek-iota.vercel.app";
|
|
10
11
|
const JOBSEEK_API_KEY = process.env.JOBSEEK_API_KEY;
|
|
11
12
|
// Create the MCP server
|
|
12
13
|
const server = new Server({
|
|
13
14
|
name: "jobseek-mcp",
|
|
14
|
-
version: "0.
|
|
15
|
+
version: "0.3.0",
|
|
15
16
|
}, {
|
|
16
17
|
capabilities: {
|
|
17
18
|
tools: {},
|
|
@@ -45,15 +46,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
45
46
|
// List available resources
|
|
46
47
|
server.setRequestHandler(ListResourcesRequestSchema, async () => {
|
|
47
48
|
return {
|
|
48
|
-
resources:
|
|
49
|
-
// Resources will be added here (resume, applications, etc.)
|
|
50
|
-
],
|
|
49
|
+
resources: allResources,
|
|
51
50
|
};
|
|
52
51
|
});
|
|
53
52
|
// Handle resource reads
|
|
54
53
|
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
55
54
|
const { uri } = request.params;
|
|
56
|
-
|
|
55
|
+
return handleReadResource(uri);
|
|
57
56
|
});
|
|
58
57
|
// Start the server
|
|
59
58
|
async function main() {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const resumeResource: {
|
|
2
|
+
uri: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
mimeType: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const applicationsResource: {
|
|
8
|
+
uri: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
mimeType: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const allResources: {
|
|
14
|
+
uri: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
mimeType: string;
|
|
18
|
+
}[];
|
|
19
|
+
export declare function handleReadResource(uri: string): Promise<{
|
|
20
|
+
contents: Array<{
|
|
21
|
+
uri: string;
|
|
22
|
+
mimeType: string;
|
|
23
|
+
text: string;
|
|
24
|
+
}>;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// Resource definitions and handlers for MCP
|
|
2
|
+
// Configuration
|
|
3
|
+
const getApiUrl = () => process.env.JOBSEEK_API_URL || "https://getjobseek.com";
|
|
4
|
+
const getApiKey = () => process.env.JOBSEEK_API_KEY;
|
|
5
|
+
// Resource definitions
|
|
6
|
+
export const resumeResource = {
|
|
7
|
+
uri: "jobseek://resume",
|
|
8
|
+
name: "Current Resume",
|
|
9
|
+
description: "Your resume data stored in JobSeek including skills, experience, education, and summary",
|
|
10
|
+
mimeType: "application/json"
|
|
11
|
+
};
|
|
12
|
+
export const applicationsResource = {
|
|
13
|
+
uri: "jobseek://applications",
|
|
14
|
+
name: "Job Applications",
|
|
15
|
+
description: "Your tracked job applications with status, company, and match scores",
|
|
16
|
+
mimeType: "application/json"
|
|
17
|
+
};
|
|
18
|
+
// All resources
|
|
19
|
+
export const allResources = [
|
|
20
|
+
resumeResource,
|
|
21
|
+
applicationsResource,
|
|
22
|
+
];
|
|
23
|
+
// Fetch resume data
|
|
24
|
+
async function fetchResume() {
|
|
25
|
+
const apiKey = getApiKey();
|
|
26
|
+
const apiUrl = getApiUrl();
|
|
27
|
+
if (!apiKey) {
|
|
28
|
+
return JSON.stringify({
|
|
29
|
+
error: "No API key configured",
|
|
30
|
+
help: "Get your API key at " + apiUrl + "/dashboard/api-keys"
|
|
31
|
+
}, null, 2);
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
const response = await fetch(`${apiUrl}/api/resumes/current`, {
|
|
35
|
+
headers: {
|
|
36
|
+
"Authorization": `Bearer ${apiKey}`,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
if (!response.ok) {
|
|
40
|
+
if (response.status === 401) {
|
|
41
|
+
return JSON.stringify({
|
|
42
|
+
error: "Invalid API key",
|
|
43
|
+
help: "Generate a new key at " + apiUrl + "/dashboard/api-keys"
|
|
44
|
+
}, null, 2);
|
|
45
|
+
}
|
|
46
|
+
if (response.status === 404) {
|
|
47
|
+
return JSON.stringify({
|
|
48
|
+
error: "No resume found",
|
|
49
|
+
help: "Upload a resume first using the upload_resume tool"
|
|
50
|
+
}, null, 2);
|
|
51
|
+
}
|
|
52
|
+
return JSON.stringify({
|
|
53
|
+
error: `Failed to fetch resume: ${response.status}`
|
|
54
|
+
}, null, 2);
|
|
55
|
+
}
|
|
56
|
+
const data = await response.json();
|
|
57
|
+
return JSON.stringify(data, null, 2);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
return JSON.stringify({
|
|
61
|
+
error: `Network error: ${error.message}`
|
|
62
|
+
}, null, 2);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// Fetch applications data
|
|
66
|
+
async function fetchApplications() {
|
|
67
|
+
const apiKey = getApiKey();
|
|
68
|
+
const apiUrl = getApiUrl();
|
|
69
|
+
if (!apiKey) {
|
|
70
|
+
return JSON.stringify({
|
|
71
|
+
error: "No API key configured",
|
|
72
|
+
help: "Get your API key at " + apiUrl + "/dashboard/api-keys"
|
|
73
|
+
}, null, 2);
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
const response = await fetch(`${apiUrl}/api/applications`, {
|
|
77
|
+
headers: {
|
|
78
|
+
"Authorization": `Bearer ${apiKey}`,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
if (!response.ok) {
|
|
82
|
+
if (response.status === 401) {
|
|
83
|
+
return JSON.stringify({
|
|
84
|
+
error: "Invalid API key"
|
|
85
|
+
}, null, 2);
|
|
86
|
+
}
|
|
87
|
+
return JSON.stringify({
|
|
88
|
+
error: `Failed to fetch applications: ${response.status}`
|
|
89
|
+
}, null, 2);
|
|
90
|
+
}
|
|
91
|
+
const data = await response.json();
|
|
92
|
+
return JSON.stringify(data, null, 2);
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
return JSON.stringify({
|
|
96
|
+
error: `Network error: ${error.message}`
|
|
97
|
+
}, null, 2);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
// Handle resource reads
|
|
101
|
+
export async function handleReadResource(uri) {
|
|
102
|
+
switch (uri) {
|
|
103
|
+
case "jobseek://resume":
|
|
104
|
+
return {
|
|
105
|
+
contents: [{
|
|
106
|
+
uri,
|
|
107
|
+
mimeType: "application/json",
|
|
108
|
+
text: await fetchResume()
|
|
109
|
+
}]
|
|
110
|
+
};
|
|
111
|
+
case "jobseek://applications":
|
|
112
|
+
return {
|
|
113
|
+
contents: [{
|
|
114
|
+
uri,
|
|
115
|
+
mimeType: "application/json",
|
|
116
|
+
text: await fetchApplications()
|
|
117
|
+
}]
|
|
118
|
+
};
|
|
119
|
+
default:
|
|
120
|
+
throw new Error(`Unknown resource: ${uri}`);
|
|
121
|
+
}
|
|
122
|
+
}
|