Codex Graphif lets Codex work with Graphif in two ways:
- File mode: inspect, create, and modify Graphif
.prgfiles. - Live mode: control the currently open Graphif canvas through a Graphif extension and a localhost bridge.
Live mode is the realtime path. MCP alone cannot control an open Graphif canvas; the graphif-live-plugin extension must be installed inside Graphif so it can call Graphif's canvas APIs.
- Node.js 24+
- TypeScript
- npm workspaces
- MCP SDK
- Graphif
extprg - Graphif
extprg-types @zip.js/zip.js@msgpack/msgpackws- Vitest
Install dependencies:
npm installRun tests:
npm testBuild all packages:
npm run buildStart the MCP server and live bridge:
npm startWindows can also run:
start.bat
The MCP server uses stdio for Codex and opens a localhost WebSocket bridge at 127.0.0.1:17321 for the Graphif plugin.
After building, the MCP server entrypoint is:
graphif-mcp/dist/server.js
Example client config:
{
"mcpServers": {
"graphif": {
"command": "node",
"args": [
"C:/Users/Administrator/Documents/Codex/2026-07-15/woy/graphif-mcp/dist/server.js"
]
}
}
}Build the plugin:
npm run build --workspace graphif-live-pluginInstall it into Graphif:
npm run install:ext --workspace graphif-live-pluginThen start the MCP server and open Graphif. The plugin connects to ws://127.0.0.1:17321 and shows a toast when connected.
inspect_prg: read.prgnodes, edges, and version metadataexport_json: export a JSON-safe graph representationcreate_prg: create a.prgfrom nodes and edgesupdate_text_node: update a text node and write.generated.prgby defaultadd_text_node: add a text node to a.prgadd_line_edge: add a line edge to a.prg
live_status: check whether Graphif is connectedlive_list_nodes: read text nodes from the active Graphif canvaslive_list_edges: read line edges from the active Graphif canvaslive_add_text_node: add a text node livelive_move_node: move a text node livelive_rename_node: rename a text node livelive_add_edge: connect two text nodes livelive_create_beidou: draw a Beidou constellation graph live
.
├── docs/
│ └── superpowers/
│ ├── plans/
│ └── specs/
├── graphif-live-plugin/
│ ├── src/
│ ├── icon.svg
│ └── package.json
├── graphif-mcp/
│ ├── src/
│ │ ├── aiAdapter/
│ │ ├── liveBridge/
│ │ ├── prg/
│ │ ├── tools/
│ │ ├── errors.ts
│ │ ├── index.ts
│ │ └── server.ts
│ └── tests/
├── package.json
└── start.bat
- Run
npm install. - Run
npm run build. - Install the Graphif plugin with
npm run install:ext --workspace graphif-live-plugin. - Configure Codex to run
node graphif-mcp/dist/server.js. - Start Codex/MCP, open Graphif, then call
live_status.
The Graphif AI configuration UI is not used. Live control is done through the Graphif extension APIs.