9 agents · all agents
Connect Codex
Codex talks to Mimir over the Model Context Protocol at https://mimir.johansen.foo/mcp. The token is an API key from Settings → API keys in the Mimir app; export it as MIMIR_TOKEN before starting the agent.
1. Add the server
File: ~/.codex/config.toml
toml
[mcp_servers.mimir]
url = "https://mimir.johansen.foo/mcp"
bearer_token_env_var = "MIMIR_TOKEN"2. Verify
Ask the agent to run memory_tree. It should list the projects your token can see, or nothing at all on a fresh install — either answer proves the connection works.
3. Tell it how to behave
Paste this into the agent's rules or instructions file, once per machine.
text
You have a long-term memory store called Mimir.
At the start of a session, call memory_digest with the current repository to load what is already known.
Before answering a question about this project's conventions, call memory_search with a path_prefix (for example "conventions").
When you learn something durable — a decision, a convention, a gotcha — call memory_write with a path that says where it belongs.
Do not store secrets, tokens or customer data.Notes
- Codex reads the token from the named environment variable, so the key never sits in the file.