AI agents · 9 min read

Connect LFG Alarm to Claude Code and Copilot in CI

To connect LFG Alarm to Claude Code running headless or in CI, or to the GitHub Copilot cloud agent, make a personal key in LFG Alarm under Settings > Connected AI apps and add the MCP server https://mcp.lfg.gm with the header Authorization: Bearer followed by your key. For a phone alarm when a long job finishes or needs you, the most reliable way is a hook or a last CI step that calls an anything alarm's private link with curl. LFG Alarm is a social alarm clock for iPhone and Android: alarms for times and moments, shared by link so every phone that joined rings together.

Also called: claude code notify phone when done · claude code hook phone alarm · copilot cloud agent mcp · ci job finished phone alert

Get it on Google PlayDownload on the App Store

Before you start

  • Get the LFG Alarm app on your phone from Google Play or the App Store, and sign in. The agent makes the alarms; the app is what rings them.
  • A personal key, for a coding agent with no one there to sign in. Make one below.
  • Using Claude Code on your own laptop? You do not need a key. Interactive Claude Code signs in with your LFG Alarm account; see Connect LFG Alarm to Claude.

A key acts as you. Every alarm made with it lands in your account and rings your phone, whoever started the run. On a shared repository, that means anyone who can trigger the workflow can set alarms on your phone. Put the key in a secret, never in the repository, and use it only in pipelines you trust.

Make a key

  1. In LFG Alarm, open Settings > Connected AI apps, on lfg.gm or in the app.
  2. Tap Make a key, name it after where it will live (for example "CI" or "Copilot"), and tap Make the key.
  3. The key is shown once, with Copy and Done: "Copy it now. It won't be shown again." Copy it straight into your secret store, then tap Done.
  4. It now shows in the list as Personal key, with when it was last used.

The screen says it plainly: "For an AI app that asks for a key instead of a sign-in, like Manus, a coding agent or your own script. A key acts as you, so keep it out of any agent other people use."

Keys start with lfg_pat_, work only at the LFG Alarm MCP server, and you can have up to 20, so give each machine or pipeline its own. A key has the same plan limits as signing in.

Two ways to get rung

There are two different jobs here, and they want different tools.

You want Use Why
"Ring me when the job is done" or "ring me when it is stuck" A hook or CI step that calls an anything alarm's link It runs every time, whether or not the model remembers to
"Set me an alarm for 7am tomorrow", "add my teammates to the release alarm" The MCP server with your key The agent picks the time, the people and the look

An agent can call an LFG Alarm tool when it finishes, if you ask it to in the prompt, but a model can forget, stop early or run out of turns. A hook is plain code. Use the hook for the ring, and the MCP for everything else.

An anything alarm gives you a private link. A POST request to it rings your phone. Nothing you send is shown, and no key is needed: the link is the secret.

  1. Make the anything alarm. In the app, tap 🔮 Anything, pick a Cooldown (10 minutes is the default; it ignores further calls until it runs out), keep it private and tap Arm it. Or ask your agent through the MCP to set one; it hands back the link to call. Anything alarms need a paid plan; for plans and pricing, go to lfg.gm.
  2. Copy the link from the link card (tap Test fire once to hear it), and save it as an environment variable or secret, here LFG_RING_URL.

Claude Code hooks. Add this to .claude/settings.json (or your user settings):

{
  "hooks": {
    "Stop": [
      { "hooks": [ { "type": "command", "command": "curl -s -X POST \"$LFG_RING_URL\" > /dev/null" } ] }
    ],
    "Notification": [
      { "hooks": [ { "type": "command", "command": "curl -s -X POST \"$LFG_RING_URL\" > /dev/null" } ] }
    ]
  }
}
  • Stop runs when Claude Code finishes its answer. In a headless run that is the end of the job: the build passed, the migration is done, or it gave up.
  • Notification runs when Claude Code needs you, such as a permission prompt, or after it has sat waiting for input. In an interactive session left running overnight, this is the one that matters.

In interactive use, Stop fires after every reply, so keep a cooldown on the alarm or use only Notification. Two alarms with two links (one "Done", one "Needs you") let you tell them apart by sound.

Any CI job. The plainest version needs no agent at all. Add a last step that runs even when the job fails:

- name: Ring my phone
  if: always()
  run: curl -s -X POST "$LFG_RING_URL"
  env:
    LFG_RING_URL: ${{ secrets.LFG_RING_URL }}

How it rings: on Android, an anything alarm rings full screen, even on Do Not Disturb. On iPhone it arrives as a time-sensitive alert with the alarm's own sound, which can come through Focus but respects the silent switch, so keep the ringer on. See Anything alarms.

Claude Code with a key

On a server or a dev box:

claude mcp add --transport http lfg-alarm https://mcp.lfg.gm --header "Authorization: Bearer $LFG_KEY"

Options go before the name. The address is https://mcp.lfg.gm, with no /mcp on the end.

In CI, pass the config with --mcp-config, so the run does not depend on a .mcp.json being picked up (--bare skips it). Save this as lfg.json:

{
  "mcpServers": {
    "lfg-alarm": {
      "type": "http",
      "url": "https://mcp.lfg.gm",
      "headers": { "Authorization": "Bearer ${LFG_KEY}" }
    }
  }
}

