workshub-mcp 0.0.1 → 0.0.2

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 CHANGED
@@ -41,8 +41,8 @@ WorksHub MCP 是一个基于 [Model Context Protocol](https://modelcontextprotoc
41
41
  npm install -g workshub-mcp
42
42
 
43
43
  # 运行(需要先设置环境变量)
44
- export API_BASE="https://workshub.ai/mcp"
45
- export API_KEY="your_api_key_here"
44
+ export WORKSHUB_API_URL="https://workshub.ai/mcp" # 该环境变量不是必须(以下相同)
45
+ export WORKSHUB_API_KEY="your_api_key_here"
46
46
  workshub-mcp
47
47
  ```
48
48
 
@@ -50,8 +50,8 @@ workshub-mcp
50
50
 
51
51
  ```bash
52
52
  # 直接运行
53
- API_BASE="https://workshub.ai/mcp" \
54
- API_KEY="your_api_key" \
53
+ WORKSHUB_API_URL="https://workshub.ai/mcp" \
54
+ WORKSHUB_API_KEY="your_api_key" \
55
55
  npx -y workshub-mcp
56
56
  ```
57
57
 
@@ -59,12 +59,12 @@ npx -y workshub-mcp
59
59
 
60
60
  ```bash
61
61
  # macOS/Linux
62
- export API_BASE="https://workshub.ai/mcp"
63
- export API_KEY="your_api_key_here"
62
+ export WORKSHUB_API_URL="https://workshub.ai/mcp"
63
+ export WORKSHUB_API_KEY="your_api_key_here"
64
64
 
65
65
  # Windows PowerShell
66
- $env:API_BASE = "https://workshub.ai/mcp"
67
- $env:API_KEY = "your_api_key_here"
66
+ $env:WORKSHUB_API_URL = "https://workshub.ai/mcp"
67
+ $env:WORKSHUB_API_KEY = "your_api_key_here"
68
68
  ```
69
69
 
70
70
  ---
@@ -82,8 +82,8 @@ $env:API_KEY = "your_api_key_here"
82
82
  "workshub": {
83
83
  "command": "workshub-mcp",
84
84
  "env": {
85
- "API_BASE": "https://workshub.ai/mcp",
86
- "API_KEY": "your_api_key_here"
85
+ "WORKSHUB_API_URL": "https://workshub.ai/mcp",
86
+ "WORKSHUB_API_KEY": "your_api_key_here"
87
87
  }
88
88
  }
89
89
  }
@@ -98,8 +98,8 @@ $env:API_KEY = "your_api_key_here"
98
98
  "command": "npx",
99
99
  "args": ["-y", "workshub-mcp"],
100
100
  "env": {
101
- "API_BASE": "https://workshub.ai/mcp",
102
- "API_KEY": "your_api_key_here"
101
+ "WORKSHUB_API_URL": "https://workshub.ai/mcp",
102
+ "WORKSHUB_API_KEY": "your_api_key_here"
103
103
  }
104
104
  }
105
105
  }
@@ -117,8 +117,8 @@ $env:API_KEY = "your_api_key_here"
117
117
  "workshub": {
118
118
  "command": "workshub-mcp",
119
119
  "env": {
120
- "API_BASE": "https://workshub.ai/mcp",
121
- "API_KEY": "your_api_key_here"
120
+ "WORKSHUB_API_URL": "https://workshub.ai/mcp",
121
+ "WORKSHUB_API_KEY": "your_api_key_here"
122
122
  }
123
123
  }
124
124
  }
@@ -133,8 +133,8 @@ $env:API_KEY = "your_api_key_here"
133
133
  "command": "npx",
134
134
  "args": ["-y", "workshub-mcp"],
135
135
  "env": {
136
- "API_BASE": "https://workshub.ai/mcp",
137
- "API_KEY": "your_api_key_here"
136
+ "WORKSHUB_API_URL": "https://workshub.ai/mcp",
137
+ "WORKSHUB_API_KEY": "your_api_key_here"
138
138
  }
139
139
  }
140
140
  }
@@ -269,7 +269,7 @@ create_bounty({
269
269
  budget: 5000,
270
270
  priceType: 1,
271
271
  skills: "React,TypeScript,Tailwind CSS",
272
- deadline: "2024-12-31"
272
+ deadline: "2026-02-31"
273
273
  })
274
274
  ```
275
275
 
@@ -0,0 +1,16 @@
1
+ /**
2
+ * CLI 帮助信息和命令行参数处理
3
+ */
4
+ /**
5
+ * 显示帮助信息
6
+ */
7
+ export declare function showHelp(): never;
8
+ /**
9
+ * 显示版本信息
10
+ */
11
+ export declare function showVersion(): never;
12
+ /**
13
+ * 检查并处理命令行参数
14
+ */
15
+ export declare function checkArguments(): void;
16
+ //# sourceMappingURL=help.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,wBAAgB,QAAQ,IAAI,KAAK,CAkEhC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,KAAK,CAGnC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAUrC"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * CLI 帮助信息和命令行参数处理
3
+ */
4
+ import { VERSION } from '../utils/version.js';
5
+ /**
6
+ * 显示帮助信息
7
+ */
8
+ export function showHelp() {
9
+ console.log(`
10
+ ╔════════════════════════════════════════════════════════════════════════╗
11
+ ║ WorksHub MCP Service v${VERSION} ║
12
+ ║ 让 AI Agent 能够雇佣真人工作者完成现实任务 ║
13
+ ╚════════════════════════════════════════════════════════════════════════╝
14
+
15
+ 📋 功能介绍
16
+ • 提供 16 个 MCP 工具,覆盖 5 大功能模块
17
+ • Agent 管理:获取身份信息
18
+ • 技能管理:查询可用技能
19
+ • 工作者管理:浏览和搜索工作者
20
+ • 悬赏任务:创建、管理和接受任务申请
21
+ • 对话管理:与工作者实时沟通
22
+
23
+ ⚙️ 环境变量配置
24
+ WORKSHUB_API_KEY 您的 API 密钥(必需)
25
+
26
+ 💡 使用方法
27
+
28
+ 1️⃣ 直接运行(需先配置 API Key)
29
+ export WORKSHUB_API_KEY="your_api_key"
30
+ workshub-mcp
31
+
32
+ 2️⃣ 使用 npx(推荐)
33
+ WORKSHUB_API_KEY="your_key" npx -y workshub-mcp
34
+
35
+ 📱 AI IDE 集成
36
+
37
+ Cursor 配置 (~/.cursor/mcp.json):
38
+ {
39
+ "mcpServers": {
40
+ "workshub": {
41
+ "command": "workshub-mcp",
42
+ "env": {
43
+ "WORKSHUB_API_KEY": "your_api_key"
44
+ }
45
+ }
46
+ }
47
+ }
48
+
49
+ Claude Desktop 配置 (~/Library/Application Support/Claude/claude_desktop_config.json):
50
+ {
51
+ "mcpServers": {
52
+ "workshub": {
53
+ "command": "npx",
54
+ "args": ["-y", "workshub-mcp"],
55
+ "env": {
56
+ "WORKSHUB_API_KEY": "your_api_key"
57
+ }
58
+ }
59
+ }
60
+ }
61
+
62
+ 🔑 获取 API Key
63
+ 访问 https://workshub.ai/#/dashboard 为您的 Agent 获取专属 API Key
64
+
65
+ 📚 更多信息
66
+ 官网:https://workshub.ai
67
+ 文档:https://workshub.ai/#/mcp
68
+
69
+ 🆘 命令选项
70
+ --help, -h 显示此帮助信息
71
+ --version, -v 显示版本号
72
+ `);
73
+ process.exit(0);
74
+ }
75
+ /**
76
+ * 显示版本信息
77
+ */
78
+ export function showVersion() {
79
+ console.log(`workshub-mcp v${VERSION}`);
80
+ process.exit(0);
81
+ }
82
+ /**
83
+ * 检查并处理命令行参数
84
+ */
85
+ export function checkArguments() {
86
+ const args = process.argv.slice(2);
87
+ if (args.includes('--help') || args.includes('-h')) {
88
+ showHelp();
89
+ }
90
+ if (args.includes('--version') || args.includes('-v')) {
91
+ showVersion();
92
+ }
93
+ }
94
+ //# sourceMappingURL=help.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C;;GAEG;AACH,MAAM,UAAU,QAAQ;IACtB,OAAO,CAAC,GAAG,CAAC;;6CAE+B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6DnD,CAAC,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,CAAC,GAAG,CAAC,iBAAiB,OAAO,EAAE,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAEnC,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACnD,QAAQ,EAAE,CAAC;IACb,CAAC;IAED,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACtD,WAAW,EAAE,CAAC;IAChB,CAAC;AACH,CAAC"}
@@ -0,0 +1,481 @@
1
+ /**
2
+ * MCP 工具定义配置
3
+ * 包含所有工具的 schema 定义
4
+ */
5
+ /**
6
+ * 所有工具的定义列表
7
+ */
8
+ export declare const TOOLS_DEFINITION: ({
9
+ name: string;
10
+ description: string;
11
+ inputSchema: {
12
+ type: string;
13
+ properties: {
14
+ category: {
15
+ type: string;
16
+ description: string;
17
+ };
18
+ keyword: {
19
+ type: string;
20
+ description: string;
21
+ };
22
+ skills?: undefined;
23
+ location?: undefined;
24
+ page?: undefined;
25
+ pageSize?: undefined;
26
+ workerId?: undefined;
27
+ status?: undefined;
28
+ title?: undefined;
29
+ description?: undefined;
30
+ budget?: undefined;
31
+ priceType?: undefined;
32
+ deadline?: undefined;
33
+ bountyId?: undefined;
34
+ applicationId?: undefined;
35
+ message?: undefined;
36
+ conversationId?: undefined;
37
+ content?: undefined;
38
+ messageType?: undefined;
39
+ };
40
+ required: never[];
41
+ };
42
+ } | {
43
+ name: string;
44
+ description: string;
45
+ inputSchema: {
46
+ type: string;
47
+ properties: {
48
+ skills: {
49
+ type: string;
50
+ description: string;
51
+ };
52
+ location: {
53
+ type: string;
54
+ description: string;
55
+ };
56
+ page: {
57
+ type: string;
58
+ description: string;
59
+ };
60
+ pageSize: {
61
+ type: string;
62
+ description: string;
63
+ };
64
+ category?: undefined;
65
+ keyword?: undefined;
66
+ workerId?: undefined;
67
+ status?: undefined;
68
+ title?: undefined;
69
+ description?: undefined;
70
+ budget?: undefined;
71
+ priceType?: undefined;
72
+ deadline?: undefined;
73
+ bountyId?: undefined;
74
+ applicationId?: undefined;
75
+ message?: undefined;
76
+ conversationId?: undefined;
77
+ content?: undefined;
78
+ messageType?: undefined;
79
+ };
80
+ required: never[];
81
+ };
82
+ } | {
83
+ name: string;
84
+ description: string;
85
+ inputSchema: {
86
+ type: string;
87
+ properties: {
88
+ workerId: {
89
+ type: string;
90
+ description: string;
91
+ };
92
+ category?: undefined;
93
+ keyword?: undefined;
94
+ skills?: undefined;
95
+ location?: undefined;
96
+ page?: undefined;
97
+ pageSize?: undefined;
98
+ status?: undefined;
99
+ title?: undefined;
100
+ description?: undefined;
101
+ budget?: undefined;
102
+ priceType?: undefined;
103
+ deadline?: undefined;
104
+ bountyId?: undefined;
105
+ applicationId?: undefined;
106
+ message?: undefined;
107
+ conversationId?: undefined;
108
+ content?: undefined;
109
+ messageType?: undefined;
110
+ };
111
+ required: string[];
112
+ };
113
+ } | {
114
+ name: string;
115
+ description: string;
116
+ inputSchema: {
117
+ type: string;
118
+ properties: {
119
+ status: {
120
+ type: string;
121
+ description: string;
122
+ };
123
+ skills: {
124
+ type: string;
125
+ description: string;
126
+ };
127
+ page: {
128
+ type: string;
129
+ description: string;
130
+ };
131
+ pageSize: {
132
+ type: string;
133
+ description: string;
134
+ };
135
+ category?: undefined;
136
+ keyword?: undefined;
137
+ location?: undefined;
138
+ workerId?: undefined;
139
+ title?: undefined;
140
+ description?: undefined;
141
+ budget?: undefined;
142
+ priceType?: undefined;
143
+ deadline?: undefined;
144
+ bountyId?: undefined;
145
+ applicationId?: undefined;
146
+ message?: undefined;
147
+ conversationId?: undefined;
148
+ content?: undefined;
149
+ messageType?: undefined;
150
+ };
151
+ required: never[];
152
+ };
153
+ } | {
154
+ name: string;
155
+ description: string;
156
+ inputSchema: {
157
+ type: string;
158
+ properties: {
159
+ title: {
160
+ type: string;
161
+ description: string;
162
+ };
163
+ description: {
164
+ type: string;
165
+ description: string;
166
+ };
167
+ budget: {
168
+ type: string;
169
+ description: string;
170
+ };
171
+ priceType: {
172
+ type: string;
173
+ description: string;
174
+ };
175
+ skills: {
176
+ type: string;
177
+ description: string;
178
+ };
179
+ deadline: {
180
+ type: string;
181
+ description: string;
182
+ };
183
+ category?: undefined;
184
+ keyword?: undefined;
185
+ location?: undefined;
186
+ page?: undefined;
187
+ pageSize?: undefined;
188
+ workerId?: undefined;
189
+ status?: undefined;
190
+ bountyId?: undefined;
191
+ applicationId?: undefined;
192
+ message?: undefined;
193
+ conversationId?: undefined;
194
+ content?: undefined;
195
+ messageType?: undefined;
196
+ };
197
+ required: string[];
198
+ };
199
+ } | {
200
+ name: string;
201
+ description: string;
202
+ inputSchema: {
203
+ type: string;
204
+ properties: {
205
+ bountyId: {
206
+ type: string;
207
+ description: string;
208
+ };
209
+ category?: undefined;
210
+ keyword?: undefined;
211
+ skills?: undefined;
212
+ location?: undefined;
213
+ page?: undefined;
214
+ pageSize?: undefined;
215
+ workerId?: undefined;
216
+ status?: undefined;
217
+ title?: undefined;
218
+ description?: undefined;
219
+ budget?: undefined;
220
+ priceType?: undefined;
221
+ deadline?: undefined;
222
+ applicationId?: undefined;
223
+ message?: undefined;
224
+ conversationId?: undefined;
225
+ content?: undefined;
226
+ messageType?: undefined;
227
+ };
228
+ required: string[];
229
+ };
230
+ } | {
231
+ name: string;
232
+ description: string;
233
+ inputSchema: {
234
+ type: string;
235
+ properties: {
236
+ bountyId: {
237
+ type: string;
238
+ description: string;
239
+ };
240
+ title: {
241
+ type: string;
242
+ description: string;
243
+ };
244
+ description: {
245
+ type: string;
246
+ description: string;
247
+ };
248
+ budget: {
249
+ type: string;
250
+ description: string;
251
+ };
252
+ priceType: {
253
+ type: string;
254
+ description: string;
255
+ };
256
+ skills: {
257
+ type: string;
258
+ description: string;
259
+ };
260
+ deadline: {
261
+ type: string;
262
+ description: string;
263
+ };
264
+ category?: undefined;
265
+ keyword?: undefined;
266
+ location?: undefined;
267
+ page?: undefined;
268
+ pageSize?: undefined;
269
+ workerId?: undefined;
270
+ status?: undefined;
271
+ applicationId?: undefined;
272
+ message?: undefined;
273
+ conversationId?: undefined;
274
+ content?: undefined;
275
+ messageType?: undefined;
276
+ };
277
+ required: string[];
278
+ };
279
+ } | {
280
+ name: string;
281
+ description: string;
282
+ inputSchema: {
283
+ type: string;
284
+ properties: {
285
+ bountyId: {
286
+ type: string;
287
+ description: string;
288
+ };
289
+ applicationId: {
290
+ type: string;
291
+ description: string;
292
+ };
293
+ category?: undefined;
294
+ keyword?: undefined;
295
+ skills?: undefined;
296
+ location?: undefined;
297
+ page?: undefined;
298
+ pageSize?: undefined;
299
+ workerId?: undefined;
300
+ status?: undefined;
301
+ title?: undefined;
302
+ description?: undefined;
303
+ budget?: undefined;
304
+ priceType?: undefined;
305
+ deadline?: undefined;
306
+ message?: undefined;
307
+ conversationId?: undefined;
308
+ content?: undefined;
309
+ messageType?: undefined;
310
+ };
311
+ required: string[];
312
+ };
313
+ } | {
314
+ name: string;
315
+ description: string;
316
+ inputSchema: {
317
+ type: string;
318
+ properties: {
319
+ category?: undefined;
320
+ keyword?: undefined;
321
+ skills?: undefined;
322
+ location?: undefined;
323
+ page?: undefined;
324
+ pageSize?: undefined;
325
+ workerId?: undefined;
326
+ status?: undefined;
327
+ title?: undefined;
328
+ description?: undefined;
329
+ budget?: undefined;
330
+ priceType?: undefined;
331
+ deadline?: undefined;
332
+ bountyId?: undefined;
333
+ applicationId?: undefined;
334
+ message?: undefined;
335
+ conversationId?: undefined;
336
+ content?: undefined;
337
+ messageType?: undefined;
338
+ };
339
+ required: never[];
340
+ };
341
+ } | {
342
+ name: string;
343
+ description: string;
344
+ inputSchema: {
345
+ type: string;
346
+ properties: {
347
+ workerId: {
348
+ type: string;
349
+ description: string;
350
+ };
351
+ message: {
352
+ type: string;
353
+ description: string;
354
+ };
355
+ category?: undefined;
356
+ keyword?: undefined;
357
+ skills?: undefined;
358
+ location?: undefined;
359
+ page?: undefined;
360
+ pageSize?: undefined;
361
+ status?: undefined;
362
+ title?: undefined;
363
+ description?: undefined;
364
+ budget?: undefined;
365
+ priceType?: undefined;
366
+ deadline?: undefined;
367
+ bountyId?: undefined;
368
+ applicationId?: undefined;
369
+ conversationId?: undefined;
370
+ content?: undefined;
371
+ messageType?: undefined;
372
+ };
373
+ required: string[];
374
+ };
375
+ } | {
376
+ name: string;
377
+ description: string;
378
+ inputSchema: {
379
+ type: string;
380
+ properties: {
381
+ conversationId: {
382
+ type: string;
383
+ description: string;
384
+ };
385
+ page: {
386
+ type: string;
387
+ description: string;
388
+ };
389
+ pageSize: {
390
+ type: string;
391
+ description: string;
392
+ };
393
+ category?: undefined;
394
+ keyword?: undefined;
395
+ skills?: undefined;
396
+ location?: undefined;
397
+ workerId?: undefined;
398
+ status?: undefined;
399
+ title?: undefined;
400
+ description?: undefined;
401
+ budget?: undefined;
402
+ priceType?: undefined;
403
+ deadline?: undefined;
404
+ bountyId?: undefined;
405
+ applicationId?: undefined;
406
+ message?: undefined;
407
+ content?: undefined;
408
+ messageType?: undefined;
409
+ };
410
+ required: string[];
411
+ };
412
+ } | {
413
+ name: string;
414
+ description: string;
415
+ inputSchema: {
416
+ type: string;
417
+ properties: {
418
+ conversationId: {
419
+ type: string;
420
+ description: string;
421
+ };
422
+ content: {
423
+ type: string;
424
+ description: string;
425
+ };
426
+ messageType: {
427
+ type: string;
428
+ description: string;
429
+ };
430
+ category?: undefined;
431
+ keyword?: undefined;
432
+ skills?: undefined;
433
+ location?: undefined;
434
+ page?: undefined;
435
+ pageSize?: undefined;
436
+ workerId?: undefined;
437
+ status?: undefined;
438
+ title?: undefined;
439
+ description?: undefined;
440
+ budget?: undefined;
441
+ priceType?: undefined;
442
+ deadline?: undefined;
443
+ bountyId?: undefined;
444
+ applicationId?: undefined;
445
+ message?: undefined;
446
+ };
447
+ required: string[];
448
+ };
449
+ } | {
450
+ name: string;
451
+ description: string;
452
+ inputSchema: {
453
+ type: string;
454
+ properties: {
455
+ conversationId: {
456
+ type: string;
457
+ description: string;
458
+ };
459
+ category?: undefined;
460
+ keyword?: undefined;
461
+ skills?: undefined;
462
+ location?: undefined;
463
+ page?: undefined;
464
+ pageSize?: undefined;
465
+ workerId?: undefined;
466
+ status?: undefined;
467
+ title?: undefined;
468
+ description?: undefined;
469
+ budget?: undefined;
470
+ priceType?: undefined;
471
+ deadline?: undefined;
472
+ bountyId?: undefined;
473
+ applicationId?: undefined;
474
+ message?: undefined;
475
+ content?: undefined;
476
+ messageType?: undefined;
477
+ };
478
+ required: string[];
479
+ };
480
+ })[];
481
+ //# sourceMappingURL=tools-definition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools-definition.d.ts","sourceRoot":"","sources":["../../src/config/tools-definition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqT5B,CAAC"}