We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yerininin/F_MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
import { z } from 'zod';
// Reusable sub-schemas
export const colorSchema = z.object({
r: z.number().min(0).max(1).describe('Red component (0-1)'),
g: z.number().min(0).max(1).describe('Green component (0-1)'),
b: z.number().min(0).max(1).describe('Blue component (0-1)')
});
// Command Registry - single source of truth
// 새 기능 추가 시 여기에만 추가하면 MCP 도구가 자동 등록됩니다.
export const commandRegistry = {
create_rect: {
description: 'Creates a rectangle in Figma at the specified position with optional fill color',
schema: z.object({
x: z.number().default(0).describe('X position'),
y: z.number().default(0).describe('Y position'),
width: z.number().min(1).default(100).describe('Width in pixels'),
height: z.number().min(1).default(100).describe('Height in pixels'),
color: colorSchema.optional().describe('Fill color (RGB 0-1)')
})
},
create_text: {
description: 'Creates a text element in Figma at the specified position',
schema: z.object({
x: z.number().default(0).describe('X position'),
y: z.number().default(0).describe('Y position'),
text: z.string().describe('Text content'),
fontSize: z.number().min(1).default(16).optional().describe('Font size in pixels'),
color: colorSchema.optional().describe('Text color (RGB 0-1)')
})
},
create_frame: {
description: 'Creates a frame (container) in Figma at the specified position',
schema: z.object({
x: z.number().default(0).describe('X position'),
y: z.number().default(0).describe('Y position'),
width: z.number().min(1).default(100).describe('Width in pixels'),
height: z.number().min(1).default(100).describe('Height in pixels'),
name: z.string().optional().describe('Frame name')
})
},
create_image: {
description: 'Creates an image from URL in Figma at the specified position',
schema: z.object({
x: z.number().default(0).describe('X position'),
y: z.number().default(0).describe('Y position'),
width: z.number().min(1).default(100).describe('Width in pixels'),
height: z.number().min(1).default(100).describe('Height in pixels'),
imageUrl: z.string().url().describe('Image URL to fetch and display'),
name: z.string().optional().describe('Frame name for the image'),
scaleMode: z.enum(['FILL', 'FIT', 'CROP', 'TILE']).default('FILL').optional().describe('How to scale the image')
})
},
set_fill: {
description: 'Changes the fill color of an existing Figma node',
schema: z.object({
nodeId: z.string().describe('Figma node ID'),
color: colorSchema.describe('New fill color (RGB 0-1)')
})
},
set_image_fill: {
description: 'Fetch an image from a URL and set it as the fill of an existing node (frame, rectangle, etc.) in Figma',
schema: z.object({
nodeId: z.string().describe('The ID of the node to apply the image fill to'),
imageUrl: z.string().url().describe('The URL of the image to fetch and apply'),
scaleMode: z.enum(['FILL', 'FIT', 'CROP', 'TILE']).default('FILL').optional().describe('How the image should be scaled within the node (default: FILL)')
})
},
move_node: {
description: 'Moves an existing Figma node to a new position',
schema: z.object({
nodeId: z.string().describe('Figma node ID'),
x: z.number().describe('New X position'),
y: z.number().describe('New Y position')
})
},
delete_node: {
description: 'Deletes a Figma node by its ID',
schema: z.object({
nodeId: z.string().describe('Figma node ID to delete')
})
}
} as const satisfies Record<string, { description: string; schema: z.ZodObject<any> }>;
// Auto-derived CommandType from registry keys
export type CommandType = keyof typeof commandRegistry;