Skip to content

Commit 87b2f2c

Browse files
authored
fix: dockerhub init unauth server start and tool list (#227)
* log token for debugging * try to delete dummy token * finalize * lint
1 parent 08c62be commit 87b2f2c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/apify-client.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ export function getApifyAPIBaseUrl(): string {
2424

2525
export class ApifyClient extends _ApifyClient {
2626
constructor(options: ApifyClientOptions) {
27+
/**
28+
* In order to publish to DockerHub, we need to run their build task to validate our MCP server.
29+
* This was failing since we were sending this dummy token to Apify in order to build the Actor tools.
30+
* So if we encounter this dummy value, we remove it to use Apify client as unauthenticated, which is sufficient
31+
* for server start and listing of tools.
32+
*/
33+
if (options.token?.toLowerCase() === 'your-apify-token') {
34+
// eslint-disable-next-line no-param-reassign
35+
delete options.token;
36+
}
37+
2738
super({
2839
...options,
2940
baseUrl: getApifyAPIBaseUrl(),

0 commit comments

Comments
 (0)