import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { GetFileResponse, GetFileNodesResponse, GetLocalVariablesResponse } from '@figma/rest-api-spec'; import { Server } from 'http'; type FigmaAuthOptions = { figmaApiKey: string; figmaOAuthToken: string; useOAuth: boolean; }; declare class FigmaService { private readonly apiKey; private readonly oauthToken; private readonly useOAuth; private readonly baseUrl; constructor({ figmaApiKey, figmaOAuthToken, useOAuth }: FigmaAuthOptions); getToken(): string; private getAuthHeaders; private request; getImageFillUrls(fileKey: string): Promise>; getRawFile(fileKey: string, depth?: number | null): Promise; getRawNode(fileKey: string, nodeId: string, depth?: number | null): Promise; getLocalVariables(fileKey: string): Promise; } type CreateServerOptions = { isHTTP?: boolean; outputFormat?: "yaml" | "json"; skipImageDownloads?: boolean; }; declare function createServer(authOptions: FigmaAuthOptions, { isHTTP, outputFormat, skipImageDownloads }?: CreateServerOptions): McpServer; interface ServerConfig { auth: FigmaAuthOptions; port: number; host: string; outputFormat: "yaml" | "json"; skipImageDownloads?: boolean; configSources: { figmaApiKey: "cli" | "env"; figmaOAuthToken: "cli" | "env" | "none"; port: "cli" | "env" | "default"; host: "cli" | "env" | "default"; outputFormat: "cli" | "env" | "default"; envFile: "cli" | "default"; skipImageDownloads?: "cli" | "env" | "default"; }; } declare function getServerConfig(isStdioMode: boolean): ServerConfig; declare function startServer(): Promise; declare function startHttpServer(host: string, port: number, mcpServer: McpServer): Promise; declare function stopHttpServer(): Promise; export { FigmaService, createServer, getServerConfig, startHttpServer, startServer, stopHttpServer };