@apify/actors-mcp-server 0.1.6 → 0.1.7-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/README.md +37 -12
- package/dist/actors.d.ts +42 -0
- package/dist/actors.d.ts.map +1 -0
- package/dist/{actorDefinition.js → actors.js} +32 -27
- package/dist/actors.js.map +1 -0
- package/dist/const.d.ts +11 -4
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +14 -6
- package/dist/const.js.map +1 -1
- package/dist/examples/clientSse.d.ts +1 -0
- package/dist/examples/clientSse.d.ts.map +1 -1
- package/dist/examples/clientSse.js +1 -1
- package/dist/examples/clientSse.js.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/input.d.ts.map +1 -1
- package/dist/input.js +3 -0
- package/dist/input.js.map +1 -1
- package/dist/main.js +11 -2
- package/dist/main.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +48 -18
- package/dist/server.js.map +1 -1
- package/dist/tools.d.ts +43 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +123 -0
- package/dist/tools.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +35 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -2
- package/dist/actorDefinition.d.ts +0 -14
- package/dist/actorDefinition.d.ts.map +0 -1
- package/dist/actorDefinition.js.map +0 -1
package/README.md
CHANGED
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
Implementation of an MCP server for all [Apify Actors](https://apify.com/store).
|
|
6
6
|
This server enables interaction with one or more Apify Actors that can be defined in the MCP Server configuration.
|
|
7
7
|
|
|
8
|
-
The server can be used in
|
|
9
|
-
-
|
|
10
|
-
-
|
|
8
|
+
The server can be used in several ways:
|
|
9
|
+
- **🇦 MCP Server Actor** – HTTP server accessible via Server-Sent Events (SSE).
|
|
10
|
+
- **⾕ MCP Server Stdio** – Local server available via standard input/output (stdio).
|
|
11
|
+
- **💬 [Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client)** – Chat-like UI for interacting with the MCP server.
|
|
11
12
|
|
|
12
13
|
# 🎯 What does Apify MCP server do?
|
|
13
14
|
|
|
@@ -19,8 +20,15 @@ For example it can:
|
|
|
19
20
|
- use [Instagram Scraper](https://apify.com/apify/instagram-scraper) to scrape Instagram posts, profiles, places, photos, and comments
|
|
20
21
|
- use [RAG Web Browser](https://apify.com/apify/web-scraper) to search the web, scrape the top N URLs, and return their content
|
|
21
22
|
|
|
23
|
+
# MCP Clients
|
|
24
|
+
|
|
25
|
+
To interact with the Apify MCP server, you can use MCP clients such as:
|
|
26
|
+
- [Claude Desktop](https://claude.ai/download) (only Stdio support)
|
|
27
|
+
- [LibreChat](https://www.librechat.ai/) (stdio and SSE support (yeah without Authorization header))
|
|
28
|
+
- [Apify Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client) (SSE support with Authorization headers)
|
|
29
|
+
- other clients at [https://modelcontextprotocol.io/clients](https://modelcontextprotocol.io/clients)
|
|
30
|
+
- more clients at [https://glama.ai/mcp/clients](https://glama.ai/mcp/clients)
|
|
22
31
|
|
|
23
|
-
To interact with the Apify MCP server, you can use MCP clients such as [Claude Desktop](https://claude.ai/download), [LibreChat](https://www.librechat.ai/), or other [MCP clients](https://glama.ai/mcp/clients).
|
|
24
32
|
Additionally, you can use simple example clients found in the [examples](https://github.com/apify/actor-mcp-server/tree/main/src/examples) directory.
|
|
25
33
|
|
|
26
34
|
When you have Actors integrated with the MCP server, you can ask:
|
|
@@ -54,6 +62,8 @@ To learn more, check out the blog post: [What are AI Agents?](https://blog.apify
|
|
|
54
62
|
|
|
55
63
|
## Tools
|
|
56
64
|
|
|
65
|
+
### Actors
|
|
66
|
+
|
|
57
67
|
Any [Apify Actor](https://apify.com/store) can be used as a tool.
|
|
58
68
|
By default, the server is pre-configured with the Actors specified below, but it can be overridden by providing Actor input.
|
|
59
69
|
|
|
@@ -79,6 +89,19 @@ You don't need to specify the input parameters or which Actor to call, everythin
|
|
|
79
89
|
When a tool is called, the arguments are automatically passed to the Actor by the LLM.
|
|
80
90
|
You can refer to the specific Actor's documentation for a list of available arguments.
|
|
81
91
|
|
|
92
|
+
### Helper tools
|
|
93
|
+
|
|
94
|
+
The server provides a set of helper tools to discover available Actors and retrieve their details:
|
|
95
|
+
- `get-actor-details`: Retrieves documentation, input schema, and other details about a specific Actor.
|
|
96
|
+
- `discover-actors`: Searches for relevant Actors using keywords and returns their details.
|
|
97
|
+
|
|
98
|
+
There are also tools to manage the available tools list. However, dynamically adding and removing tools requires the MCP client to have the capability to manage the tools list, which is typically not supported.
|
|
99
|
+
|
|
100
|
+
You can try this functionality using the [Apify Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client) Actor. To enable it, set the `enableActorAutoLoading` parameter.
|
|
101
|
+
|
|
102
|
+
- `add-actor-as-tool`: Adds an Actor by name to the available tools list without executing it, requiring user consent to run later.
|
|
103
|
+
- `remove-actor-from-tool`: Removes an Actor by name from the available tools list when it's no longer needed.
|
|
104
|
+
|
|
82
105
|
## Prompt & Resources
|
|
83
106
|
|
|
84
107
|
The server does not provide any resources and prompts.
|
|
@@ -110,10 +133,13 @@ https://actors-mcp-server-task.apify.actor?token=<APIFY_TOKEN>
|
|
|
110
133
|
|
|
111
134
|
You can find a list of all available Actors in the [Apify Store](https://apify.com/store).
|
|
112
135
|
|
|
113
|
-
#### 💬 Interact with the MCP Server
|
|
136
|
+
#### 💬 Interact with the MCP Server over SSE
|
|
114
137
|
|
|
115
138
|
Once the server is running, you can interact with Server-Sent Events (SSE) to send messages to the server and receive responses.
|
|
116
|
-
|
|
139
|
+
The easiest way is to use [Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client) on Apify.
|
|
140
|
+
|
|
141
|
+
Other clients do not support SSE yet, but this will likely change.
|
|
142
|
+
Please verify if MCP clients such ass [Superinference.ai](https://superinterface.ai/) or [LibreChat](https://www.librechat.ai/) support SSE with custom headers.
|
|
117
143
|
([Claude Desktop](https://claude.ai/download) does not support SSE transport yet, see [Claude Desktop Configuration](#claude-desktop) section for more details).
|
|
118
144
|
|
|
119
145
|
In the client settings you need to provide server configuration:
|
|
@@ -273,6 +299,7 @@ ANTHROPIC_API_KEY=your-anthropic-api-token
|
|
|
273
299
|
```
|
|
274
300
|
In the `examples` directory, you can find two clients that interact with the server via
|
|
275
301
|
standard input/output (stdio):
|
|
302
|
+
|
|
276
303
|
1. [`clientStdio.ts`](https://github.com/apify/actor-mcp-server/tree/main/src/examples/clientStdio.ts)
|
|
277
304
|
This client script starts the MCP server with two specified Actors.
|
|
278
305
|
It then calls the `apify/rag-web-browser` tool with a query and prints the result.
|
|
@@ -305,12 +332,12 @@ ANTHROPIC_API_KEY=your-anthropic-api-key
|
|
|
305
332
|
```
|
|
306
333
|
## Local client (SSE)
|
|
307
334
|
|
|
308
|
-
To test the server with the SSE transport, you can use python script `examples/
|
|
335
|
+
To test the server with the SSE transport, you can use python script `examples/clientSse.ts`:
|
|
309
336
|
Currently, the node.js client does not support to establish a connection to remote server witch custom headers.
|
|
310
337
|
You need to change URL to your local server URL in the script.
|
|
311
338
|
|
|
312
339
|
```bash
|
|
313
|
-
|
|
340
|
+
node dist/examples/clientSse.js
|
|
314
341
|
```
|
|
315
342
|
|
|
316
343
|
## Debugging
|
|
@@ -334,17 +361,15 @@ Upon launching, the Inspector will display a URL that you can access in your bro
|
|
|
334
361
|
|
|
335
362
|
## ⓘ Limitations and feedback
|
|
336
363
|
|
|
337
|
-
To limit the context size the properties in the `input schema` are pruned and description is truncated to
|
|
364
|
+
To limit the context size the properties in the `input schema` are pruned and description is truncated to 500 characters.
|
|
338
365
|
Enum fields and titles are truncated to max 50 options.
|
|
339
366
|
|
|
340
367
|
Memory for each Actor is limited to 4GB.
|
|
341
368
|
Free users have an 8GB limit, 128MB needs to be allocated for running `Actors-MCP-Server`.
|
|
342
369
|
|
|
343
|
-
If you need other features or have any feedback, please [submit an issue](https://console.apify.com/actors/
|
|
370
|
+
If you need other features or have any feedback, please [submit an issue](https://console.apify.com/actors/1lSvMAaRcadrM1Vgv/issues) in Apify Console to let us know.
|
|
344
371
|
|
|
345
372
|
# 🚀 Roadmap (January 2025)
|
|
346
373
|
|
|
347
|
-
- Document examples for [LibreChat](https://www.librechat.ai/).
|
|
348
|
-
- Provide tools to search for Actors and load them as needed.
|
|
349
374
|
- Add Apify's dataset and key-value store as resources.
|
|
350
375
|
- Add tools such as Actor logs and Actor runs for debugging.
|
package/dist/actors.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ActorDefinitionPruned, SchemaProperties, Tool } from './types.js';
|
|
2
|
+
export declare function actorNameToToolName(actorName: string): string;
|
|
3
|
+
export declare function toolNameToActorName(toolName: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Get actor input schema by actor name.
|
|
6
|
+
* First, fetch the actor details to get the default build tag and buildId.
|
|
7
|
+
* Then, fetch the build details and return actorName, description, and input schema.
|
|
8
|
+
* @param {string} actorFullName - The full name of the actor.
|
|
9
|
+
* @returns {Promise<ActorDefinitionWithDesc | null>} - The actor definition with description or null if not found.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getActorDefinition(actorFullName: string): Promise<ActorDefinitionPruned | null>;
|
|
12
|
+
/**
|
|
13
|
+
* Shortens the description and enum values of schema properties.
|
|
14
|
+
* @param properties
|
|
15
|
+
*/
|
|
16
|
+
export declare function shortenProperties(properties: {
|
|
17
|
+
[key: string]: SchemaProperties;
|
|
18
|
+
}): {
|
|
19
|
+
[key: string]: SchemaProperties;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Filters schema properties to include only the necessary fields.
|
|
23
|
+
* @param properties
|
|
24
|
+
*/
|
|
25
|
+
export declare function filterSchemaProperties(properties: {
|
|
26
|
+
[key: string]: SchemaProperties;
|
|
27
|
+
}): {
|
|
28
|
+
[key: string]: SchemaProperties;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Fetches actor input schemas by actor full names and creates MCP tools.
|
|
32
|
+
*
|
|
33
|
+
* This function retrieves the input schemas for the specified actors and compiles them into MCP tools.
|
|
34
|
+
* It uses the AJV library to validate the input schemas.
|
|
35
|
+
*
|
|
36
|
+
* Tool name can't contain /, so it is replaced with _
|
|
37
|
+
*
|
|
38
|
+
* @param {string[]} actors - An array of actor full names.
|
|
39
|
+
* @returns {Promise<Tool[]>} - A promise that resolves to an array of MCP tools.
|
|
40
|
+
*/
|
|
41
|
+
export declare function getActorsAsTools(actors: string[]): Promise<Tool[]>;
|
|
42
|
+
//# sourceMappingURL=actors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actors.d.ts","sourceRoot":"","sources":["../src/actors.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACR,qBAAqB,EAErB,gBAAgB,EAChB,IAAI,EACP,MAAM,YAAY,CAAC;AAEpB,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAoCrG;AAaD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAAC,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAAE,CAOrH;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAAE,CAO3H;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CA0BxE"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { Ajv } from 'ajv';
|
|
2
2
|
import { ApifyClient } from 'apify-client';
|
|
3
|
-
import {
|
|
3
|
+
import { ACTOR_ADDITIONAL_INSTRUCTIONS, defaults, MAX_DESCRIPTION_LENGTH } from './const.js';
|
|
4
4
|
import { log } from './logger.js';
|
|
5
|
+
export function actorNameToToolName(actorName) {
|
|
6
|
+
return actorName.replace('/', '--');
|
|
7
|
+
}
|
|
8
|
+
export function toolNameToActorName(toolName) {
|
|
9
|
+
return toolName.replace('--', '/');
|
|
10
|
+
}
|
|
5
11
|
/**
|
|
6
12
|
* Get actor input schema by actor name.
|
|
7
13
|
* First, fetch the actor details to get the default build tag and buildId.
|
|
@@ -9,11 +15,7 @@ import { log } from './logger.js';
|
|
|
9
15
|
* @param {string} actorFullName - The full name of the actor.
|
|
10
16
|
* @returns {Promise<ActorDefinitionWithDesc | null>} - The actor definition with description or null if not found.
|
|
11
17
|
*/
|
|
12
|
-
async function
|
|
13
|
-
if (!process.env.APIFY_TOKEN) {
|
|
14
|
-
log.error('APIFY_TOKEN is required but not set. Please set it as an environment variable');
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
18
|
+
export async function getActorDefinition(actorFullName) {
|
|
17
19
|
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
|
|
18
20
|
const actorClient = client.actor(actorFullName);
|
|
19
21
|
try {
|
|
@@ -37,9 +39,9 @@ async function fetchActorDefinition(actorFullName) {
|
|
|
37
39
|
if (buildDetails?.actorDefinition) {
|
|
38
40
|
const actorDefinitions = buildDetails?.actorDefinition;
|
|
39
41
|
actorDefinitions.description = actor.description || '';
|
|
40
|
-
actorDefinitions.
|
|
42
|
+
actorDefinitions.actorFullName = actorFullName;
|
|
41
43
|
actorDefinitions.defaultRunOptions = actor.defaultRunOptions;
|
|
42
|
-
return actorDefinitions;
|
|
44
|
+
return pruneActorDefinition(actorDefinitions);
|
|
43
45
|
}
|
|
44
46
|
return null;
|
|
45
47
|
}
|
|
@@ -48,21 +50,25 @@ async function fetchActorDefinition(actorFullName) {
|
|
|
48
50
|
return null;
|
|
49
51
|
}
|
|
50
52
|
}
|
|
53
|
+
function pruneActorDefinition(response) {
|
|
54
|
+
return {
|
|
55
|
+
actorFullName: response.actorFullName || '',
|
|
56
|
+
buildTag: response?.buildTag || '',
|
|
57
|
+
readme: response?.readme || '',
|
|
58
|
+
input: response?.input || null,
|
|
59
|
+
description: response.description,
|
|
60
|
+
defaultRunOptions: response.defaultRunOptions,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
51
63
|
/**
|
|
52
64
|
* Shortens the description and enum values of schema properties.
|
|
53
65
|
* @param properties
|
|
54
66
|
*/
|
|
55
|
-
function shortenProperties(properties) {
|
|
67
|
+
export function shortenProperties(properties) {
|
|
56
68
|
for (const property of Object.values(properties)) {
|
|
57
69
|
if (property.description.length > MAX_DESCRIPTION_LENGTH) {
|
|
58
70
|
property.description = `${property.description.slice(0, MAX_DESCRIPTION_LENGTH)}...`;
|
|
59
71
|
}
|
|
60
|
-
if (property.enum) {
|
|
61
|
-
property.enum = property.enum.slice(0, MAX_ENUM_LENGTH);
|
|
62
|
-
}
|
|
63
|
-
if (property.enumTitles) {
|
|
64
|
-
property.enumTitles = property.enumTitles.slice(0, MAX_ENUM_LENGTH);
|
|
65
|
-
}
|
|
66
72
|
}
|
|
67
73
|
return properties;
|
|
68
74
|
}
|
|
@@ -70,11 +76,11 @@ function shortenProperties(properties) {
|
|
|
70
76
|
* Filters schema properties to include only the necessary fields.
|
|
71
77
|
* @param properties
|
|
72
78
|
*/
|
|
73
|
-
function filterSchemaProperties(properties) {
|
|
79
|
+
export function filterSchemaProperties(properties) {
|
|
74
80
|
const filteredProperties = {};
|
|
75
81
|
for (const [key, property] of Object.entries(properties)) {
|
|
76
|
-
const { title, description, enum: enumValues,
|
|
77
|
-
filteredProperties[key] = { title, description, enum: enumValues,
|
|
82
|
+
const { title, description, enum: enumValues, type, default: defaultValue, prefill } = property;
|
|
83
|
+
filteredProperties[key] = { title, description, enum: enumValues, type, default: defaultValue, prefill };
|
|
78
84
|
}
|
|
79
85
|
return filteredProperties;
|
|
80
86
|
}
|
|
@@ -90,9 +96,8 @@ function filterSchemaProperties(properties) {
|
|
|
90
96
|
* @returns {Promise<Tool[]>} - A promise that resolves to an array of MCP tools.
|
|
91
97
|
*/
|
|
92
98
|
export async function getActorsAsTools(actors) {
|
|
93
|
-
// Fetch input schemas in parallel
|
|
94
99
|
const ajv = new Ajv({ coerceTypes: 'array', strict: false });
|
|
95
|
-
const results = await Promise.all(actors.map(
|
|
100
|
+
const results = await Promise.all(actors.map(getActorDefinition));
|
|
96
101
|
const tools = [];
|
|
97
102
|
for (const result of results) {
|
|
98
103
|
if (result) {
|
|
@@ -101,21 +106,21 @@ export async function getActorsAsTools(actors) {
|
|
|
101
106
|
result.input.properties = shortenProperties(properties);
|
|
102
107
|
}
|
|
103
108
|
try {
|
|
104
|
-
const memoryMbytes = result.defaultRunOptions?.memoryMbytes ||
|
|
109
|
+
const memoryMbytes = result.defaultRunOptions?.memoryMbytes || defaults.maxMemoryMbytes;
|
|
105
110
|
tools.push({
|
|
106
|
-
name: result.
|
|
107
|
-
|
|
108
|
-
description: result.description
|
|
111
|
+
name: actorNameToToolName(result.actorFullName),
|
|
112
|
+
actorFullName: result.actorFullName,
|
|
113
|
+
description: `${result.description} Instructions: ${ACTOR_ADDITIONAL_INSTRUCTIONS}`,
|
|
109
114
|
inputSchema: result.input || {},
|
|
110
115
|
ajvValidate: ajv.compile(result.input || {}),
|
|
111
|
-
memoryMbytes: memoryMbytes >
|
|
116
|
+
memoryMbytes: memoryMbytes > defaults.maxMemoryMbytes ? defaults.maxMemoryMbytes : memoryMbytes,
|
|
112
117
|
});
|
|
113
118
|
}
|
|
114
119
|
catch (validationError) {
|
|
115
|
-
log.error(`Failed to compile AJV schema for actor: ${result.
|
|
120
|
+
log.error(`Failed to compile AJV schema for actor: ${result.actorFullName}. Error: ${validationError}`);
|
|
116
121
|
}
|
|
117
122
|
}
|
|
118
123
|
}
|
|
119
124
|
return tools;
|
|
120
125
|
}
|
|
121
|
-
//# sourceMappingURL=
|
|
126
|
+
//# sourceMappingURL=actors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actors.js","sourceRoot":"","sources":["../src/actors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,6BAA6B,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAC7F,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAQlC,MAAM,UAAU,mBAAmB,CAAC,SAAiB;IACjD,OAAO,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,QAAgB;IAChD,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,aAAqB;IAC1D,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;IACnE,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAEhD,IAAI,CAAC;QACD,sBAAsB;QACtB,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,GAAG,EAAE,CAAC;QACtC,IAAI,CAAC,KAAK,EAAE,CAAC;YACT,GAAG,CAAC,KAAK,CAAC,2CAA2C,aAAa,oBAAoB,CAAC,CAAC;Y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
|
package/dist/const.d.ts
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
export declare const SERVER_NAME = "apify-mcp-server";
|
|
2
2
|
export declare const SERVER_VERSION = "0.1.0";
|
|
3
3
|
export declare const HEADER_READINESS_PROBE = "x-apify-container-server-readiness-probe";
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const MAX_DESCRIPTION_LENGTH = 200;
|
|
6
|
-
export declare const MAX_MEMORY_MBYTES = 4096;
|
|
4
|
+
export declare const MAX_DESCRIPTION_LENGTH = 500;
|
|
7
5
|
export declare const USER_AGENT_ORIGIN = "Origin/mcp-server";
|
|
8
6
|
export declare const defaults: {
|
|
9
7
|
actors: string[];
|
|
8
|
+
enableActorAutoLoading: boolean;
|
|
9
|
+
maxMemoryMbytes: number;
|
|
10
10
|
};
|
|
11
|
-
export declare const ACTOR_OUTPUT_MAX_CHARS_PER_ITEM =
|
|
11
|
+
export declare const ACTOR_OUTPUT_MAX_CHARS_PER_ITEM = 5000;
|
|
12
12
|
export declare const ACTOR_OUTPUT_TRUNCATED_MESSAGE: string;
|
|
13
|
+
export declare const ACTOR_ADDITIONAL_INSTRUCTIONS: string;
|
|
14
|
+
export declare enum InternalTools {
|
|
15
|
+
DISCOVER_ACTORS = "discover-actors",
|
|
16
|
+
ADD_ACTOR_TO_TOOLS = "add-actor-to-tools",
|
|
17
|
+
REMOVE_ACTOR_FROM_TOOLS = "remove-actor-from-tools",
|
|
18
|
+
GET_ACTOR_DETAILS = "get-actor-details"
|
|
19
|
+
}
|
|
13
20
|
export declare enum Routes {
|
|
14
21
|
ROOT = "/",
|
|
15
22
|
SSE = "/sse",
|
package/dist/const.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../src/const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,qBAAqB,CAAC;AAC9C,eAAO,MAAM,cAAc,UAAU,CAAC;AAEtC,eAAO,MAAM,sBAAsB,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../src/const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,qBAAqB,CAAC;AAC9C,eAAO,MAAM,cAAc,UAAU,CAAC;AAEtC,eAAO,MAAM,sBAAsB,6CAA6C,CAAC;AACjF,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAErD,eAAO,MAAM,QAAQ;;;;CAQpB,CAAC;AAEF,eAAO,MAAM,+BAA+B,OAAQ,CAAC;AACrD,eAAO,MAAM,8BAA8B,QACQ,CAAC;AACpD,eAAO,MAAM,6BAA6B,QACuB,CAAC;AAElE,oBAAY,aAAa;IACrB,eAAe,oBAAoB;IACnC,kBAAkB,uBAAuB;IACzC,uBAAuB,4BAA4B;IACnD,iBAAiB,sBAAsB;CAC1C;AAED,oBAAY,MAAM;IACd,IAAI,MAAM;IACV,GAAG,SAAS;IACZ,OAAO,aAAa;CACvB"}
|
package/dist/const.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
export const SERVER_NAME = 'apify-mcp-server';
|
|
2
2
|
export const SERVER_VERSION = '0.1.0';
|
|
3
3
|
export const HEADER_READINESS_PROBE = 'x-apify-container-server-readiness-probe';
|
|
4
|
-
export const
|
|
5
|
-
export const MAX_DESCRIPTION_LENGTH = 200;
|
|
6
|
-
// Limit memory to 4GB for Actors. Free users have 8 GB limit, but we need to reserve some memory for Actors-MCP-Server too
|
|
7
|
-
export const MAX_MEMORY_MBYTES = 4096;
|
|
4
|
+
export const MAX_DESCRIPTION_LENGTH = 500;
|
|
8
5
|
export const USER_AGENT_ORIGIN = 'Origin/mcp-server';
|
|
9
6
|
export const defaults = {
|
|
10
7
|
actors: [
|
|
@@ -12,10 +9,21 @@ export const defaults = {
|
|
|
12
9
|
'apify/rag-web-browser',
|
|
13
10
|
'lukaskrivka/google-maps-with-contact-details',
|
|
14
11
|
],
|
|
12
|
+
enableActorAutoLoading: false,
|
|
13
|
+
maxMemoryMbytes: 4096,
|
|
15
14
|
};
|
|
16
|
-
export const ACTOR_OUTPUT_MAX_CHARS_PER_ITEM =
|
|
15
|
+
export const ACTOR_OUTPUT_MAX_CHARS_PER_ITEM = 5_000;
|
|
17
16
|
export const ACTOR_OUTPUT_TRUNCATED_MESSAGE = `Output was truncated because it will not fit into context.`
|
|
18
|
-
+ `
|
|
17
|
+
+ `There is no reason to call this tool again!`;
|
|
18
|
+
export const ACTOR_ADDITIONAL_INSTRUCTIONS = 'Never call/execute tool/Actor unless confirmed by the user. '
|
|
19
|
+
+ 'Always limit the number of results in the call arguments.';
|
|
20
|
+
export var InternalTools;
|
|
21
|
+
(function (InternalTools) {
|
|
22
|
+
InternalTools["DISCOVER_ACTORS"] = "discover-actors";
|
|
23
|
+
InternalTools["ADD_ACTOR_TO_TOOLS"] = "add-actor-to-tools";
|
|
24
|
+
InternalTools["REMOVE_ACTOR_FROM_TOOLS"] = "remove-actor-from-tools";
|
|
25
|
+
InternalTools["GET_ACTOR_DETAILS"] = "get-actor-details";
|
|
26
|
+
})(InternalTools || (InternalTools = {}));
|
|
19
27
|
export var Routes;
|
|
20
28
|
(function (Routes) {
|
|
21
29
|
Routes["ROOT"] = "/";
|
package/dist/const.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.js","sourceRoot":"","sources":["../src/const.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC;AAC9C,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"const.js","sourceRoot":"","sources":["../src/const.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC;AAC9C,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,0CAA0C,CAAC;AACjF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAC1C,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAErD,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,MAAM,EAAE;QACJ,yBAAyB;QACzB,uBAAuB;QACvB,8CAA8C;KACjD;IACD,sBAAsB,EAAE,KAAK;IAC7B,eAAe,EAAE,IAAI;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG,KAAK,CAAC;AACrD,MAAM,CAAC,MAAM,8BAA8B,GAAG,4DAA4D;MACpG,6CAA6C,CAAC;AACpD,MAAM,CAAC,MAAM,6BAA6B,GAAG,8DAA8D;MACrG,2DAA2D,CAAC;AAElE,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACrB,oDAAmC,CAAA;IACnC,0DAAyC,CAAA;IACzC,oEAAmD,CAAA;IACnD,wDAAuC,CAAA;AAC3C,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED,MAAM,CAAN,IAAY,MAIX;AAJD,WAAY,MAAM;IACd,oBAAU,CAAA;IACV,sBAAY,CAAA;IACZ,8BAAoB,CAAA;AACxB,CAAC,EAJW,MAAM,KAAN,MAAM,QAIjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientSse.d.ts","sourceRoot":"","sources":["../../src/examples/clientSse.ts"],"names":[],"mappings":"AACA
|
|
1
|
+
{"version":3,"file":"clientSse.d.ts","sourceRoot":"","sources":["../../src/examples/clientSse.ts"],"names":[],"mappings":"AACA;;;;;GAKG"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Connect to the MCP server using SSE transport and call a tool.
|
|
4
4
|
* The Actors MCP Server will load default Actors.
|
|
5
5
|
*
|
|
6
|
+
* It requires the `APIFY_TOKEN` in the `.env` file.
|
|
6
7
|
*/
|
|
7
8
|
import path from 'path';
|
|
8
9
|
import { fileURLToPath } from 'url';
|
|
@@ -12,7 +13,6 @@ import { CallToolResultSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
|
12
13
|
import dotenv from 'dotenv';
|
|
13
14
|
import { EventSource } from 'eventsource';
|
|
14
15
|
const REQUEST_TIMEOUT = 120_000; // 2 minutes
|
|
15
|
-
// Resolve dirname equivalent in ES module
|
|
16
16
|
const filename = fileURLToPath(import.meta.url);
|
|
17
17
|
const dirname = path.dirname(filename);
|
|
18
18
|
dotenv.config({ path: path.resolve(dirname, '../../.env') });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientSse.js","sourceRoot":"","sources":["../../src/examples/clientSse.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B
|
|
1
|
+
{"version":3,"file":"clientSse.js","sourceRoot":"","sources":["../../src/examples/clientSse.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,eAAe,GAAG,OAAO,CAAC,CAAC,YAAY;AAC7C,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEvC,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE,CAA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C;aAAM,CAAC;YACJ,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;QACvD,CAAC;IACL,CAAC;AACL,CAAC;AAED,MAAM,IAAI,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,10 @@ import { ApifyMcpServer } from './server.js';
|
|
|
18
18
|
log.setLevel(log.LEVELS.ERROR);
|
|
19
19
|
const argv = minimist(process.argv.slice(2));
|
|
20
20
|
const argActors = argv.actors?.split(',').map((actor) => actor.trim()) || [];
|
|
21
|
+
if (!process.env.APIFY_TOKEN) {
|
|
22
|
+
log.error('APIFY_TOKEN is required but not set in the environment variables.');
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
21
25
|
async function main() {
|
|
22
26
|
const server = new ApifyMcpServer();
|
|
23
27
|
await (argActors.length !== 0
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAE/B,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7C,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC;AAErF,KAAK,UAAU,IAAI;IACf,MAAM,MAAM,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AAC,GAAG,CAAC,WAAW,EAAE,CAAC;IAC3B,GAAG,CAAC,KAAK,CAAC,mEAAmE,CAAC,CAAC;IAC/E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AAED,KAAK,UAAU,IAAI;IACf,MAAM,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;IACpC,MAAM,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC;QACzB,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,SAAS,CAAC;QACtC,CAAC,CAAC,MAAM,CAAC,yBAAyB,EAAE,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC,CAAC,iCAAiC;AAC1F,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC,iCAAiC;IACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
package/dist/input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAWhF"}
|
package/dist/input.js
CHANGED
|
@@ -9,6 +9,9 @@ export async function processInput(originalInput) {
|
|
|
9
9
|
if (input.actors && typeof input.actors === 'string') {
|
|
10
10
|
input.actors = input.actors.split(',').map((format) => format.trim());
|
|
11
11
|
}
|
|
12
|
+
if (!input.enableActorAutoLoading) {
|
|
13
|
+
input.enableActorAutoLoading = false;
|
|
14
|
+
}
|
|
12
15
|
return input;
|
|
13
16
|
}
|
|
14
17
|
//# sourceMappingURL=input.js.map
|
package/dist/input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,aAA6B;IAC5D,MAAM,KAAK,GAAG,aAAsB,CAAC;IAErC,gDAAgD;IAChD,IAAI,KAAK,CAAC,MAAM,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QACnD,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAa,CAAC;IAC9F,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC"}
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,aAA6B;IAC5D,MAAM,KAAK,GAAG,aAAsB,CAAC;IAErC,gDAAgD;IAChD,IAAI,KAAK,CAAC,MAAM,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QACnD,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAa,CAAC;IAC9F,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE,CAAC;QAChC,KAAK,CAAC,sBAAsB,GAAG,KAAK,CAAC;IACzC,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC"}
|
package/dist/main.js
CHANGED
|
@@ -2,14 +2,19 @@ import { parse } from 'querystring';
|
|
|
2
2
|
import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js';
|
|
3
3
|
import { Actor } from 'apify';
|
|
4
4
|
import express from 'express';
|
|
5
|
-
import { HEADER_READINESS_PROBE,
|
|
5
|
+
import { HEADER_READINESS_PROBE, Routes } from './const.js';
|
|
6
6
|
import { processInput } from './input.js';
|
|
7
7
|
import { log } from './logger.js';
|
|
8
8
|
import { ApifyMcpServer } from './server.js';
|
|
9
|
+
import { getActorDiscoveryTools, getActorAutoLoadingTools } from './tools.js';
|
|
9
10
|
await Actor.init();
|
|
10
11
|
const STANDBY_MODE = Actor.getEnv().metaOrigin === 'STANDBY';
|
|
11
12
|
const HOST = Actor.isAtHome() ? process.env.ACTOR_STANDBY_URL : 'http://localhost';
|
|
12
13
|
const PORT = Actor.isAtHome() ? process.env.ACTOR_STANDBY_PORT : 3001;
|
|
14
|
+
if (!process.env.APIFY_TOKEN) {
|
|
15
|
+
log.error('APIFY_TOKEN is required but not set in the environment variables.');
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
13
18
|
const app = express();
|
|
14
19
|
const mcpServer = new ApifyMcpServer();
|
|
15
20
|
let transport;
|
|
@@ -94,6 +99,10 @@ log.info(`Loaded input: ${JSON.stringify(input)} `);
|
|
|
94
99
|
if (STANDBY_MODE) {
|
|
95
100
|
log.info('Actor is running in the STANDBY mode.');
|
|
96
101
|
await mcpServer.addToolsFromDefaultActors();
|
|
102
|
+
mcpServer.updateTools(getActorDiscoveryTools());
|
|
103
|
+
if (input.enableActorAutoLoading) {
|
|
104
|
+
mcpServer.updateTools(getActorAutoLoadingTools());
|
|
105
|
+
}
|
|
97
106
|
app.listen(PORT, () => {
|
|
98
107
|
log.info(`The Actor web server is listening for user requests at ${HOST}`);
|
|
99
108
|
});
|
|
@@ -103,7 +112,7 @@ else {
|
|
|
103
112
|
if (input && !input.debugActor && !input.debugActorInput) {
|
|
104
113
|
await Actor.fail('If you need to debug a specific actor, please provide the debugActor and debugActorInput fields in the input');
|
|
105
114
|
}
|
|
106
|
-
const options = { memory:
|
|
115
|
+
const options = { memory: input.maxActorMemoryBytes };
|
|
107
116
|
await mcpServer.callActorGetDataset(input.debugActor, input.debugActorInput, options);
|
|
108
117
|
await Actor.exit();
|
|
109
118
|
}
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAG9B,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,sBAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAG9B,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACl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CAAC,CAAC,CAAC;AACP,CAAC;KAAM,CAAC;IACJ,GAAG,CAAC,IAAI,CAAC,8FAA8F,CAAC,CAAC;IAEzG,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC;QACvD,MAAM,KAAK,CAAC,IAAI,CAAC,8GAA8G,CAAC,CAAC;IACrI,CAAC;IACD,MAAM,OAAO,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,mBAAmB,EAAsB,CAAC;IAC1E,MAAM,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,UAAW,EAAE,KAAK,CAAC,eAAgB,EAAE,OAAO,CAAC,CAAC;IACxF,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
|
|
3
3
|
import type { ActorCallOptions } from 'apify-client';
|
|
4
|
-
import type { Tool } from './types';
|
|
4
|
+
import type { Tool } from './types.js';
|
|
5
5
|
/**
|
|
6
6
|
* Create Apify MCP server
|
|
7
7
|
*/
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAI/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAI/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AA6BrD,OAAO,KAAK,EAAoB,IAAI,EAAE,MAAM,YAAY,CAAC;AAEzD;;GAEG;AACH,qBAAa,cAAc;IACvB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,KAAK,CAAoB;;IAmBjC;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAOpB;;;;;;;;;;;OAWG;IACU,mBAAmB,CAC5B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,OAAO,EACd,WAAW,GAAE,gBAAgB,GAAG,SAAqB,GACtD,OAAO,CAAC,MAAM,EAAE,CAAC;IAwBP,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE;IAKnC,yBAAyB;IAI/B,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI;IAOhC,YAAY,IAAI,MAAM,EAAE;IAI/B,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,iBAAiB;IA0EnB,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrD"}
|