Skip to main content
Glama

Practera MCP Server

by intersective
graphql-client.ts1.18 kB
import { GraphQLClient } from 'graphql-request'; import { PracteraAuth } from '../auth.js'; // Region-specific API endpoints export const PRACTERA_ENDPOINTS: Record<string, string> = { usa: 'https://core-graphql-api.usa.practera.com/', aus: 'https://core-graphql-api.aus.practera.com/', euk: 'https://core-graphql-api.euk.practera.com/', // Stage endpoint for development stage: 'https://core-graphql-api.p2-stage.practera.com/' }; /** * Helper function to create GraphQL client with support for both API key and OAuth */ export function createGraphQLClient(authConfig: any, region: string) { const endpoint = PRACTERA_ENDPOINTS[region.toLowerCase()] || PRACTERA_ENDPOINTS.stage; // Create auth helper - handles both API key and OAuth token const auth = authConfig instanceof PracteraAuth ? authConfig : (typeof authConfig === 'string' ? new PracteraAuth({ apikey: authConfig, appkey: '', accessToken: '' }) : new PracteraAuth(authConfig)); // Cast headers to unknown first to avoid type issues with GraphQLClient return new GraphQLClient(endpoint, { headers: auth.getHeaders() as unknown as Record<string, string> }); }

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/intersective/practera-mcp-server'

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