Skip to main content
Glama

Figma MCP Server

MIT License
106,929
10,969
  • Linux
  • Apple
component.ts1.38 kB
import type { Component, ComponentPropertyType, ComponentSet } from "@figma/rest-api-spec"; export interface ComponentProperties { name: string; value: string; type: ComponentPropertyType; } export interface SimplifiedComponentDefinition { id: string; key: string; name: string; componentSetId?: string; } export interface SimplifiedComponentSetDefinition { id: string; key: string; name: string; description?: string; } /** * Remove unnecessary component properties and convert to simplified format. */ export function simplifyComponents( aggregatedComponents: Record<string, Component>, ): Record<string, SimplifiedComponentDefinition> { return Object.fromEntries( Object.entries(aggregatedComponents).map(([id, comp]) => [ id, { id, key: comp.key, name: comp.name, componentSetId: comp.componentSetId, }, ]), ); } /** * Remove unnecessary component set properties and convert to simplified format. */ export function simplifyComponentSets( aggregatedComponentSets: Record<string, ComponentSet>, ): Record<string, SimplifiedComponentSetDefinition> { return Object.fromEntries( Object.entries(aggregatedComponentSets).map(([id, set]) => [ id, { id, key: set.key, name: set.name, description: set.description, }, ]), ); }

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/GLips/Figma-Context-MCP'

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