@apify/actors-mcp-server 0.9.8-beta.1 → 0.9.9-beta.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/mcp/client.js +1 -1
- package/dist/mcp/proxy.d.ts +9 -0
- package/dist/mcp/proxy.d.ts.map +1 -1
- package/dist/mcp/proxy.js +39 -24
- package/dist/mcp/proxy.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +6 -5
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/utils.d.ts +0 -16
- package/dist/mcp/utils.d.ts.map +1 -1
- package/dist/mcp/utils.js +0 -25
- package/dist/mcp/utils.js.map +1 -1
- package/dist/tools/core/actor_execution.d.ts +1 -3
- package/dist/tools/core/actor_execution.d.ts.map +1 -1
- package/dist/tools/core/actor_execution.js +1 -3
- package/dist/tools/core/actor_execution.js.map +1 -1
- package/dist/tools/core/call_actor_common.d.ts.map +1 -1
- package/dist/tools/core/call_actor_common.js +2 -0
- package/dist/tools/core/call_actor_common.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/utils/mcp.d.ts +11 -5
- package/dist/utils/mcp.d.ts.map +1 -1
- package/dist/utils/mcp.js +12 -16
- package/dist/utils/mcp.js.map +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/server.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -304,11 +304,11 @@ export type DatasetItem = Record<number | string, unknown>;
|
|
|
304
304
|
/**
|
|
305
305
|
* Apify token type.
|
|
306
306
|
*
|
|
307
|
-
* Can be null or undefined in case of Skyfire requests.
|
|
307
|
+
* Can be null or undefined in the case of Skyfire requests.
|
|
308
308
|
*/
|
|
309
309
|
export type ApifyToken = string | null | undefined;
|
|
310
310
|
/**
|
|
311
|
-
* Unified status type for tool execution lifecycle.
|
|
311
|
+
* Unified status type for the tool execution lifecycle.
|
|
312
312
|
* Derived from TOOL_STATUS to ensure type safety and avoid duplication.
|
|
313
313
|
*/
|
|
314
314
|
export type ToolStatus = (typeof TOOL_STATUS)[keyof typeof TOOL_STATUS];
|
package/dist/utils/mcp.d.ts
CHANGED
|
@@ -13,13 +13,19 @@ export declare function buildUsageMeta(source: {
|
|
|
13
13
|
}): Record<string, unknown> | undefined;
|
|
14
14
|
/**
|
|
15
15
|
* Helper to build a response for MCP from an array of text strings.
|
|
16
|
+
*
|
|
17
|
+
* Status model used by this project:
|
|
18
|
+
* - `isError` is MCP-visible and returned to the client.
|
|
19
|
+
* - `toolStatus` is an internal helper input for server telemetry.
|
|
20
|
+
* - `internalToolStatus` is the transient wire field carrying `toolStatus`
|
|
21
|
+
* from tool helpers back to the server, and is stripped before client response.
|
|
22
|
+
*
|
|
16
23
|
* @param options - Object containing response configuration
|
|
17
24
|
* @param options.texts - Array of text strings to include in the response
|
|
18
25
|
* @param options.isError - Optional flag to mark the response as an error (default: false).
|
|
19
26
|
* This must remain MCP compliant: true for any tool-level error.
|
|
20
27
|
* @param options.toolStatus - Optional internal tool status used for telemetry. When provided,
|
|
21
|
-
* it
|
|
22
|
-
* and strip it before sending the response to the MCP client.
|
|
28
|
+
* it is attached as `internalToolStatus` for server-side processing only.
|
|
23
29
|
* @param options.structuredContent - Optional structured content of unknown type
|
|
24
30
|
* @param options._meta - Optional metadata for widget rendering (e.g., OpenAI widget metadata)
|
|
25
31
|
*/
|
|
@@ -30,13 +36,13 @@ export declare function buildMCPResponse(options: {
|
|
|
30
36
|
structuredContent?: unknown;
|
|
31
37
|
_meta?: Record<string, unknown>;
|
|
32
38
|
}): {
|
|
39
|
+
_meta?: Record<string, unknown> | undefined;
|
|
40
|
+
structuredContent?: {} | null | undefined;
|
|
41
|
+
internalToolStatus?: ToolStatus | undefined;
|
|
33
42
|
content: {
|
|
34
43
|
type: "text";
|
|
35
44
|
text: string;
|
|
36
45
|
}[];
|
|
37
46
|
isError: boolean;
|
|
38
|
-
internalToolStatus?: ToolStatus;
|
|
39
|
-
structuredContent?: unknown;
|
|
40
|
-
_meta?: Record<string, unknown>;
|
|
41
47
|
};
|
|
42
48
|
//# sourceMappingURL=mcp.d.ts.map
|
package/dist/utils/mcp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/utils/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAQtC;AAED
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/utils/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAQtC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IACtC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;;;;;;;;;EAgBA"}
|
package/dist/utils/mcp.js
CHANGED
|
@@ -17,34 +17,30 @@ export function buildUsageMeta(source) {
|
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Helper to build a response for MCP from an array of text strings.
|
|
20
|
+
*
|
|
21
|
+
* Status model used by this project:
|
|
22
|
+
* - `isError` is MCP-visible and returned to the client.
|
|
23
|
+
* - `toolStatus` is an internal helper input for server telemetry.
|
|
24
|
+
* - `internalToolStatus` is the transient wire field carrying `toolStatus`
|
|
25
|
+
* from tool helpers back to the server, and is stripped before client response.
|
|
26
|
+
*
|
|
20
27
|
* @param options - Object containing response configuration
|
|
21
28
|
* @param options.texts - Array of text strings to include in the response
|
|
22
29
|
* @param options.isError - Optional flag to mark the response as an error (default: false).
|
|
23
30
|
* This must remain MCP compliant: true for any tool-level error.
|
|
24
31
|
* @param options.toolStatus - Optional internal tool status used for telemetry. When provided,
|
|
25
|
-
* it
|
|
26
|
-
* and strip it before sending the response to the MCP client.
|
|
32
|
+
* it is attached as `internalToolStatus` for server-side processing only.
|
|
27
33
|
* @param options.structuredContent - Optional structured content of unknown type
|
|
28
34
|
* @param options._meta - Optional metadata for widget rendering (e.g., OpenAI widget metadata)
|
|
29
35
|
*/
|
|
30
36
|
export function buildMCPResponse(options) {
|
|
31
37
|
const { texts, isError = false, toolStatus, structuredContent, _meta, } = options;
|
|
32
|
-
|
|
38
|
+
return {
|
|
33
39
|
content: texts.map((text) => ({ type: 'text', text })),
|
|
34
40
|
isError,
|
|
41
|
+
...(toolStatus && { internalToolStatus: toolStatus }),
|
|
42
|
+
...(structuredContent !== undefined && { structuredContent }),
|
|
43
|
+
...(_meta !== undefined && { _meta }),
|
|
35
44
|
};
|
|
36
|
-
// Attach internal tool status for telemetry; server will read and strip it
|
|
37
|
-
if (toolStatus) {
|
|
38
|
-
response.internalToolStatus = toolStatus;
|
|
39
|
-
}
|
|
40
|
-
// Add structured content if provided
|
|
41
|
-
if (structuredContent !== undefined) {
|
|
42
|
-
response.structuredContent = structuredContent;
|
|
43
|
-
}
|
|
44
|
-
// Add metadata if provided (e.g., for widget rendering)
|
|
45
|
-
if (_meta !== undefined) {
|
|
46
|
-
response._meta = _meta;
|
|
47
|
-
}
|
|
48
|
-
return response;
|
|
49
45
|
}
|
|
50
46
|
//# sourceMappingURL=mcp.js.map
|
package/dist/utils/mcp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/utils/mcp.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,MAG9B;IACG,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAC3C,OAAO,aAAa,KAAK,SAAS;QAC9B,CAAC,CAAC;YACE,aAAa;YACb,QAAQ;SACX;QACD,CAAC,CAAC,SAAS,CAAC;AACpB,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/utils/mcp.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,MAG9B;IACG,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAC3C,OAAO,aAAa,KAAK,SAAS;QAC9B,CAAC,CAAC;YACE,aAAa;YACb,QAAQ;SACX;QACD,CAAC,CAAC,SAAS,CAAC;AACpB,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAMhC;IACG,MAAM,EACF,KAAK,EACL,OAAO,GAAG,KAAK,EACf,UAAU,EACV,iBAAiB,EACjB,KAAK,GACR,GAAG,OAAO,CAAC;IAEZ,OAAO;QACH,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/D,OAAO;QACP,GAAG,CAAC,UAAU,IAAI,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC;QACrD,GAAG,CAAC,iBAAiB,KAAK,SAAS,IAAI,EAAE,iBAAiB,EAAE,CAAC;QAC7D,GAAG,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,CAAC;KACxC,CAAC;AACN,CAAC"}
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": "0.2",
|
|
3
3
|
"name": "apify-mcp-server",
|
|
4
4
|
"display_name": "Apify MCP server",
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.9",
|
|
6
6
|
"description": "Extract data from any website using thousands of tools from the Apify Store.",
|
|
7
7
|
"long_description": "Apify is the world's largest marketplace of tools for web scraping, data extraction, and web automation. You can extract structured data from social media, e-commerce, search engines, maps, travel sites, or any other website.",
|
|
8
8
|
"keywords": [
|
package/package.json
CHANGED