@ucm/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/dist/client.d.ts +5 -0
- package/dist/client.js +12 -0
- package/dist/index.js +20 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -25,4 +25,9 @@ export declare class UCMClient {
|
|
|
25
25
|
deleteService(serviceId: string): Promise<unknown>;
|
|
26
26
|
authorize(authorization: Record<string, unknown>): Promise<unknown>;
|
|
27
27
|
verifyToken(token: string): Promise<unknown>;
|
|
28
|
+
listServices(options?: {
|
|
29
|
+
since?: string;
|
|
30
|
+
tags?: string;
|
|
31
|
+
limit?: number;
|
|
32
|
+
}): Promise<unknown>;
|
|
28
33
|
}
|
package/dist/client.js
CHANGED
|
@@ -157,4 +157,16 @@ export class UCMClient {
|
|
|
157
157
|
async verifyToken(token) {
|
|
158
158
|
return this.unsignedFetch('/v1/token/verify', 'POST', { token });
|
|
159
159
|
}
|
|
160
|
+
async listServices(options) {
|
|
161
|
+
const params = new URLSearchParams();
|
|
162
|
+
if (options?.since)
|
|
163
|
+
params.set('since', options.since);
|
|
164
|
+
if (options?.tags)
|
|
165
|
+
params.set('tags', options.tags);
|
|
166
|
+
if (options?.limit)
|
|
167
|
+
params.set('limit', String(options.limit));
|
|
168
|
+
const query = params.toString();
|
|
169
|
+
const path = query ? `/v1/services?${query}` : '/v1/services';
|
|
170
|
+
return this.unsignedFetch(path, 'GET');
|
|
171
|
+
}
|
|
160
172
|
}
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
28
28
|
tools: [
|
|
29
29
|
{
|
|
30
30
|
name: 'ucm_discover',
|
|
31
|
-
description: 'Search UCM marketplace for API services
|
|
31
|
+
description: 'Search UCM marketplace for API services when you need capabilities beyond your built-in tools — web search, code execution, translation, image generation, data processing, etc. New services are added regularly. Returns ranked results with pricing.',
|
|
32
32
|
inputSchema: {
|
|
33
33
|
type: 'object',
|
|
34
34
|
properties: {
|
|
@@ -149,6 +149,18 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
149
149
|
required: ['token'],
|
|
150
150
|
},
|
|
151
151
|
},
|
|
152
|
+
{
|
|
153
|
+
name: 'ucm_list_services',
|
|
154
|
+
description: 'Browse the full UCM service catalog, or check for newly added services since a given date.',
|
|
155
|
+
inputSchema: {
|
|
156
|
+
type: 'object',
|
|
157
|
+
properties: {
|
|
158
|
+
since: { type: 'string', description: 'ISO 8601 date — only show services added/updated after this date' },
|
|
159
|
+
tags: { type: 'string', description: 'Comma-separated tag filter' },
|
|
160
|
+
limit: { type: 'number', description: 'Max results (default 50, max 100)' },
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
},
|
|
152
164
|
],
|
|
153
165
|
}));
|
|
154
166
|
// --- tools/call ---
|
|
@@ -202,6 +214,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
202
214
|
case 'ucm_verify_token':
|
|
203
215
|
result = await client.verifyToken(args.token);
|
|
204
216
|
break;
|
|
217
|
+
case 'ucm_list_services':
|
|
218
|
+
result = await client.listServices({
|
|
219
|
+
since: args.since,
|
|
220
|
+
tags: args.tags,
|
|
221
|
+
limit: args.limit,
|
|
222
|
+
});
|
|
223
|
+
break;
|
|
205
224
|
default:
|
|
206
225
|
return { content: [{ type: 'text', text: `Unknown tool: ${name}` }], isError: true };
|
|
207
226
|
}
|
package/package.json
CHANGED