Skip to main content
Glama

Model Context Protocol Server

by hyen43
index.js1.33 kB
export function isStream(stream, {checkOpen = true} = {}) { return stream !== null && typeof stream === 'object' && (stream.writable || stream.readable || !checkOpen || (stream.writable === undefined && stream.readable === undefined)) && typeof stream.pipe === 'function'; } export function isWritableStream(stream, {checkOpen = true} = {}) { return isStream(stream, {checkOpen}) && (stream.writable || !checkOpen) && typeof stream.write === 'function' && typeof stream.end === 'function' && typeof stream.writable === 'boolean' && typeof stream.writableObjectMode === 'boolean' && typeof stream.destroy === 'function' && typeof stream.destroyed === 'boolean'; } export function isReadableStream(stream, {checkOpen = true} = {}) { return isStream(stream, {checkOpen}) && (stream.readable || !checkOpen) && typeof stream.read === 'function' && typeof stream.readable === 'boolean' && typeof stream.readableObjectMode === 'boolean' && typeof stream.destroy === 'function' && typeof stream.destroyed === 'boolean'; } export function isDuplexStream(stream, options) { return isWritableStream(stream, options) && isReadableStream(stream, options); } export function isTransformStream(stream, options) { return isDuplexStream(stream, options) && typeof stream._transform === 'function'; }

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/hyen43/mcpServer'

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