@pipeworx/mcp-adzuna 0.1.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/LICENSE +21 -0
- package/README.md +61 -0
- package/package.json +20 -0
- package/server.json +18 -0
- package/src/index.ts +206 -0
- package/tsconfig.json +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pipeworx
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# mcp-adzuna
|
|
2
|
+
|
|
3
|
+
Adzuna MCP — global job-board aggregator
|
|
4
|
+
|
|
5
|
+
Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 250+ live data sources.
|
|
6
|
+
|
|
7
|
+
## Tools
|
|
8
|
+
|
|
9
|
+
| Tool | Description |
|
|
10
|
+
|------|-------------|
|
|
11
|
+
| `search` | Search jobs in a country. country is required (ISO-style: gb, us, ca, de, fr, ...). |
|
|
12
|
+
| `categories` | Adzuna's normalized job-category list for a country. |
|
|
13
|
+
| `salary_histogram` | Wage distribution for jobs matching a query. |
|
|
14
|
+
| `top_companies` | Companies posting the most jobs matching the filter. |
|
|
15
|
+
| `history` | Historical job-volume / mean-salary monthly time series. |
|
|
16
|
+
| `regional_stats` | Current job counts by region. |
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"mcpServers": {
|
|
25
|
+
"adzuna": {
|
|
26
|
+
"url": "https://gateway.pipeworx.io/adzuna/mcp"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or connect to the full Pipeworx gateway for access to all 250+ data sources:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"mcpServers": {
|
|
37
|
+
"pipeworx": {
|
|
38
|
+
"url": "https://gateway.pipeworx.io/mcp"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Using with ask_pipeworx
|
|
45
|
+
|
|
46
|
+
Instead of calling tools directly, you can ask questions in plain English:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
ask_pipeworx({ question: "your question about Adzuna data" })
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The gateway picks the right tool and fills the arguments automatically.
|
|
53
|
+
|
|
54
|
+
## More
|
|
55
|
+
|
|
56
|
+
- [All tools and guides](https://github.com/pipeworx-io/examples)
|
|
57
|
+
- [pipeworx.io](https://pipeworx.io)
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pipeworx/mcp-adzuna",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Adzuna MCP — global job-board aggregator",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"types": "src/index.ts",
|
|
8
|
+
"keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "adzuna"],
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/pipeworx-io/mcp-adzuna"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"typecheck": "tsc --noEmit"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"typescript": "^5.7.0"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.pipeworx-io/adzuna",
|
|
4
|
+
"title": "Adzuna",
|
|
5
|
+
"description": "Adzuna MCP — global job-board aggregator",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"websiteUrl": "https://pipeworx.io/packs/adzuna",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/pipeworx-io/mcp-adzuna",
|
|
10
|
+
"source": "github"
|
|
11
|
+
},
|
|
12
|
+
"remotes": [
|
|
13
|
+
{
|
|
14
|
+
"type": "streamable-http",
|
|
15
|
+
"url": "https://gateway.pipeworx.io/adzuna/mcp"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
interface McpToolDefinition {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
inputSchema: {
|
|
5
|
+
type: 'object';
|
|
6
|
+
properties: Record<string, unknown>;
|
|
7
|
+
required?: string[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface McpToolExport {
|
|
12
|
+
tools: McpToolDefinition[];
|
|
13
|
+
callTool: (name: string, args: Record<string, unknown>) => Promise<unknown>;
|
|
14
|
+
meter?: { credits: number };
|
|
15
|
+
cost?: Record<string, unknown>;
|
|
16
|
+
provider?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Adzuna MCP — global job-board aggregator
|
|
21
|
+
*
|
|
22
|
+
* Auth: app_id + app_key both required, passed as query params.
|
|
23
|
+
* Free tier: 250 calls/mo.
|
|
24
|
+
*
|
|
25
|
+
* Docs: https://developer.adzuna.com/docs/search
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
const BASE = 'https://api.adzuna.com/v1/api/jobs';
|
|
30
|
+
|
|
31
|
+
const tools: McpToolExport['tools'] = [
|
|
32
|
+
{
|
|
33
|
+
name: 'search',
|
|
34
|
+
description: 'Search jobs in a country. country is required (ISO-style: gb, us, ca, de, fr, ...).',
|
|
35
|
+
inputSchema: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: {
|
|
38
|
+
country: { type: 'string', description: 'gb, us, ca, de, fr, ...' },
|
|
39
|
+
what: { type: 'string', description: 'Free-text query (title + description)' },
|
|
40
|
+
what_phrase: { type: 'string', description: 'Exact-phrase variant of `what`' },
|
|
41
|
+
where: { type: 'string', description: 'Location (city, region)' },
|
|
42
|
+
distance: { type: 'number', description: 'Search radius from `where`, in km' },
|
|
43
|
+
results_per_page: { type: 'number', description: '1-50 (default 20)' },
|
|
44
|
+
page: { type: 'number', description: '1-based page (default 1)' },
|
|
45
|
+
salary_min: { type: 'number', description: 'Lower bound, in local currency' },
|
|
46
|
+
salary_max: { type: 'number', description: 'Upper bound' },
|
|
47
|
+
full_time: { type: 'boolean' },
|
|
48
|
+
permanent: { type: 'boolean' },
|
|
49
|
+
sort: { type: 'string', description: 'default | hybrid | date | salary | relevance' },
|
|
50
|
+
max_days_old: { type: 'number', description: 'Restrict to jobs posted in the last N days' },
|
|
51
|
+
},
|
|
52
|
+
required: ['country'],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'categories',
|
|
57
|
+
description: "Adzuna's normalized job-category list for a country.",
|
|
58
|
+
inputSchema: {
|
|
59
|
+
type: 'object',
|
|
60
|
+
properties: { country: { type: 'string' } },
|
|
61
|
+
required: ['country'],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'salary_histogram',
|
|
66
|
+
description: 'Wage distribution for jobs matching a query.',
|
|
67
|
+
inputSchema: {
|
|
68
|
+
type: 'object',
|
|
69
|
+
properties: {
|
|
70
|
+
country: { type: 'string' },
|
|
71
|
+
what: { type: 'string' },
|
|
72
|
+
where: { type: 'string' },
|
|
73
|
+
location_filter: { type: 'string', description: 'Adzuna location id (e.g. "London")' },
|
|
74
|
+
},
|
|
75
|
+
required: ['country'],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'top_companies',
|
|
80
|
+
description: 'Companies posting the most jobs matching the filter.',
|
|
81
|
+
inputSchema: {
|
|
82
|
+
type: 'object',
|
|
83
|
+
properties: {
|
|
84
|
+
country: { type: 'string' },
|
|
85
|
+
what: { type: 'string' },
|
|
86
|
+
where: { type: 'string' },
|
|
87
|
+
},
|
|
88
|
+
required: ['country'],
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'history',
|
|
93
|
+
description: 'Historical job-volume / mean-salary monthly time series.',
|
|
94
|
+
inputSchema: {
|
|
95
|
+
type: 'object',
|
|
96
|
+
properties: {
|
|
97
|
+
country: { type: 'string' },
|
|
98
|
+
months: { type: 'number', description: '1-100 (default 12)' },
|
|
99
|
+
location: { type: 'string' },
|
|
100
|
+
category: { type: 'string', description: 'Adzuna category tag (from `categories` tool)' },
|
|
101
|
+
},
|
|
102
|
+
required: ['country'],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'regional_stats',
|
|
107
|
+
description: 'Current job counts by region.',
|
|
108
|
+
inputSchema: {
|
|
109
|
+
type: 'object',
|
|
110
|
+
properties: {
|
|
111
|
+
country: { type: 'string' },
|
|
112
|
+
location_filter: { type: 'string' },
|
|
113
|
+
category: { type: 'string' },
|
|
114
|
+
},
|
|
115
|
+
required: ['country'],
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
];
|
|
119
|
+
|
|
120
|
+
async function callTool(name: string, args: Record<string, unknown>): Promise<unknown> {
|
|
121
|
+
const apiKey = (args._apiKey as string | undefined)?.trim();
|
|
122
|
+
if (!apiKey) {
|
|
123
|
+
throw new Error(
|
|
124
|
+
'Adzuna requires app_id and app_key. Contact the operator about platform credentials, or BYO via ?_apiKey=<app_id>:<app_key> after registering at https://developer.adzuna.com/.',
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
const colon = apiKey.indexOf(':');
|
|
128
|
+
if (colon < 1 || colon === apiKey.length - 1) {
|
|
129
|
+
throw new Error('Adzuna _apiKey must be "<app_id>:<app_key>".');
|
|
130
|
+
}
|
|
131
|
+
const appId = apiKey.slice(0, colon);
|
|
132
|
+
const appKey = apiKey.slice(colon + 1);
|
|
133
|
+
const country = reqStr(args, 'country', '"us"').toLowerCase();
|
|
134
|
+
|
|
135
|
+
const auth = new URLSearchParams({ app_id: appId, app_key: appKey, 'content-type': 'application/json' });
|
|
136
|
+
|
|
137
|
+
switch (name) {
|
|
138
|
+
case 'search': {
|
|
139
|
+
const page = String(Math.max(1, (args.page as number) ?? 1));
|
|
140
|
+
const params = new URLSearchParams(auth);
|
|
141
|
+
params.set('results_per_page', String(Math.min(50, Math.max(1, (args.results_per_page as number) ?? 20))));
|
|
142
|
+
if (args.what) params.set('what', String(args.what));
|
|
143
|
+
if (args.what_phrase) params.set('what_phrase', String(args.what_phrase));
|
|
144
|
+
if (args.where) params.set('where', String(args.where));
|
|
145
|
+
if (args.distance !== undefined) params.set('distance', String(args.distance));
|
|
146
|
+
if (args.salary_min !== undefined) params.set('salary_min', String(args.salary_min));
|
|
147
|
+
if (args.salary_max !== undefined) params.set('salary_max', String(args.salary_max));
|
|
148
|
+
if (args.full_time === true) params.set('full_time', '1');
|
|
149
|
+
if (args.permanent === true) params.set('permanent', '1');
|
|
150
|
+
if (args.sort) params.set('sort_by', String(args.sort));
|
|
151
|
+
if (args.max_days_old !== undefined) params.set('max_days_old', String(args.max_days_old));
|
|
152
|
+
return adzunaGet(`/${country}/search/${page}?${params}`);
|
|
153
|
+
}
|
|
154
|
+
case 'categories':
|
|
155
|
+
return adzunaGet(`/${country}/categories?${auth}`);
|
|
156
|
+
case 'salary_histogram': {
|
|
157
|
+
const params = new URLSearchParams(auth);
|
|
158
|
+
if (args.what) params.set('what', String(args.what));
|
|
159
|
+
if (args.where) params.set('where', String(args.where));
|
|
160
|
+
if (args.location_filter) params.set('location0', String(args.location_filter));
|
|
161
|
+
return adzunaGet(`/${country}/histogram?${params}`);
|
|
162
|
+
}
|
|
163
|
+
case 'top_companies': {
|
|
164
|
+
const params = new URLSearchParams(auth);
|
|
165
|
+
if (args.what) params.set('what', String(args.what));
|
|
166
|
+
if (args.where) params.set('where', String(args.where));
|
|
167
|
+
return adzunaGet(`/${country}/top_companies?${params}`);
|
|
168
|
+
}
|
|
169
|
+
case 'history': {
|
|
170
|
+
const params = new URLSearchParams(auth);
|
|
171
|
+
params.set('months', String(Math.min(100, Math.max(1, (args.months as number) ?? 12))));
|
|
172
|
+
if (args.location) params.set('location0', String(args.location));
|
|
173
|
+
if (args.category) params.set('category', String(args.category));
|
|
174
|
+
return adzunaGet(`/${country}/history?${params}`);
|
|
175
|
+
}
|
|
176
|
+
case 'regional_stats': {
|
|
177
|
+
const params = new URLSearchParams(auth);
|
|
178
|
+
if (args.location_filter) params.set('location0', String(args.location_filter));
|
|
179
|
+
if (args.category) params.set('category', String(args.category));
|
|
180
|
+
return adzunaGet(`/${country}/geodata?${params}`);
|
|
181
|
+
}
|
|
182
|
+
default:
|
|
183
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
async function adzunaGet(path: string) {
|
|
188
|
+
const res = await fetch(`${BASE}${path}`, { headers: { Accept: 'application/json' } });
|
|
189
|
+
if (res.status === 401) throw new Error('Adzuna: unauthorized — check app_id/app_key');
|
|
190
|
+
if (res.status === 429) throw new Error('Adzuna: rate-limit / quota exhausted');
|
|
191
|
+
if (!res.ok) {
|
|
192
|
+
const t = await res.text();
|
|
193
|
+
throw new Error(`Adzuna error: ${res.status} ${t.slice(0, 200)}`);
|
|
194
|
+
}
|
|
195
|
+
return res.json();
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function reqStr(args: Record<string, unknown>, key: string, example: string): string {
|
|
199
|
+
const v = args[key];
|
|
200
|
+
if (typeof v !== 'string' || !v.trim()) {
|
|
201
|
+
throw new Error(`Required argument "${key}" is missing. Pass a string like ${example}.`);
|
|
202
|
+
}
|
|
203
|
+
return v;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export default { tools, callTool, meter: { credits: 1 } } satisfies McpToolExport;
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"outDir": "dist",
|
|
10
|
+
"rootDir": "src",
|
|
11
|
+
"declaration": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["src"]
|
|
14
|
+
}
|