MOF is an MCP server. Once it is on, AI clients such as Claude Desktop, Cursor and Dify can query the cost data each user is allowed to see. Access is read-only.
Turn on MCP
Administrator
- Open Admin → Settings → MCP access.
- Turn on “Allow MCP connections”.
- Click “Check connection”. MCP service should show “Connected”.
The MCP container ships with the deployment templates; nothing else to install. If the check fails, make sure the mof-mcp container is running and on the same version as MOF.
Set up OAuth
Administrator · needed for Claude Desktop
With OAuth, users paste one address into their AI client and sign in with their MOF account. Without it, they have to create a token by hand, and Claude Desktop cannot use tokens.
- Serve MOF over public HTTPS. Claude connects from its own servers, so the address must be reachable from the internet.
- Add two variables to the mof service and recreate it:
MOF_PUBLIC_URL: "https://mof.example.com"
MOF_MCP_OAUTH_SECRET: "REPLACE_WITH_A_RANDOM_SECRET_AT_LEAST_32_CHARACTERS"- In Admin → Settings → MCP access, click “Check connection” again. OAuth sign-in should show “Configured”.
MOF_PUBLIC_URL is the address users open, with no path. The secret needs at least 32 characters and must be the same on every MOF server. “Configured” only means both are set; the first real sign-in from Claude confirms the public callback works. Environment variables
Connect Claude Desktop
Every user
- In MOF, open Settings → MCP connections and copy the Server URL.
- In Claude Desktop, open Settings → Connectors → Add custom connector. Enter a name such as MOF and paste the address.
- Click Connect, sign in with your MOF account in the browser and approve.
- Ask Claude a question, for example “How much did we spend last month, by cloud?”
Clients without OAuth: use a token
In Settings → MCP connections → Manual tokens, enter a name and click “Create token”. Copy it right away; it is shown only once and lasts 90 days. Send it as a request header:
Authorization: Bearer YOUR_TOKENRevoke access
Users revoke their own apps and tokens in Settings → MCP connections, under “Connected apps” and “My tokens”. Turning off “Allow MCP connections” in Admin cuts every connection at once.