Configuration
This page documents all configuration options available in the Framelink MCP for Figma. Configuration can be provided via CLI arguments or environment variables.
CLI Arguments
All CLI arguments can be passed when starting the server.
--figma-api-key
Your Figma API key (Personal Access Token). This is the recommended authentication method for most users.
npx figma-developer-mcp --figma-api-key=figd_xxxxxx --stdio
--figma-oauth-token
Figma OAuth Bearer token. Use this if you're authenticating via OAuth instead of a Personal Access Token.
npx figma-developer-mcp --figma-oauth-token=your-oauth-token --stdio
--env
Path to a custom .env file to load environment variables from. If not specified, the server looks for a .env file in the current working directory.
npx figma-developer-mcp --env=/path/to/custom/.env --stdio
--port
Port to run the HTTP server on. Only applies when running in HTTP/SSE mode (not stdio). Defaults to 3333.
npx figma-developer-mcp --figma-api-key=figd_xxxxxx --port=8080
--host
Host address to bind the HTTP server to. Only applies when running in HTTP/SSE mode (not stdio). Defaults to 127.0.0.1.
npx figma-developer-mcp --figma-api-key=figd_xxxxxx --host=0.0.0.0
--json
Output data from tools in JSON format instead of YAML. YAML is the default format as it uses fewer tokens.
npx figma-developer-mcp --figma-api-key=figd_xxxxxx --json --stdio
--skip-image-downloads
Disable the download_figma_images tool. When set, the server will not register the image download tool, which can be useful if you don't need image export functionality.
npx figma-developer-mcp --figma-api-key=figd_xxxxxx --skip-image-downloads --stdio
--help
Display the help menu with all available options.
npx figma-developer-mcp --help
--version
Display the current version of the MCP server.
npx figma-developer-mcp --version
Environment Variables
All configuration options can also be set via environment variables. These can be defined in a .env file or set directly in your shell environment.
| Variable | Description | Default |
|---|---|---|
FIGMA_API_KEY | Figma Personal Access Token | — |
FIGMA_OAUTH_TOKEN | Figma OAuth Bearer token | — |
FRAMELINK_PORT | HTTP server port | 3333 |
FRAMELINK_HOST | HTTP server host address | 127.0.0.1 |
OUTPUT_FORMAT | Output format (yaml or json) | yaml |
SKIP_IMAGE_DOWNLOADS | Disable image download tool (true or false) | false |
Note: PORT is also supported as an alias for FRAMELINK_PORT for backwards compatibility.
Example .env file
FIGMA_API_KEY=figd_xxxxxxxxxxxxxxxxxxxxxx
FRAMELINK_PORT=3333
FRAMELINK_HOST=127.0.0.1
OUTPUT_FORMAT=yaml
SKIP_IMAGE_DOWNLOADS=false
Authentication
The MCP server supports two authentication methods for the Figma API.
Personal Access Token (Recommended)
Personal Access Tokens are the simplest way to authenticate. Generate one from your Figma account settings under Settings > Security > Personal access tokens.
Required permissions:
- File content: Read access
- Dev resources: Read access
Use via CLI argument:
--figma-api-key=figd_xxxxxx
Or via environment variable:
FIGMA_API_KEY=figd_xxxxxx
OAuth Bearer Token
For applications using Figma's OAuth flow, you can provide an OAuth bearer token instead.
Use via CLI argument:
--figma-oauth-token=your-oauth-token
Or via environment variable:
FIGMA_OAUTH_TOKEN=your-oauth-token
When an OAuth token is provided, the server uses the Authorization: Bearer header instead of the X-Figma-Token header.
Configuration Precedence
When the same option is specified in multiple places, CLI arguments take precedence over environment variables.
- CLI arguments (highest priority)
- Environment variables (from
.envfile or shell) - Default values (lowest priority)
For example, if you have FRAMELINK_PORT=8080 in your .env file but run the server with --port=3000, the server will use port 3000.