Skip to main content
Glama

Karakeep MCP server

by karakeep-app
customFetch.ts842 B
import serverConfig from "./config"; // Generic fetch function type that works across environments type FetchFunction = ( input: RequestInfo | URL | string, init?: RequestInit, ) => Promise<Response>; // Factory function to create a custom fetch with timeout for any fetch implementation export function createCustomFetch(fetchImpl: FetchFunction = globalThis.fetch) { return function customFetch( input: Parameters<typeof fetchImpl>[0], init?: Parameters<typeof fetchImpl>[1], ): ReturnType<typeof fetchImpl> { const timeout = serverConfig.inference.fetchTimeoutSec * 1000; // Convert to milliseconds return fetchImpl(input, { signal: AbortSignal.timeout(timeout), ...init, }); }; } // Default export for backward compatibility - uses global fetch export const customFetch = createCustomFetch();

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/karakeep-app/karakeep'

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