Connect Codex to Marka's MCP server
Add Marka's MCP server to Codex with codex mcp add or ~/.codex/config.toml. It connects over Streamable HTTP and reads your API key from an environment variable.
To connect an MCP server to Codex, run codex mcp add with Marka's server URL https://joinmarka.com/api/mcp and --bearer-token-env-var MARKA_API_KEY, then restart Codex. Codex reads your API key from that environment variable.
- Create an API key and set it as
MARKA_API_KEY(see Before you start). - Run the
codex mcp addcommand under Connect, or add the same entry to~/.codex/config.toml. - Restart Codex, then check that it worked.
Codex talks to Marka's hosted gateway over Streamable HTTP, so there is nothing to install.
How Codex connects to an MCP server
Codex keeps its MCP servers in ~/.codex/config.toml, one [mcp_servers.<name>] table per
server, and codex mcp add writes that table for you. It speaks two transports:
- Streamable HTTP, for a remote server:
codex mcp add <name> --url <url>. If the server wants a bearer token,--bearer-token-env-var <VAR>names the environment variable Codex reads it from, so the token itself never goes in the file. - stdio, for a local server that Codex starts itself:
codex mcp add <name> -- <command> [args].
Codex has no option for the older SSE transport. Marka's gateway is Streamable HTTP, so it uses the first form.
codex mcp list shows the servers in your config, and /mcp inside a Codex session lists the
tools they expose.
Connect
Run the command, or add the equivalent entry to ~/.codex/config.toml by hand. Both do the same
thing.
codex mcp add marka --url https://joinmarka.com/api/mcp --bearer-token-env-var MARKA_API_KEY# Equivalent entry in ~/.codex/config.toml
[mcp_servers.marka]
url = "https://joinmarka.com/api/mcp"
bearer_token_env_var = "MARKA_API_KEY"Codex stores only the variable's name. It reads MARKA_API_KEY each time it starts and sends the
value as a bearer token, so the key itself is never written to Codex's config.
Set the variable where Codex starts
If MARKA_API_KEY is only set in the current shell, a Codex started anywhere else will not see
it. Add it to your shell profile.
Restart Codex to load the Marka tools.
Check it worked
codex mcp list should now show marka. Then check the key. A good key prints your user and plan as JSON.
curl -sS https://joinmarka.com/api/v1/me -H "x-api-key: $MARKA_API_KEY"Then ask Codex to search Marka. An answer drawn from the live catalogue proves the MCP connection.
To change the key, change MARKA_API_KEY and restart Codex. Nothing in the config needs editing.
Sign in with your browser instead of an API key
Codex can also sign in to Marka through your browser, with no key. Add the server without a bearer token. Codex checks whether the server supports OAuth when you add it and starts the sign-in; if it does not start, or you need to sign in again, run the login command. If you already added Marka with a key, remove that entry first with codex mcp remove marka.
codex mcp add marka --url https://joinmarka.com/api/mcpcodex mcp login markaYour browser opens Marka's consent page, which names the client and the address it will return to. Sign in if asked, check both, and press Allow.
To disconnect, clear Codex's stored sign-in:
codex mcp logout markaOr open Settings → Connected apps on Marka and disconnect the client there. That ends its access immediately and revokes every token it holds.
Common questions
How do I add an MCP server to Codex?
Run codex mcp add <name> --url <url> for a remote server, or codex mcp add <name> -- <command> [args] for a local one that Codex starts itself. For Marka, use the remote form with the command under Connect. Restart Codex afterwards.
Does Codex support remote MCP servers?
Yes, over Streamable HTTP. Codex has no option for the older SSE transport, and Marka's gateway is Streamable HTTP, so it works with --url.
Where does Codex store its MCP servers?
In ~/.codex/config.toml, one [mcp_servers.<name>] table per server. codex mcp add writes the table for you, and you can edit the file by hand instead.
How do I check that Codex sees the Marka tools?
Run codex mcp list, which should show marka, or type /mcp inside a Codex session to list the tools the server exposes. See Check it worked to test the key as well.
Claude Code
Connect Claude Code to Marka's MCP server with one claude mcp add command for https://joinmarka.com/api/mcp. Your API key stays private to you and this project.
Cursor
Connect Cursor to Marka's MCP server at https://joinmarka.com/api/mcp by adding one entry to your user-level mcp.json, so the key never lands in a commit.