Skip to main content

Connect Tolstoy MCP to Codex CLI

Connect Studio MCP or Library MCP to Codex CLI.

Written by Nimrod Popper

Before you start

Choose which Tolstoy MCP connection you want to add. The client setup steps are the same for Studio MCP and Library MCP; the URL is the part that changes.

  • Studio MCP: generate and iterate on Studio images or videos.

  • Library MCP: browse, search, inspect, rename, or favorite Tolstoy library assets.

Studio MCP URL:  https://apilb.gotolstoy.com/mcp/v1/mcp
Library MCP URL: https://apilb.gotolstoy.com/mcp/v1/library/mcp

How to connect Codex CLI

  1. Add the Tolstoy server to ~/.codex/config.toml. Replace <MCP_URL> with the Studio or Library MCP URL.

[mcp_servers.tolstoy]
url = "<MCP_URL>"

  1. Trigger the OAuth flow.

codex mcp login tolstoy

  1. Sign in with your Tolstoy account in the browser tab that opens.

  2. Codex will see the Tolstoy tools after login.

After you connect

Return to Use the Tolstoy MCP for examples, prompt patterns, and troubleshooting.

Did this answer your question?