Skip to main content
Glama
paths.ts492 B
import * as path from 'path'; import { fileURLToPath } from 'url'; /** * Get the package root directory. * This works for both ESM and when compiled to dist/. */ export function getPackageRoot(): string { // When this file is in dist/util/paths.js, we go up 2 levels to get to the package root const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); return path.resolve(__dirname, '../..'); } export const PACKAGE_ROOT = getPackageRoot();

Latest Blog Posts

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/harche/ProDisco'

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