opencode-figma-for-actually-codex
Local MCP bridge that exposes the ChatGPT Figma connector to OpenCode without launching Codex, using the existing authenticated session.
README
opencode-figma-for-actually-codex
Local MCP bridge that exposes the ChatGPT Figma connector to OpenCode without launching Codex.
This package is useful when OpenCode cannot complete Figma's remote MCP OAuth flow directly, but the same Figma connector is already authenticated in the ChatGPT/Codex account file.
How it works
- Reads the existing ChatGPT auth file from
~/.codex/auth.json. - Calls ChatGPT's connector MCP endpoint directly.
- Filters the upstream tool list to the Figma connector only.
- Exposes those tools over stdio as a local MCP server for OpenCode.
- Refreshes the ChatGPT access token from the same auth file when it is close to expiry.
It does not start Codex, call codex mcp-server, or require the Codex app to be
running.
OpenCode config
From GitHub:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"figma": {
"type": "local",
"command": [
"npx",
"-y",
"github:kargnas/opencode-figma-for-actually-codex"
],
"enabled": true,
"timeout": 60000
}
}
}
After publishing to npm, the command can be shortened to:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"figma": {
"type": "local",
"command": ["npx", "-y", "opencode-figma-for-actually-codex"],
"enabled": true,
"timeout": 60000
}
}
}
For local development:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"figma": {
"type": "local",
"command": [
"node",
"/path/to/opencode-figma-for-actually-codex/bin/chatgpt-figma-mcp.mjs"
],
"enabled": true,
"timeout": 60000
}
}
}
Prerequisites
The default auth source is ~/.codex/auth.json, and it must contain a ChatGPT
login with tokens.access_token. The Figma connector must already be connected
to that ChatGPT account.
Supported environment variables:
| Variable | Default |
|---|---|
CODEX_AUTH_FILE |
~/.codex/auth.json |
CHATGPT_CONNECTORS_MCP_URL |
https://chatgpt.com/backend-api/wham/apps |
CHATGPT_AUTH_TOKEN_URL |
https://auth.openai.com/oauth/token |
CODEX_CLIENT_ID |
Codex ChatGPT OAuth public client id |
CHATGPT_FIGMA_MCP_DEBUG |
unset |
Development
npm run check
npm run smoke
npm run pack:dry
npm run smoke connects to the live ChatGPT connector endpoint and verifies
that Figma tools can be listed.
Security
Do not commit ~/.codex/auth.json, exported account files, token caches, or
debug logs that contain credentials. This package reads the local auth file at
runtime and does not need secrets in opencode.jsonc.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.