Skip to main content
Glama

actors-mcp-server

Official
by apify
MIT License
7,198
465
  • Apple
mcp.utils.test.ts2.11 kB
import { describe, expect, it } from 'vitest'; import { parseInputParamsFromUrl } from '../../src/mcp/utils.js'; describe('parseInputParamsFromUrl', () => { it('should parse Actors from URL query params (as tools)', () => { const url = 'https://mcp.apify.com?token=123&actors=apify/web-scraper'; const result = parseInputParamsFromUrl(url); expect(result.tools).toEqual(['apify/web-scraper']); expect(result.actors).toBeUndefined(); }); it('should parse multiple Actors from URL (as tools)', () => { const url = 'https://mcp.apify.com?actors=apify/instagram-scraper,lukaskrivka/google-maps'; const result = parseInputParamsFromUrl(url); expect(result.tools).toEqual(['apify/instagram-scraper', 'lukaskrivka/google-maps']); expect(result.actors).toBeUndefined(); }); it('should handle URL without query params', () => { const url = 'https://mcp.apify.com'; const result = parseInputParamsFromUrl(url); expect(result.actors).toBeUndefined(); }); it('should parse enableActorAutoLoading flag', () => { const url = 'https://mcp.apify.com?enableActorAutoLoading=true'; const result = parseInputParamsFromUrl(url); expect(result.enableAddingActors).toBe(true); }); it('should parse enableAddingActors flag', () => { const url = 'https://mcp.apify.com?enableAddingActors=true'; const result = parseInputParamsFromUrl(url); expect(result.enableAddingActors).toBe(true); }); it('should parse enableAddingActors flag', () => { const url = 'https://mcp.apify.com?enableAddingActors=false'; const result = parseInputParamsFromUrl(url); expect(result.enableAddingActors).toBe(false); }); it('should handle Actors as string parameter (as tools)', () => { const url = 'https://mcp.apify.com?actors=apify/rag-web-browser'; const result = parseInputParamsFromUrl(url); expect(result.tools).toEqual(['apify/rag-web-browser']); expect(result.actors).toBeUndefined(); }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/apify/actors-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server