Give Codex a design system it can build from
Configure StyleMoth MCP, retrieve a system, or work from downloaded files in your Codex project.
A prompt can describe the mood of a page. It is less useful for remembering every surface color, type role, and spacing choice. Use StyleMoth to give Codex a concrete design foundation, then let it inspect your project and implement the parts that foundation needs.
Give Codex the project and the task
Open the repository you want to change. Tell Codex whether this is a new page or a restyle, which content is ready, and which behavior must stay intact. Ask it to inspect the existing framework and styles before adding another styling approach.
Choose the context route. With MCP, Codex can research and retrieve available systems. With downloads, it can read the files already in the project. MCP needs StyleMoth Pro and an active key. Your Codex access is separate from your StyleMoth plan.
Add the remote MCP configuration
Add this table to ~/.codex/config.toml. Set STYLEMOTH_API_KEY in the environment of the Codex process. The value in bearer_token_env_var is the variable name, not the key itself. Do not paste your key into this example.
Codex documents Streamable HTTP configuration and environment-based bearer authentication. Check the MCP tools in the Codex surface you use after reconnecting. A desktop process may not inherit a variable set in an unrelated terminal.
[mcp_servers.stylemoth]
url = "https://stylemoth.com/api/mcp"
bearer_token_env_var = "STYLEMOTH_API_KEY"
Confirm the connection with a real result
Ask Codex to find one system by name. It should call a StyleMoth tool and return the actual library result. If the tools are absent, fix the connection before asking for a design comparison.
Next, give it a research task with content constraints. A comparison should explain how the reference handles information you need to show. A dark background or a familiar company name is not enough reason to choose a system.
Use the configured StyleMoth MCP connection. Find three references for a reporting tool with a centered dashboard preview, compact feature sections, and clear pricing. Search page breakdowns as well as systems. Recommend one direction based on our content. Show which results you inspected. Do not code yet.
Retrieve the foundation before the first edit
After choosing, ask for get_design_system and read DESIGN.md first. Have Codex inspect tokens.json, reference.css or reference.tailwind.css, and the available build prompts. It can call get_design_file when it needs to revisit a specific export.
Have it compare those files with the repository’s current styling. The goal is a deliberate mapping between the system and your components, not a second set of global styles competing with the first.
If a heading style, font, or surface needs adapting for your content, ask Codex to explain the change. Save intentional differences so another session does not repeatedly try to undo them.
Work from a fixed download
Extract the bundle into design/reference/ or another clear folder in the repository. Tell Codex the path and ask it to read the guide and tokens. A downloaded system does not need a live MCP connection to be useful.
Keep the selected files together. README.md introduces them; DESIGN.md carries the implementation guidance. The two stylesheet exports are alternatives to inspect, not a reason to install a second framework. Ask Codex to choose the route that fits the project.
Use the StyleMoth system in design/reference/. Read its guide and exports, then inspect the current project. Restyle only the landing route first. Keep our navigation, authentication, form validation, data, and copy. Use the system’s semantic roles and responsive type. Explain how the styles will connect to our existing components.
Give Codex a finish line it can verify
Ask for one section with real content and a working primary action. Name the screen widths you want checked. If the environment includes a browser, ask for a rendered review rather than accepting a code-only description.
Ask Codex to run the repository’s relevant checks and report the commands and results. A successful build does not confirm that the page is readable or that an external payment flow was exercised. Keep those checks separate in the report.
Implement the agreed hero and one feature section. Start the local preview. Check the layout at a desktop width and a narrow phone width, inspect text wrapping and keyboard focus, and run the relevant project checks. Report any missing assets or checks you could not perform. Show the preview before publishing anything.
When Codex cannot see the context
For MCP, check the full endpoint, the active key, and the variable available to the actual process. For files, check that Codex is working in the folder you expect and that the bundle was copied into that environment.
Ask it to name the guide or tool result it used. If it cannot, pause the design changes and restore the missing context. Do not keep refining an implementation that started from an imagined version of the system.
For repeated tasks, leave a brief project note naming the selected system, the file location, and the behavior to preserve. Keep access keys out of that note.
Continue from the reviewed section
Once the first section works, ask Codex to reuse its rules on the rest of the page. Check repeated elements together: buttons, card padding, labels, and surfaces.
If the direction needs changing, make that decision explicitly. A fresh prompt should not silently turn the next section into a different website.
Use a design skill when it helps the task
If this coding environment supports skills, you can pair an installed design skill with the same StyleMoth context. Name the selected system, project files, and the task you want the skill to handle. Confirm that the agent can read the skill and call MCP before relying on the combination.
Use a skill for a concrete job, such as planning the page, building from an accepted design, checking interface quality, or polishing one section. Keep the chosen system and your product brief available throughout. If you are working only with attached files, ask the agent to read those files instead of claiming it has a live MCP connection.