Skip to content

Agent configuration

By the end of this page you will be able to:

  1. add mmw-agent to your client’s config;
  2. change the hint language, state directory and sync frequency;
  3. check that the agent sees the same settings as your client.

Running example: you use Claude Code and Codex on one laptop, your key is bound to the “backend” project, and you want your session history kept in MMW.

The agent is configured only through environment variables. It has no config file of its own.

VariableTypeDefaultDescription
MMW_API_KEYstring—API key from your account, starts with mmw_. Required.
MMW_CREDENTIALstring—Fallback name for the key, read only without MMW_API_KEY.
MMW_ENDPOINTURLregional defaultServer address. Set https://mcp.mmwhub.tech; /mcp at the end is optional.
MMW_LANGen or ruby server addressLanguage of hints, errors and the mmw_sync_status description.
MMW_AGENT_HOMEpath~/.mmwWhere agent.json lives: device ID and consent receipt.
MMW_SESSIONS_HOMEpathhome directoryWhere to look for .claude/projects and .codex/sessions. The default MMW_AGENT_HOME is also derived from it.
MMW_SYNC_INTERVALseconds15Pause between sync cycles.

In every case the agent is started with uvx --from <wheel> mmw-agent. Wheel URL: https://app.mmwhub.tech/downloads/mmw-agent/mmw_agent-0.1.4-py3-none-any.whl.

With a command:

Terminal window
claude mcp add mmw \
-e MMW_API_KEY=mmw_your_key \
-e MMW_ENDPOINT=https://mcp.mmwhub.tech \
-- uvx --from https://app.mmwhub.tech/downloads/mmw-agent/mmw_agent-0.1.4-py3-none-any.whl mmw-agent

Add more variables with extra -e flags, for example -e MMW_SYNC_INTERVAL=60.

By hand — the mcpServers.mmw block in ~/.claude.json:

~/.claude.json
{
"mcpServers": {
"mmw": {
"command": "uvx",
"args": ["--from", "https://app.mmwhub.tech/downloads/mmw-agent/mmw_agent-0.1.4-py3-none-any.whl", "mmw-agent"],
"env": {
"MMW_API_KEY": "mmw_your_key",
"MMW_ENDPOINT": "https://mcp.mmwhub.tech"
}
}
}
}

Restart the client after editing its config: it fetches the tool list when it launches the agent.

env fragment
"env": {
"MMW_API_KEY": "mmw_your_key",
"MMW_ENDPOINT": "https://mcp.mmwhub.tech",
"MMW_LANG": "en"
}

By default the agent checks for new session lines every 15 seconds. To check once a minute instead:

~/.codex/config.toml
[mcp_servers.mmw]
command = "uvx"
args = ["--from", "https://app.mmwhub.tech/downloads/mmw-agent/mmw_agent-0.1.4-py3-none-any.whl", "mmw-agent"]
env = { MMW_API_KEY = "mmw_your_key", MMW_ENDPOINT = "https://mcp.mmwhub.tech", MMW_SYNC_INTERVAL = "60" }

If you set MMW_AGENT_HOME in the client config, set the same variable in your terminal when you run consent, revoke and status. Otherwise the terminal writes consent to ~/.mmw while the agent launched by the client looks elsewhere and never sees it.

Terminal window
export MMW_AGENT_HOME="$HOME/.config/mmw"
export MMW_API_KEY=mmw_your_key
export MMW_ENDPOINT=https://mcp.mmwhub.tech
uvx --from https://app.mmwhub.tech/downloads/mmw-agent/mmw_agent-0.1.4-py3-none-any.whl mmw-agent consent

If you do not need session history and your client supports remote MCP servers over HTTP, you can skip the agent:

mcpServers
{
"mcpServers": {
"mmw": {
"url": "https://mcp.mmwhub.tech/mcp",
"headers": { "Authorization": "Bearer mmw_your_key" }
}
}
}

In this mode there is no mmw_sync_status and no session sync. The server is stateless: every request stands on its own, so there is nothing to reconnect after a pause.

Run status in a terminal with the same variables as in your config:

Terminal window
MMW_API_KEY=mmw_your_key MMW_ENDPOINT=https://mcp.mmwhub.tech \
uvx --from https://app.mmwhub.tech/downloads/mmw-agent/mmw_agent-0.1.4-py3-none-any.whl mmw-agent status

If the output contains "server": { "registered": …, "sources": … }, the key and address are correct. If it shows "server": { "error": "Offline: …" }, the agent could not reach the server; see Agent troubleshooting.