module.exports = function (pkg) {
var m;
if (m = match(JSON.stringify(pkg.repository))) {
return m;
}
else if (m = match(JSON.stringify(pkg))) {
return m;
}
return undefined;
};
function match (str) {
var m = /\bgithub.com[:\/]([^\/"]+)\/([^\/"]+)/.exec(str);
if (m) {
return 'https://github.com/' + m[1] + '/' + m[2].replace(/\.git$/, '');
}
}
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/ajay800800/doc_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server