@sendahuman/mcp-server 0.1.0 → 0.2.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/build/index.js +66 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -19,7 +19,7 @@ async function apiRequest(path, options = {}) {
|
|
|
19
19
|
}
|
|
20
20
|
const server = new McpServer({
|
|
21
21
|
name: 'sendahuman',
|
|
22
|
-
version: '0.
|
|
22
|
+
version: '0.2.0',
|
|
23
23
|
});
|
|
24
24
|
// ─── search_humans ───────────────────────────────────────────
|
|
25
25
|
server.registerTool('search_humans', {
|
|
@@ -107,6 +107,71 @@ server.registerTool('book_human', {
|
|
|
107
107
|
],
|
|
108
108
|
};
|
|
109
109
|
});
|
|
110
|
+
// ─── list_skills ─────────────────────────────────────────────
|
|
111
|
+
server.registerTool('list_skills', {
|
|
112
|
+
description: 'Get all available skills across the sendahuman.ai platform with usage counts. Useful for discovering what humans can do before searching.',
|
|
113
|
+
inputSchema: {},
|
|
114
|
+
}, async () => {
|
|
115
|
+
const data = await apiRequest('/api/skills');
|
|
116
|
+
return {
|
|
117
|
+
content: [
|
|
118
|
+
{
|
|
119
|
+
type: 'text',
|
|
120
|
+
text: JSON.stringify(data, null, 2),
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
// ─── list_bounties ───────────────────────────────────────────
|
|
126
|
+
server.registerTool('list_bounties', {
|
|
127
|
+
description: 'Browse open task postings (bounties) on sendahuman.ai. Filter by category, location, or required skill.',
|
|
128
|
+
inputSchema: {
|
|
129
|
+
category: z.string().optional().describe('Filter by category (e.g. "Delivery", "Repair")'),
|
|
130
|
+
location: z.string().optional().describe('Filter by location (e.g. "Berlin", "Munich")'),
|
|
131
|
+
skill: z.string().optional().describe('Filter by required skill'),
|
|
132
|
+
remote: z.boolean().optional().describe('Only return remote bounties'),
|
|
133
|
+
limit: z.number().min(1).max(100).optional().describe('Max results to return (default 50)'),
|
|
134
|
+
},
|
|
135
|
+
}, async ({ category, location, skill, remote, limit }) => {
|
|
136
|
+
const params = new URLSearchParams();
|
|
137
|
+
if (category)
|
|
138
|
+
params.set('category', category);
|
|
139
|
+
if (location)
|
|
140
|
+
params.set('location', location);
|
|
141
|
+
if (skill)
|
|
142
|
+
params.set('skill', skill);
|
|
143
|
+
if (remote !== undefined)
|
|
144
|
+
params.set('remote', String(remote));
|
|
145
|
+
if (limit)
|
|
146
|
+
params.set('limit', String(limit));
|
|
147
|
+
const query = params.toString();
|
|
148
|
+
const data = await apiRequest(`/api/bounties${query ? `?${query}` : ''}`);
|
|
149
|
+
return {
|
|
150
|
+
content: [
|
|
151
|
+
{
|
|
152
|
+
type: 'text',
|
|
153
|
+
text: JSON.stringify(data, null, 2),
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
};
|
|
157
|
+
});
|
|
158
|
+
// ─── get_bounty ──────────────────────────────────────────────
|
|
159
|
+
server.registerTool('get_bounty', {
|
|
160
|
+
description: 'Get full details of a specific bounty/task posting by its ID.',
|
|
161
|
+
inputSchema: {
|
|
162
|
+
bounty_id: z.string().describe('The UUID of the bounty to look up'),
|
|
163
|
+
},
|
|
164
|
+
}, async ({ bounty_id }) => {
|
|
165
|
+
const data = await apiRequest(`/api/bounties/${bounty_id}`);
|
|
166
|
+
return {
|
|
167
|
+
content: [
|
|
168
|
+
{
|
|
169
|
+
type: 'text',
|
|
170
|
+
text: JSON.stringify(data, null, 2),
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
};
|
|
174
|
+
});
|
|
110
175
|
// ─── Start server ────────────────────────────────────────────
|
|
111
176
|
async function main() {
|
|
112
177
|
const transport = new StdioServerTransport();
|