Skip to main content
Glama
ylin6

Unleash Feature Flag MCP Server

by ylin6

getProjects

Retrieve a list of projects from the Unleash feature flag management system to enable operations like creating, updating, and managing feature flags across different project environments.

Instructions

Retrieve a list of projects

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that executes the tool logic: fetches list of projects from Unleash API using axios with bearer token auth.
    async function getProjects() { try { const response = await axios.get(`${UNLEASH_API_URL}/api/admin/projects`, { headers: { Authorization: `Bearer ${UNLEASH_AUTH_TOKEN}`, }, }); return response.data; } catch (error) { console.error('Error fetching projects:', error); throw error; } }
  • src/index.ts:26-29 (registration)
    MCP server tool registration for 'getProjects', with description and thin wrapper handler that calls the core getProjects function and returns JSON stringified response in MCP format.
    server.tool('getProjects', 'Retrieve a list of projects', async () => { const data = await getProjects(); return { content: [{ type: 'text', text: JSON.stringify(data) }] }; });
  • Export of the getProjects handler function for use in main server file.
    getProjects,

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/ylin6/unleash-ff-mcp-server'

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