Skip to main content
Glama

dbt Semantic Layer MCP Server

utils.ts941 B
import type { TypedDocumentString } from '../graphql/graphql' export async function execute<TResult, TVariables>( query: TypedDocumentString<TResult, TVariables>, ...[variables]: TVariables extends Record<string, never> ? [] : [TVariables] ) { if (!process.env.SEMANTIC_LAYER_URL) { throw new Error('SEMANTIC_LAYER_URL must be set') } if (!process.env.SEMANTIC_LAYER_API_KEY) { throw new Error('SEMANTIC_LAYER_API_KEY must be set') } const response = await fetch(process.env.SEMANTIC_LAYER_URL, { method: 'POST', headers: { 'Content-Type': 'application/json', Accept: 'application/graphql-response+json', Authorization: `Bearer ${process.env.SEMANTIC_LAYER_API_KEY}`, }, body: JSON.stringify({ query, variables, }), }) if (!response.ok) { throw new Error('Network response was not ok') } const {data} = await response.json() return data as TResult }

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/TommyBez/dbt-semantic-layer-mcp-server'

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