Leafage can expose a local MCP server so Codex works through the running desktop app. Leafage remains responsible for account checks, Cloud Project revisions, credit quotes, and generation state.
What the connection can do
Codex can list and create Projects, read an open canvas, import local images, create and connect nodes, update prompts and settings, select versions, open Project windows, and start or cancel supported generations.
The MCP tools do not give Codex permission to bypass account access, storage limits, model availability, or hosted credit charges.
Import local reference images
Leafage 0.2.9 adds leafage.import_project_asset_from_path. Give Codex the absolute path to a PNG, JPEG or WebP file on the Mac running Leafage and the destination Project. The tool uploads the image to Cloud Project storage and returns its asset reference, filename, media type and dimensions. It supports images up to 50 MB, 16,384 pixels per side and 40 megapixels.
Importing an asset does not create a canvas node or start a generation. Codex then creates an image node in import mode, with an initial selected version referencing the uploaded asset. The node is saved through Leafage’s existing Project operations and revisions.
If node creation needs a retry, Codex should reuse the returned asset reference. Calling the import tool again uploads another asset. For a mutation retry, use the same operation ID and identical operation content. If a retry follows an app restart or the result is uncertain, inspect the Project snapshot for the node before resubmitting.
Import /Users/me/Pictures/room-reference.jpg into my Leafage Project as a reference image node. Reuse the uploaded asset if node creation needs a retry. Do not start a generation.
Connect automatically
- Open Projects > Settings > MCP.
- Under MCP server, choose Start server if it is stopped.
- Under Codex setup, choose Set up Codex.
- Start a new Codex task.
Leafage runs one local MCP server that any compatible app on your Mac can use. The Codex setup adds that server to the Codex configuration. Running describes the Leafage server; Configured describes the saved Codex setup. Neither label claims that an MCP client is actively connected.
Example prompts
Use Leafage to create a Cloud Project called "Spring product concepts" and open it.
Inspect my open Leafage Project. Create one text node for the brief and three connected image nodes for visual directions. Use local Codex and ask before starting any paid hosted generation.
Find the selected image result and create two branches: one with warmer light and one with a tighter crop. Open the Project when you finish.
Connect another MCP app
Open Settings > MCP, start the server, then choose Connection details. Copy the server URL and full Authorization header into any local MCP client that supports HTTP servers and custom headers.
Turn off the server
Open Settings > MCP and choose Stop server. This stops the local MCP endpoint. It does not remove saved setup from Codex or another MCP client.
Security
The server binds to 127.0.0.1 and requires a bearer token. Do not share the URL or token. Update the Codex connection if you believe the token was exposed.