pi-figma-mcp
v0.1.2
Published
Pi package that connects Pi to the Figma desktop MCP server and exposes Figma design tools inside Pi.
Maintainers
Readme
pi-figma-mcp
Connect Pi to the Figma desktop MCP server so Pi can read the designs you provide.
This package installs a Pi extension that:
- connects to the local Figma desktop MCP endpoint at
http://127.0.0.1:3845/mcp - discovers the Figma MCP tools automatically
- mirrors those tools into Pi as
figma_*tools - gives Pi a Figma-focused skill for working with selections, frames, layers, screenshots, and metadata
This package is intentionally focused on the desktop Figma MCP server only. No cloud/remote Figma MCP setup is required.
What you get
Once connected, Pi can use Figma tools such as:
figma_get_design_contextfigma_get_metadatafigma_get_screenshotfigma_get_variable_defs- plus any other tools exposed by your local Figma desktop MCP server
That means you can ask Pi things like:
- "Read my selected Figma frame and explain the layout."
- "Inspect this Figma link and summarize spacing, colors, and typography."
- "Use metadata first, then get design context only for the hero section."
- "Get a screenshot of the selected design before implementing it."
Requirements
Before installing this package, make sure you have:
- Pi installed
- the Figma desktop app installed
- a Figma seat that supports the desktop MCP server
- a Pi setup that can install packages or load local extensions
From Figma's docs:
- the desktop MCP server runs locally at
http://127.0.0.1:3845/mcp - selection-based prompting works with the desktop server
- you must enable the desktop MCP server in the Figma desktop app
Installation
This package can be installed into Pi in two main ways:
- from your local repository while developing/testing
- from npm after the package is published
Install into Pi from a local repository
Use this during local development, testing, or before publishing.
Method A: install from the current folder
From the root of this repository:
pi install .Method B: install from an absolute path
From anywhere on your machine:
pi install /absolute/path/to/pi-figma-mcpMethod C: try it without permanently installing it
This is useful for a quick test run:
pi -e /absolute/path/to/pi-figma-mcpInstall into Pi from npm
After this package is published to npm, install it into Pi with:
pi install npm:pi-figma-mcpIf you want Pi to use a specific published version:
pi install npm:[email protected]Verify the package is installed in Pi
After either local or npm installation, you can verify it inside Pi by running:
/figma-mcp-statusYou can also inspect installed Pi packages with:
pi listCustom Figma MCP URL
By default, the package connects to:
http://127.0.0.1:3845/mcpIf your Figma MCP server uses a different URL, you can override it in three ways.
Option 1: set a project-local URL inside Pi
This stores the URL in:
<your-project>/.pi/figma-mcp.jsonCommand:
/figma-mcp-set-url http://127.0.0.1:9999/mcpYou can also be explicit:
/figma-mcp-set-url --project http://127.0.0.1:9999/mcpOption 2: set a global URL inside Pi
This stores the URL in:
~/.pi/agent/figma-mcp.jsonCommand:
/figma-mcp-set-url --global http://127.0.0.1:9999/mcpOption 3: override with an environment variable
Environment variable has the highest priority:
export FIGMA_MCP_URL=http://127.0.0.1:9999/mcpResetting a custom URL
Remove the project override:
/figma-mcp-reset-urlRemove the global override:
/figma-mcp-reset-url --globalURL priority order
The extension resolves the server URL in this order:
FIGMA_MCP_URLenvironment variable- project config:
.pi/figma-mcp.json - global config:
~/.pi/agent/figma-mcp.json - default:
http://127.0.0.1:3845/mcp
Step-by-step setup
Local development setup
- Clone this repository.
- From the repository root, install it into Pi:
pi install .- Open Pi in any project and run:
/figma-mcp-statusIf Pi was already running before installation, run:
/reloadPublished npm setup
After the package is published, install it into Pi with:
pi install npm:pi-figma-mcpThen open Pi and run:
/figma-mcp-statusIf Pi was already running before installation, run:
/reload1. Confirm the desktop MCP server is enabled in Figma
In the Figma desktop app:
- Update Figma to the latest desktop version.
- Open a file.
- Open the Inspect panel.
- Find the MCP server section.
- Click Enable desktop MCP server.
The local endpoint should be:
http://127.0.0.1:3845/mcp3. Start or reload Pi
Open Pi in your project.
If Pi was already running while you installed the package, reload Pi resources with:
/reload4. Confirm Pi can see Figma MCP
Inside Pi, run:
/figma-mcp-statusThis command now also shows:
- the active server URL
- where that URL came from (
env,project,global, ordefault)
If everything is working, you should see that Pi is connected and that Figma tools were discovered.
If Pi started before Figma MCP was enabled, run:
/figma-mcp-connectYou can also inspect the mirrored Pi tools with:
/figma-mcp-list-toolsFirst usage flow
Using the current selection in the Figma desktop app
- Open a frame or layer in Figma desktop.
- Select the frame/layer you want Pi to inspect.
- In Pi, ask:
Read my current Figma selection and explain the layout hierarchy.Using a Figma link
If you prefer, paste a Figma frame or layer URL into Pi:
Use Figma to inspect this design and summarize spacing, typography, and components: <your-figma-url>For large screens
Ask Pi to start with metadata first:
Use Figma metadata first, then inspect only the hero and pricing sections.Commands added by this package
/figma-mcp-status
Shows:
- server URL
- whether Pi is connected
- how many Figma tools were discovered
- the Pi tool name → MCP tool name mapping
/figma-mcp-connect
Reconnects Pi to the local Figma desktop MCP server.
Use this if:
- Figma was not open when Pi started
- you enabled the MCP server after Pi already launched
- the connection dropped
/figma-mcp-list-tools
Lists the Pi tools mirrored from the Figma MCP server.
/figma-mcp-set-url [--project|--global] <url>
Sets a custom Figma MCP URL.
Examples:
/figma-mcp-set-url http://127.0.0.1:9999/mcp
/figma-mcp-set-url --project http://127.0.0.1:9999/mcp
/figma-mcp-set-url --global http://127.0.0.1:9999/mcp/figma-mcp-reset-url [--global]
Removes a custom URL override.
Examples:
/figma-mcp-reset-url
/figma-mcp-reset-url --globalHow Pi sees the Figma tools
The extension mirrors Figma MCP tools into Pi with a figma_ prefix.
Examples:
- MCP
get_design_context→ Pifigma_get_design_context - MCP
get_metadata→ Pifigma_get_metadata - MCP
get_screenshot→ Pifigma_get_screenshot
This makes the tools visible to Pi's model like any other Pi tool.
Recommended prompts
Good prompts for Pi:
Read my selected Figma frame and summarize the structure.Inspect this Figma frame and list typography, spacing, and colors.Use Figma metadata first, then get design context only for the CTA area.Get a screenshot of the selected frame before implementing it.Inspect the selected Figma component and tell me what reusable parts should become React components.Configuration
By default, this package connects to:
http://127.0.0.1:3845/mcpYou can override the URL with:
FIGMA_MCP_URLenvironment variable- project config file:
.pi/figma-mcp.json - global config file:
~/.pi/agent/figma-mcp.json - Pi commands:
/figma-mcp-set-url/figma-mcp-reset-url
Example project config file:
{
"serverUrl": "http://127.0.0.1:9999/mcp"
}Example global config file:
{
"serverUrl": "http://127.0.0.1:9999/mcp"
}Troubleshooting
Pi says Figma MCP is offline
Check these in order:
- Figma desktop app is open
- desktop MCP server is enabled in Figma
- the endpoint is
http://127.0.0.1:3845/mcp - run
/figma-mcp-connectin Pi - if needed, restart Pi and Figma
Pi does not see any figma_* tools
Run:
/figma-mcp-connect
/figma-mcp-list-toolsIf the list is still empty, the local Figma MCP server is probably not available yet.
Selection-based prompts do not work
Selection-based access depends on the desktop Figma app and an active selection there.
Try:
- select the frame again in Figma desktop
- keep the file open
- rerun the Pi prompt
The design is too large
Ask Pi to use metadata first:
Use Figma metadata first, then inspect only the sections needed for implementation.Project structure
extensions/figma-mcp/index.ts # Pi extension that connects to Figma MCP
skills/figma-design-reader/ # Optional Pi skill for better Figma workflows
README.md # Setup and usage guideDevelopment
Install dependencies:
npm installRun typecheck:
npm run typecheckNotes
- this package targets the desktop Figma MCP server only
- it does not implement the remote/cloud Figma MCP flow
- it mirrors whatever tools your local Figma desktop MCP server exposes
References
- Figma help: Guide to the Figma MCP server
- Figma developer docs: Set up the desktop server
- Pi docs: extensions and packages
