Skip to main content
Glama

mcp-appstore

by appreply-co
index.js1.11 kB
'use strict'; var toPosInt = require('es5-ext/number/to-pos-integer') , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty; module.exports = function (limit) { var size = 0, base = 1, queue = create(null), map = create(null), index = 0, del; limit = toPosInt(limit); return { hit: function (id) { var oldIndex = map[id], nuIndex = ++index; queue[nuIndex] = id; map[id] = nuIndex; if (!oldIndex) { ++size; if (size <= limit) return; id = queue[base]; del(id); return id; } delete queue[oldIndex]; if (base !== oldIndex) return; while (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip }, delete: del = function (id) { var oldIndex = map[id]; if (!oldIndex) return; delete queue[oldIndex]; delete map[id]; --size; if (base !== oldIndex) return; if (!size) { index = 0; base = 1; return; } while (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip }, clear: function () { size = 0; base = 1; queue = create(null); map = create(null); index = 0; } }; };

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/appreply-co/mcp-appstore'

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