npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-figma-remote-auth

v0.1.1

Published

Pi extension that authenticates and configures Figma Remote MCP for pi-mcp-adapter.

Readme

pi-figma-remote-auth

A Pi extension that handles OAuth authentication and MCP config for Figma's hosted Remote MCP server (https://mcp.figma.com/mcp), so that an existing pi-mcp-adapter install can expose Figma tools inside Pi.

What this does

In short, it does two things:

  1. Writes the MCP server config (mcpServers.figma) into Pi's MCP config file, pointing at Figma's remote endpoint with auth: "oauth".
  2. Runs the OAuth flow against Figma and saves the resulting tokens in pi-mcp-adapter's auth store, so the adapter can connect without re-prompting.

The OAuth step uses a workaround for Figma's MCP client allowlist: the dynamic client registration registers as client_name: "Codex" (which Figma allows), then the credentials are stored in the format pi-mcp-adapter expects. Same idea as mcp-auth-helper, but writing into the Pi adapter's storage instead of OpenCode's.

This is not the local Figma desktop MCP bridge — it only configures the remote endpoint.

Prerequisite

Install pi-mcp-adapter first:

pi install npm:pi-mcp-adapter

Restart Pi.

Install this package

From npm:

pi install npm:pi-figma-remote-auth

Or from a local checkout:

pi install /absolute/path/to/pi-figma-remote-auth

Or for one run, without installing:

pi -e npm:pi-figma-remote-auth

Usage

Inside Pi:

/figma-remote-auth setup
/figma-remote-auth login

During login, Pi prints the Figma authorization URL. Copy it from the notification and open it in your browser — the extension does not auto-open and Pi's TUI may not render the URL as clickable. After authorizing, restart Pi (or /mcp reconnect figma) so pi-mcp-adapter reloads MCP config.

Use Figma tools through the adapter proxy:

mcp({ search: "figma" });
mcp({ connect: "figma" });
mcp({ tool: "figma_TOOL_NAME", args: "{}" });

Commands

/figma-remote-auth help
/figma-remote-auth status [--server figma]
/figma-remote-auth setup  [--global|--project|--shared] [--server figma] [--url https://mcp.figma.com/mcp] [--direct-tools] [--keep-alive]
/figma-remote-auth login  [--server figma] [--url https://mcp.figma.com/mcp] [--client-name Codex] [--port <port>]
/figma-remote-auth logout [--server figma]

setup and login first check that pi-mcp-adapter exists. If missing, install it before continuing.

By default, login uses a random free localhost callback port so it does not collide with pi-mcp-adapter's own OAuth callback server. Use --port only when you need a fixed callback URL.

Config targets:

  • --global (default): writes ~/.pi/agent/mcp.json or $PI_CODING_AGENT_DIR/mcp.json
  • --project: writes .pi/mcp.json
  • --shared: writes .mcp.json

Token store (written by login, removed by logout):

  • $MCP_OAUTH_DIR/figma/tokens.json when $MCP_OAUTH_DIR is set
  • otherwise ~/.pi/agent/mcp-oauth/figma/tokens.json or $PI_CODING_AGENT_DIR/mcp-oauth/figma/tokens.json

Security

Tokens are written with file mode 0600. Pi packages execute code with local system access; review before installing.