Then run Claude Code headless, with the tools pre-approved:

claude -p "Run the full test suite and fix what fails. When you are done, use LFG Alarm to set a one-off alarm two minutes from now called 'Tests done'." \
  --mcp-config lfg.json \
  --allowedTools "mcp__lfg-alarm"

A headless run cannot stop and ask you to approve a tool, so anything not on --allowedTools is refused or stalls the run. mcp__lfg-alarm allows every LFG Alarm tool; list single tools instead (for example mcp__lfg-alarm__set_time_alarm) to keep it tighter. Store LFG_KEY as a CI secret.

GitHub Copilot cloud agent

Copilot's cloud agent (it used to be called the coding agent) connects to remote MCP servers with headers only. GitHub's docs say it does not support remote servers that use a sign-in, so a key is the only way to connect LFG Alarm here.

  1. In the repository, add a secret for the agent named COPILOT_MCP_LFG_KEY with your key as the value. Copilot only passes secrets whose names start with COPILOT_MCP_. Look for this under the repository's settings for Copilot's environment or agent secrets; GitHub has moved it.
  2. In the repository's Copilot cloud agent settings, look for MCP configuration and add:
{
  "mcpServers": {
    "lfg-alarm": {
      "type": "http",
      "url": "https://mcp.lfg.gm",
      "headers": { "Authorization": "Bearer ${COPILOT_MCP_LFG_KEY}" },
      "tools": ["set_time_alarm", "list_my_alarms"]
    }
  }
}
  1. Save. The tools list is required. The cloud agent runs tools without asking anyone, so list only what it needs. Two are enough for "ring me when the pull request is ready".

Then say so in the issue you assign: "When the pull request is ready for review, use LFG Alarm to set a one-off alarm two minutes from now called 'PR ready'." Only tools work here, not prompts or resources.

Try it

Once it is connected, in a run or an assigned issue:

try this

Have your AI agent make it.

Paste this into ChatGPT, Claude, Grok or any AI agent that can add a connector, not into the LFG Alarm app. The setup steps come with it: get the LFG Alarm app, connect it to your agent once, and your agent makes the alarm in your account.

When you finish, use LFG Alarm to set a one-off alarm for two minutes from now called "Build done", with DONE on the wallpaper. Then tell me the time it rings.

Already have the LFG Alarm app and connected it to your AI agent?

Why it works. A one-off time alarm is a real alarm on both iPhone and Android, and the time back in the log shows the key and the tool both worked.

More ideas: "Set a repeating alarm at 8:45 on weekdays called Standup and add my friends [username] and [username]" (it shows you who it would add, and nothing is sent until you say yes; a headless run cannot answer, so add people from a chat instead), "Set an anything alarm called Deploy failed and give me the link to call", or "List my alarms". Through a key, LFG Alarm can set time, price, post, event and anything alarms, pick a sound or a look from the library, and add your friends or a whole group once you confirm. Each alarm comes back with its link, a share picture with a QR code and a message ready to send. Wallet and trader alarms are made in the app. See Using LFG Alarm from your AI agent.

If it does not work

  • The hook does not ring. Run the curl line by hand. A deleted alarm's link answers "not found"; a switched-off one says it is switched off. Opening the link in a browser does nothing; it needs a POST.
  • It rang once and then stayed quiet. That is the cooldown. Calls inside it are ignored.
  • Claude Code lists no LFG Alarm tools. Check the address has no /mcp on the end, and that the header reads Bearer then the key. Run claude mcp list to see whether it connected.
  • The headless run hangs or skips the alarm. The tool was not pre-approved. Add it to --allowedTools.
  • Copilot ignores the server. Check the secret name starts with COPILOT_MCP_ and that tools lists the tool names.
  • The key says it was never used. The agent never reached LFG Alarm: look at the URL, the header and the secret.
  • Still stuck? Write to us from the support page.

Disconnect

In LFG Alarm, open Settings > Connected AI apps and tap Disconnect beside the key. It stops working at once, in every pipeline using it. To stop a hook, switch off or delete the anything alarm, or tap New URL on it. Your other alarms keep ringing.

Learn more

Sources and further reading

LFG Alarm is not affiliated with Anthropic, Claude Code, GitHub or GitHub Copilot.

questions people ask
Should I use the hook or the MCP?

Both, for different things. The hook rings you when the job ends, every time. The MCP lets the agent set real alarms with times, names and people.

Is the anything alarm link the same as the key?

No. The link rings one alarm and does nothing else. The key can make and change alarms in your account. Guard both, and if the link leaks, tap **New URL**.

Can the whole team get rung?

Make the anything alarm a friends alarm and add your teammates, and one curl rings every phone on it. Each person needs the LFG Alarm app.

Can I keep it from ringing all night for a flaky test?

Set the cooldown to 1h. A job that fails ten times in a row then rings once an hour, not ten times.

Does LFG Alarm see my code?

No. It only receives what the agent sends to LFG Alarm's tools, or the empty POST to your link.

keep exploring

One use case opens another.

Rocco does the watching. You get the moment.

Free on Android and iPhone.

Get it on Google PlayDownload on the App Store