We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/neondatabase-labs/mcp-server-neon'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
import crypto from 'crypto';
export const generateRandomString = (length: number): string => {
const charset =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
const array = new Uint8Array(length);
crypto.getRandomValues(array);
return Array.from(array, (byte) => charset[byte % charset.length]).join('');
};
export const verifyPKCE = (
codeChallenge: string,
codeChallengeMethod: string,
codeVerifier: string,
): boolean => {
if (!codeChallenge || !codeChallengeMethod || !codeVerifier) {
return false;
}
if (codeChallengeMethod === 'S256') {
const hash = crypto
.createHash('sha256')
.update(codeVerifier)
.digest('base64url');
return codeChallenge === hash;
}
if (codeChallengeMethod === 'plain') {
return codeChallenge === codeVerifier;
}
return false;
};