Skip to main content
Glama

Unleash MCP (Feature Toggle)

environments.ts1.07 kB
/** * Environments resources for Unleash MCP Server */ import { ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js"; import { getAllEnvironments } from "../unleash/get-all-environments.js"; /** * Resource handler for listing all environments */ export async function handleEnvironmentsList(uri: URL) { try { const environments = await getAllEnvironments(); if (!environments) { return { contents: [{ uri: uri.href, text: JSON.stringify({ error: "Failed to fetch environments" }) }] }; } return { contents: [{ uri: uri.href, text: JSON.stringify(environments, null, 2) }] }; } catch (error: any) { return { contents: [{ uri: uri.href, text: JSON.stringify({ error: error.message }) }] }; } } /** * Environment resources for registration */ export const environmentResources = [ { name: "environments-list", template: "unleash://environments", handler: handleEnvironmentsList } ];

Latest Blog Posts

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/cuongtl1992/unleash-mcp'

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