Skip to main content
Glama
auth.ts646 B
import { readFileSync } from "node:fs"; import { homedir } from "node:os"; import { join } from "node:path"; export const getRailwayAuthToken = (): string => { const homeDir = homedir(); const configPath = join(homeDir, ".railway", "config.json"); try { const configData = readFileSync(configPath, "utf-8"); const config = JSON.parse(configData); if (config.user?.token) { return config.user.token; } } catch { throw new Error( "Railway config file not found or invalid. Run 'railway login' to authenticate", ); } throw new Error( "No Railway authentication token found. Run 'railway login' to authenticate", ); };

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/railwayapp/railway-mcp-server'

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