Skip to main content
Glama

Spotify Streamable MCP Server

by iceener
http-result.ts740 B
export type ErrorCode = 'unauthorized' | 'forbidden' | 'rate_limited' | 'bad_response'; export function mapStatusToCode(status: number): ErrorCode { if (status === 401) { return 'unauthorized'; } if (status === 403) { return 'forbidden'; } if (status === 429) { return 'rate_limited'; } return 'bad_response'; } export async function expectOkOr204( response: Response, context: string, ): Promise<void> { if (response.ok || response.status === 204) { return; } const text = await response.text().catch(() => ''); const code = mapStatusToCode(response.status); throw new Error( `${context}: ${response.status} ${response.statusText}${ text ? ` - ${text}` : '' } [${code}]`, ); }

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/iceener/spotify-streamable-mcp-server'

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