Connect Codex
Connect Codex to Dreamstate MCP with config.toml and OAuth.
Connect Codex to Dreamstate so Codex can work with the selected Dreamstate workspace. Use OAuth first, so there is no key to copy.
Once connected, you can ask Codex to:
- Build a scored lead list in a workbook.
- Enrich workbook rows with work emails.
- Draft and launch a sequence.
- Schedule a LinkedIn post.
- Check AI visibility or read why a run failed.
Before you start
You need a Dreamstate workspace and Codex with remote MCP server support.
Step-by-step setup
- 1
Open Codex configuration
Open~/.codex/config.toml. For a trusted project, you can instead use.codex/config.toml. - 2
Add Dreamstate
Add the server block below. The server name isdreamstate. - 3
Sign in
Runcodex mcp login dreamstate. In the Codex TUI, use/mcpto inspect active MCP servers.
[mcp_servers.dreamstate]
url = "https://mcp.trydreamstate.com/mcp"Authenticate with Dreamstate
A browser window opens after codex mcp login dreamstate. Sign in with your Dreamstate account, choose the workspace, then return to Codex. Use a workspace machine key only for CI and clients without OAuth.
Test the connection
Run whoami and tell me which Dreamstate workspace you are connected to.
If it returns your workspace name, setup is complete.
What to do next
Read Quickstart, MCP reference, or Your first session.
When it goes wrong
- I do not see Dreamstate in MCP controls. Check the server block in
~/.codex/config.toml, then run/mcpin Codex to confirm thatdreamstateis listed. - The sign-in window opened but nothing happens. Run
codex mcp login dreamstateagain and finish sign-in in the browser opened by Codex. A redirect refused error means the flow must start from the local Codex client. - Codex cannot find Dreamstate tools. Use
/mcpto confirm thatdreamstateis active for the current session. - It connected to the wrong workspace. Run
whoami, then log in again and choose the intended workspace. A401 Missing Bearerresponse means login needs to be completed again.
Best practices
- Test the connection immediately with
whoami. - Use
/mcpto confirm Dreamstate is active before a new task. - Read tools do not need confirmation because MCP tools declare
readOnlyHint.