@sargonpiraev/hh-mcp-server 1.10.0 → 1.11.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 +31 -99
- package/build/index.js +3 -61
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,133 +1,65 @@
|
|
|
1
1
|
# HeadHunter MCP Server
|
|
2
2
|
|
|
3
|
-

|
|
4
|
-

|
|
5
|
-
|
|
6
3
|
MCP Server for HeadHunter API - job search and vacancy management
|
|
7
4
|
|
|
8
|
-
##
|
|
9
|
-
|
|
10
|
-
- 🔍 User Profile Management - View and manage your HeadHunter profile
|
|
11
|
-
- 📄 Resume Management - View detailed resume information
|
|
12
|
-
- 💼 Job Application Management - Manage negotiations and communications with employers
|
|
13
|
-
- ⭐ Vacancy Search & Favorites - Search for jobs and manage your favorites
|
|
14
|
-
|
|
15
|
-
## Get Your Credentials
|
|
16
|
-
|
|
17
|
-
Before installation, you'll need to obtain your API credentials:
|
|
18
|
-
|
|
19
|
-
1. **HH_USER_AGENT**: User-Agent header for HeadHunter API requests (required by HH API)
|
|
20
|
-
|
|
21
|
-
Save these credentials for the installation steps below.
|
|
5
|
+
## Quick Start
|
|
22
6
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<details>
|
|
26
|
-
<summary><b>Installing via Smithery</b></summary>
|
|
27
|
-
|
|
28
|
-
To install HeadHunter MCP Server for any client automatically via [Smithery](https://smithery.ai):
|
|
7
|
+
1. Install dependencies:
|
|
29
8
|
|
|
30
9
|
```bash
|
|
31
|
-
|
|
10
|
+
npm install
|
|
32
11
|
```
|
|
33
12
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<details>
|
|
37
|
-
<summary><b>Install in Cursor</b></summary>
|
|
38
|
-
|
|
39
|
-
#### Cursor One-Click Installation
|
|
40
|
-
|
|
41
|
-
[](https://cursor.com/install-mcp?name=@sargonpiraev/hh-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBzYXJnb25waXJhZXYvaGFiaXRpZnktbWNwLXNlcnZlciJdLCJlbnYiOnsiSEFCSVRJRllfQVBJX0tFWSI6InlvdXItaGFiaXRpZnktYXBpLWtleSJ9fQo=)
|
|
13
|
+
2. Set up environment:
|
|
42
14
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"mcpServers": {
|
|
50
|
-
"hh-mcp-server": {
|
|
51
|
-
"command": "npx",
|
|
52
|
-
"args": ["-y", "@sargonpiraev/hh-mcp-server"],
|
|
53
|
-
"env": {
|
|
54
|
-
"HH_USER_AGENT": "your-HH_USER_AGENT-here"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
15
|
+
```bash
|
|
16
|
+
cp .env.example .env
|
|
17
|
+
# Edit .env with your API credentials
|
|
59
18
|
```
|
|
60
19
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<details>
|
|
64
|
-
<summary><b>Install in VS Code</b></summary>
|
|
65
|
-
|
|
66
|
-
[](vscode:mcp/install?%7B%22name%22%3A%22hh-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22@sargonpiraev/hh-mcp-server%22%5D%7D)
|
|
67
|
-
|
|
68
|
-
Or add manually to your VS Code settings:
|
|
20
|
+
3. Start the server:
|
|
69
21
|
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
"servers": {
|
|
73
|
-
"hh-mcp-server": {
|
|
74
|
-
"type": "stdio",
|
|
75
|
-
"command": "npx",
|
|
76
|
-
"args": ["-y", "@sargonpiraev/hh-mcp-server"],
|
|
77
|
-
"env": {
|
|
78
|
-
"HH_USER_AGENT": "your-HH_USER_AGENT-here"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
22
|
+
```bash
|
|
23
|
+
npm start
|
|
83
24
|
```
|
|
84
25
|
|
|
85
|
-
|
|
26
|
+
## Configuration
|
|
86
27
|
|
|
87
|
-
|
|
88
|
-
<summary><b>Install in Claude Desktop</b></summary>
|
|
89
|
-
|
|
90
|
-
Add to your `claude_desktop_config.json`:
|
|
28
|
+
Add to your MCP client config:
|
|
91
29
|
|
|
92
30
|
```json
|
|
93
31
|
{
|
|
94
32
|
"mcpServers": {
|
|
95
33
|
"hh-mcp-server": {
|
|
96
|
-
"command": "
|
|
97
|
-
"args": ["
|
|
34
|
+
"command": "node",
|
|
35
|
+
"args": ["/dist/index.js"],
|
|
98
36
|
"env": {
|
|
99
|
-
"HH_USER_AGENT": "
|
|
37
|
+
"HH_USER_AGENT": "your_hh_user_agent"
|
|
100
38
|
}
|
|
101
39
|
}
|
|
102
40
|
}
|
|
103
41
|
}
|
|
104
42
|
```
|
|
105
43
|
|
|
106
|
-
</details>
|
|
107
|
-
|
|
108
44
|
## Available Tools
|
|
109
45
|
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
46
|
+
- **get-vacancies**: Search for vacancies
|
|
47
|
+
- **get-dictionaries**: Directories of fields
|
|
48
|
+
- **get-areas**: Tree view of all regions
|
|
49
|
+
- **get-languages**: The list of all languages
|
|
50
|
+
- **get-industries**: Industries
|
|
51
|
+
- **get-metro**: The list of metro stations in all cities
|
|
52
|
+
- **get-professional-roles**: Professional role directory
|
|
53
|
+
- **get-employers**: Employer search
|
|
118
54
|
|
|
119
|
-
|
|
55
|
+
## Development
|
|
120
56
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
[](https://boosty.to/sargonpiraev)
|
|
57
|
+
```bash
|
|
58
|
+
npm run build # Build TypeScript
|
|
59
|
+
npm run test # Run tests
|
|
60
|
+
npm run lint # Check code style
|
|
61
|
+
```
|
|
128
62
|
|
|
129
|
-
##
|
|
63
|
+
## License
|
|
130
64
|
|
|
131
|
-
|
|
132
|
-
- 📧 Email: [sargonpiraev@gmail.com](mailto:sargonpiraev@gmail.com)
|
|
133
|
-
- 💬 Join [Discord](https://discord.gg/ZsWGxRGj)
|
|
65
|
+
MIT
|
package/build/index.js
CHANGED
|
@@ -4,15 +4,10 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import axios from 'axios';
|
|
6
6
|
import dotenv from 'dotenv';
|
|
7
|
-
// Load environment variables
|
|
8
7
|
dotenv.config();
|
|
9
|
-
// Environment configuration schema
|
|
10
8
|
const envSchema = z.object({
|
|
11
9
|
HH_USER_AGENT: z.string().min(1),
|
|
12
|
-
// TOOL_GLOB_PATTERNS: z.string().optional(),
|
|
13
|
-
// LOG_LEVEL: z.enum(['debug', 'info', 'notice', 'warning', 'error']).default('info').optional(),
|
|
14
10
|
});
|
|
15
|
-
// Parse and validate environment variables
|
|
16
11
|
const env = envSchema.parse(process.env);
|
|
17
12
|
const mcpServer = new McpServer({
|
|
18
13
|
name: '@sargonpiraev/hh-mcp-server',
|
|
@@ -29,7 +24,6 @@ const logger = {
|
|
|
29
24
|
error: (...message) => mcpServer.server.sendLoggingMessage({ level: 'error', data: message.join(' ') }),
|
|
30
25
|
debug: (...message) => mcpServer.server.sendLoggingMessage({ level: 'debug', data: message.join(' ') }),
|
|
31
26
|
};
|
|
32
|
-
// Axios client setup
|
|
33
27
|
const apiClient = axios.create({
|
|
34
28
|
baseURL: 'https://api.hh.ru',
|
|
35
29
|
headers: {
|
|
@@ -37,7 +31,6 @@ const apiClient = axios.create({
|
|
|
37
31
|
},
|
|
38
32
|
timeout: 30000,
|
|
39
33
|
});
|
|
40
|
-
// Add request interceptor for environment variables
|
|
41
34
|
apiClient.interceptors.request.use((config) => {
|
|
42
35
|
if (env.HH_USER_AGENT) {
|
|
43
36
|
config.headers['User-Agent'] = env.HH_USER_AGENT;
|
|
@@ -71,48 +64,7 @@ function handleError(error) {
|
|
|
71
64
|
content: [{ type: 'text', text: `Error: ${error}` }],
|
|
72
65
|
};
|
|
73
66
|
}
|
|
74
|
-
|
|
75
|
-
mcpServer.tool('get-vacancies', `Search for vacancies`, {
|
|
76
|
-
page: z.number().optional(),
|
|
77
|
-
per_page: z.number().optional(),
|
|
78
|
-
text: z.string().optional(),
|
|
79
|
-
search_field: z.string().optional(),
|
|
80
|
-
experience: z.string().optional(),
|
|
81
|
-
employment: z.string().optional(),
|
|
82
|
-
schedule: z.string().optional(),
|
|
83
|
-
area: z.string().optional(),
|
|
84
|
-
metro: z.string().optional(),
|
|
85
|
-
professional_role: z.string().optional(),
|
|
86
|
-
industry: z.string().optional(),
|
|
87
|
-
employer_id: z.string().optional(),
|
|
88
|
-
currency: z.string().optional(),
|
|
89
|
-
salary: z.number().optional(),
|
|
90
|
-
label: z.string().optional(),
|
|
91
|
-
only_with_salary: z.boolean().optional(),
|
|
92
|
-
period: z.number().optional(),
|
|
93
|
-
date_from: z.string().optional(),
|
|
94
|
-
date_to: z.string().optional(),
|
|
95
|
-
top_lat: z.number().optional(),
|
|
96
|
-
bottom_lat: z.number().optional(),
|
|
97
|
-
left_lng: z.number().optional(),
|
|
98
|
-
right_lng: z.number().optional(),
|
|
99
|
-
order_by: z.string().optional(),
|
|
100
|
-
sort_point_lat: z.number().optional(),
|
|
101
|
-
sort_point_lng: z.number().optional(),
|
|
102
|
-
clusters: z.boolean().optional(),
|
|
103
|
-
describe_arguments: z.boolean().optional(),
|
|
104
|
-
no_magic: z.boolean().optional(),
|
|
105
|
-
premium: z.boolean().optional(),
|
|
106
|
-
responses_count_enabled: z.boolean().optional(),
|
|
107
|
-
part_time: z.string().optional(),
|
|
108
|
-
accept_temporary: z.boolean().optional(),
|
|
109
|
-
employment_form: z.string().optional(),
|
|
110
|
-
work_schedule_by_days: z.string().optional(),
|
|
111
|
-
working_hours: z.string().optional(),
|
|
112
|
-
work_format: z.string().optional(),
|
|
113
|
-
excluded_text: z.string().optional(),
|
|
114
|
-
education: z.string().optional(),
|
|
115
|
-
}, async (args) => {
|
|
67
|
+
mcpServer.tool('get-vacancies', `Search for vacancies`, {}, async (args) => {
|
|
116
68
|
try {
|
|
117
69
|
const response = await apiClient.get('/vacancies', {
|
|
118
70
|
params: args,
|
|
@@ -134,9 +86,7 @@ mcpServer.tool('get-dictionaries', `Directories of fields`, {}, async (args) =>
|
|
|
134
86
|
return handleError(error);
|
|
135
87
|
}
|
|
136
88
|
});
|
|
137
|
-
mcpServer.tool('get-areas', `Tree view of all regions`, {
|
|
138
|
-
additional_case: z.string().optional(),
|
|
139
|
-
}, async (args) => {
|
|
89
|
+
mcpServer.tool('get-areas', `Tree view of all regions`, {}, async (args) => {
|
|
140
90
|
try {
|
|
141
91
|
const response = await apiClient.get('/areas', {
|
|
142
92
|
params: args,
|
|
@@ -191,15 +141,7 @@ mcpServer.tool('get-professional-roles', `Professional role directory`, {}, asyn
|
|
|
191
141
|
return handleError(error);
|
|
192
142
|
}
|
|
193
143
|
});
|
|
194
|
-
mcpServer.tool('get-employers', `Employer search`, {
|
|
195
|
-
text: z.string().optional(),
|
|
196
|
-
area: z.string().optional(),
|
|
197
|
-
type: z.string().optional(),
|
|
198
|
-
only_with_vacancies: z.boolean().optional(),
|
|
199
|
-
sort_by: z.enum(['by_name', 'by_vacancies_open']).optional(),
|
|
200
|
-
page: z.number().optional(),
|
|
201
|
-
per_page: z.number().optional(),
|
|
202
|
-
}, async (args) => {
|
|
144
|
+
mcpServer.tool('get-employers', `Employer search`, {}, async (args) => {
|
|
203
145
|
try {
|
|
204
146
|
const response = await apiClient.get('/employers', {
|
|
205
147
|
params: args,
|