Skip to main content
Glama

Activepieces MCP Server

by eldoonreval
platform-hooks.tsβ€’1.07 kB
import { QueryClient, useSuspenseQuery } from '@tanstack/react-query'; import { authenticationSession } from '@/lib/authentication-session'; import { PlatformWithoutSensitiveData } from '@activepieces/shared'; import { platformApi } from '../lib/platforms-api'; export const platformHooks = { isCopilotEnabled: () => { const { platform } = platformHooks.useCurrentPlatform(); return Object.keys(platform?.copilotSettings?.providers ?? {}).length > 0; }, useCurrentPlatform: () => { const currentPlatformId = authenticationSession.getPlatformId(); const query = useSuspenseQuery({ queryKey: ['platform', currentPlatformId], queryFn: platformApi.getCurrentPlatform, staleTime: Infinity, }); return { platform: query.data, refetch: async () => { await query.refetch(); }, setCurrentPlatform: ( queryClient: QueryClient, platform: PlatformWithoutSensitiveData, ) => { queryClient.setQueryData(['platform', currentPlatformId], platform); }, }; }, };

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/eldoonreval/activepieces'

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