AI agents · 10 min read

Connect LFG Alarm to Claude Code and Copilot in CI

To connect LFG Alarm to headless Claude Code, CI or the GitHub Copilot cloud agent, make a personal key and add the MCP server https://mcp.lfg.gm with the header Authorization: Bearer and your key. To be rung when a long job ends or needs you, a hook or last CI step that POSTs to a webhook alarm's link is surest. LFG is your daily social alarm & curiosity agent for iPhone and Android.

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

Download on the App StoreGet it on Google Play

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 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, anyone who can trigger the workflow can set alarms on your phone.

So 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 > AI apps and keys, 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 ChatGPT, 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 a webhook 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, and a hook is plain code that runs every time. Use the hook for the ring, and the MCP for everything else.

A webhook 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 webhook alarm. In the app, tap Explore something, then 🌐 Webhook. Pick a Cooldown, keep it private and tap Arm it. The cooldown is how long it ignores further calls after a ring, from 1 to 60 minutes; 10 minutes is the default. Or ask your agent through the MCP to set one, and it hands back the link to call.
  2. Copy the link from the alarm's card with the copy icon (tap Test fire once to hear it), and save it as an environment variable or secret, here LFG_RING_URL.

Every account gets one webhook alarm free; for plans with more, go to lfg.gm.

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.

GitHub Actions. The plainest version needs no agent at all. The Ring my phone with LFG Alarm action rings your link when the workflow fails:

- if: failure()
  uses: lfg-gm/ring-action@v1
  with:
    ring-url: ${{ secrets.LFG_RING_URL }}

Use if: always() instead to be rung when it ends either way.

Any other CI. 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, a webhook alarm rings full screen, even on Do Not Disturb. On iPhone it arrives as a time-sensitive alert with the alarm's own sound. That can come through Focus but respects the silent switch, so keep the ringer on. See Webhook 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_links"]
    }
  }
}
  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 an alarm for two minutes from now called "Build done", with DONE on the wallpaper.

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

Why it works. Two minutes is enough to walk away: your phone rings when the job is done, as a real alarm on both iPhone and Android.

More ideas:

  • "Add a monitor that rings me when tickets for [event] go on sale"
  • "Set a sun & moon alarm for golden hour in [your city] every day"
  • "Set a repeating alarm at 8:45 on weekdays called Standup and add my friends [username] and [username]"
  • "Set a webhook alarm called Deploy failed and give me the link to call"
  • "List my alarms"

Adding people waits for you: LFG Alarm shows who it would add, and nothing is sent until you say yes. A headless run cannot answer, so add people from a chat instead.

What a key can set

Through a key, LFG Alarm can set time, sun & moon, price, post, event, monitoring and webhook alarms. It can set wallet and trader alarms too: a wallet buying or selling, a trader on FOMO or a KOL that GMGN tracks making a trade, or anyone on FOMO trading a token.

It can also 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. 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 > AI apps and keys 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 webhook 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 webhook 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 webhook 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 1 hr. 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.

Never miss the moment.

Free on Android and iPhone.

Download on the App StoreGet it on Google Play