---
title: Codex's MCP server isn't working
description: Where Codex keeps its MCP servers, how to list them and sign in again, and what to check when Hamloy's tools or hooks don't show in Codex.
url: https://hamloy.com/mcp-fix/codex
---

[MCP fix](https://hamloy.com/mcp-fix)

# Codex's MCP server isn't working

Where Codex keeps its MCP servers, how to list them and sign in again, and what to check when Hamloy's tools or hooks don't show in Codex.

Codex keeps its MCP servers in a TOML file, lists them with one command, and signs in to a remote server with another. From OpenAI's Codex docs, read on 17 October 2026.

## Start with the program

If you set Codex up with the `hamloy` program, run this in the project's folder first:

```
hamloy status
```

Its Codex line says whether the tools and the hooks are there, whether the hooks are approved, and what to run for each one that is missing. The hooks wait for your OK: type `/hooks` in Codex and approve Hamloy's, or the board shows nothing of Codex's sessions.

## Where the file is

`~/.codex/config.toml`, for every folder. A project can have its own `.codex/config.toml`, which Codex reads only in a project you trust. A remote server is a table with its address:

```
[mcp_servers.hamloy]
url = "https://hamloy.com/mcp"
```

## See whether it is connected

`codex mcp list` in your shell, or `/mcp` inside Codex, lists each server. The desktop app and the editor extension also show whether a server needs you to sign in.

## Sign in again

Set up by the program, Hamloy signs in through the program itself: `hamloy connect` signs this computer in again.

Added by hand, sign in with:

```
codex mcp login hamloy
```

It opens your browser on Hamloy's sign-in. On a machine with no browser, use an [API token](https://hamloy.com/docs/api-tokens) in `HAMLOY_TOKEN` instead, as [Codex's page](https://hamloy.com/docs/codex) shows.

## Make Codex read the file again

Codex reads the file when it starts: start it again after a change. In the desktop app it's **Restart** ; in an editor, restart the Codex extension.

## Its own quirks

- A server has 10 seconds to start and each tool call 60, unless `startup_timeout_sec` and `tool_timeout_sec` say otherwise.
- Codex's sandbox may have no network. If it runs Hamloy's install line and gets [could not resolve host](https://hamloy.com/mcp-fix/could-not-resolve-host), let it run the line with network access, or run it yourself.

## The errors, one by one

- [Could not resolve host](https://hamloy.com/mcp-fix/could-not-resolve-host)
- [Missing, unknown or expired token](https://hamloy.com/mcp-fix/missing-unknown-or-expired-token)
- [The token variable isn't read](https://hamloy.com/mcp-fix/token-variable-not-read)
- [The server is added, but there are no tools](https://hamloy.com/mcp-fix/no-tools-after-connecting)

## Check that it worked

Ask "What's open in Hamloy?" The agent calls the `list` tool and you get your lists back:

```
Pebble · 4 open, 1 done
backlog
  ## Streaks
  [] B-k3f9@2 Streak counter on the habit card (claimed by claude on streak-counter in pebble)
  [] B-m2xq@1 Share a streak as an image
requests
  [] R-q4ve@1 Create an Apple developer account
```

Setting it up from the start: [Codex](https://hamloy.com/docs/codex).
