# Connect an MCP client Connect to Interfold with Streamable HTTP and an account-scoped API key. ## Server ```text https://api.interfold.dev/mcp ``` ## Setup 1. Create an API key in the dashboard under **API Keys**. 2. Choose **Read-only** to explore or **Read/write** to change resources. 3. Add a Streamable HTTP MCP server using the URL above. 4. Configure the client to send `Authorization: Bearer `. 5. Reconnect, then ask the client to list Interfold sites. When a client asks for a bearer token, enter the raw key without the `Bearer ` prefix. When it asks for a bearer-token environment variable, enter the variable name rather than the value. ## Codex configuration ```toml [mcp_servers.interfold] url = "https://api.interfold.dev/mcp" bearer_token_env_var = "INTERFOLD_API_KEY" default_tools_approval_mode = "writes" tool_timeout_sec = 360 ``` The `INTERFOLD_API_KEY` value must exist in the environment of the Codex process. Keep the value out of config files, project files, and chat. On macOS, this prompts without putting the key in shell history: ```zsh read -rs "interfold_token?Paste your Interfold API key: " printf '\n' launchctl setenv INTERFOLD_API_KEY "$interfold_token" unset interfold_token ``` Fully quit and reopen the app after setting it. Repeat after logging out or restarting macOS. ## Hosted clients A hosted client cannot read local environment variables or local Codex config. Interfold currently uses API-key bearer authentication and does not provide OAuth discovery for hosted ChatGPT connections. Use a client that supports a private bearer token. ## Verify Ask the client to list tools, then call `list_sites`. A missing or invalid key returns an authentication error; a Read-only key can call read tools but not write tools.