Krafa
Dashboard
Dashboard
Getting Started
QuickstartHow it works
The Canvas
Canvas overviewPasting and node typesOrganizing a boardCommand menuKeyboard shortcuts
Design Taste
Taste memoriesExtractionConflictsCurating your profile
Using with Agents
Connecting an agentMCP server referenceClaude CodeCursorCodexKiroAntigravity
Imports
Imports overviewXPinterestDribbble
Reference
Plans and billingHTTP APISelf-hostingFAQ
KrafaAll systems operational
Using with Agents

Codex

Wire the Krafa taste server into Codex so it builds UI against your curated references.

Codex configures MCP servers in TOML and reads bearer tokens from environment variables rather than the config file itself.

Setup

Get your token

Press ⌘K → Connect AI Agent in the board you want Codex to use, then export the token under a name you'll reference from the config:

export KRAFA_TOKEN="krafa_YOUR_TOKEN"

Put the export in your shell profile. Codex reads the variable from the environment it launches in, so a token that only exists in one terminal produces a server that only connects in that terminal.

Add the server

~/.codex/config.toml
[mcp_servers.krafa-taste]
url = "https://app.krafa.ai/api/mcp"
bearer_token_env_var = "KRAFA_TOKEN"

Or from the CLI:

codex mcp add krafa-taste \
  --url https://app.krafa.ai/api/mcp \
  --bearer-token-env-var KRAFA_TOKEN

A project-scoped .codex/config.toml works the same way in a trusted project.

Warning

bearer_token_env_var takes the name of an environment variable, not the token. Codex reads the variable and builds the Authorization: Bearer … header itself. The plaintext bearer_token field is rejected outright for HTTP servers.

Keys are flat. Several guides in circulation show a nested transport = { type = "streamable_http", url = "..." } table. That shape only appears in codex mcp get --json output, and putting it in config.toml is a hard parse error.

If you need the header spelled out (say the value isn't a plain bearer token) use env_http_headers instead, which maps a header name to the environment variable holding its full value:

[mcp_servers.krafa-taste]
url = "https://app.krafa.ai/api/mcp"
env_http_headers = { Authorization = "KRAFA_AUTH_HEADER" }

Verify

codex mcp list

The entry shows its URL and the bearer token environment variable it's reading. codex mcp get krafa-taste prints the resolved config, and /mcp inside a session lists the three tools.

Note

On Codex builds from before December 2025, remote MCP servers required an experimental_use_rmcp_client = true flag placed above every [mcp_servers.*] table. That flag has been removed; the modern client is the default path. If you're pinned to an older version, add it back at the top of the file.

Make it automatic

Codex reads AGENTS.md from the project root:

AGENTS.md
## Design

Before writing or modifying any UI, call `get_taste_profile` from the
krafa-taste MCP server and follow it. Also call `get_exemplars` for
visual work. Do not fall back to default styling.

A worked session

Scaffold the onboarding flow. Follow my design taste profile.

Codex pulls the profile, sees your Voice & Tone memories alongside the visual ones, and writes copy that sounds like your product rather than generic placeholder text, which is the category most agents get wrong precisely because nobody thinks to specify it.

Troubleshooting

SymptomCause
Server fails to connectKRAFA_TOKEN isn't exported in the environment Codex launched from
bearer_token is not supported for streamable_httpUse bearer_token_env_var with a variable name
Unknown-field parse errorA transport table in config.toml. Flatten it to url
Empty profileThe board has no memories yet

On this page

SetupGet your tokenAdd the serverVerifyMake it automaticA worked sessionTroubleshooting