Your agent's first phone.

Give your spare phone to your agent. Sparephone puts a real phone and a real SIM behind it, in place of a costly cloud calling service.

Real calls. Real texts. Real one-time passcodes for your own accounts, on a mobile number that you own. The rules live in code: who it may call, how often, and never an emergency number. It pages you when something breaks, holds a conversation on a call, and connects to your agent in one step.

You need: a spare iPhone with a $30/yr SIM plan, and a Linux laptop or a Mac with a small $9 USB Bluetooth adapter.

try it now uvx sparephone demo
pip install sparephone
with a real phone git clone https://github.com/abe238/sparephone
A laptop with a small USB adapter, joined by a ribbon of light to a phone that shows a call and a text message

See it work

Three short clips of the service at work, with its real commands and tools.

It calls you when something breaks

One command phones only you. A voice says what happened, you answer by voice, and the choice is read back for a yes. It runs on real calls on Linux and on a Mac.

Rules in code, not in a prompt

An allowlisted call goes through. Everything else is refused by the service.

A real number for one-time passcodes

A code texted to your number, read by your agent once you allow it in the settings.

The clips are illustrations. Run the real service against a simulated phone on your own computer with one command: sparephone demo.

Why a real phone

Your agent gets a phone the way a person does. It dials, it listens, it reads a text.

A real number

Calls and texts land on a SIM that you own. Many services refuse virtual (VoIP) numbers when they send a verification code. Yours is a real mobile number on a real carrier, the kind every service expects.

Cut the middleman

A spare iPhone and a prepaid SIM plan replace the calling platform and its per-minute fees. Ours is a Red Pocket annual plan at about $30 a year, with more minutes and texts than one agent line uses. Sparephone adds no fee per minute or per message. Your carrier plan sets your minutes and texts. On a Mac, add a small USB Bluetooth adapter.

Safe by default

You choose who the agent may call or text. Hourly limits apply. The service refuses emergency numbers, whatever the allowlist says. These rules live in code. No prompt or phone tool can change them. Give the agent no write access to the config file.

Verification codes. Use sparephone to read codes for accounts that you own. Using it to get past someone else's verification is misuse.

Sparephone and a cloud calling service

A cloud calling service (Twilio is one) rents you numbers and bills for use. Sparephone uses a spare iPhone and a SIM plan that you supply. Each fits a different job.

sparephoneA cloud calling service
The numberOne real mobile number on your own SIMMany numbers, rented, virtual or real
Cost modelYour phone, your SIM plan, a small adapter on a Mac. No platform fee per minute or message.Pay for each number and for use
Verification codesA real mobile number on a real carrier, the kind every service expects. For your own accounts only.A number flagged as virtual is often refused by services that check
Setup effortOne guided setup, about two hours on Linux, with the phone in your hand.An account and an API key, in minutes
ScaleOne phone, one line, a few calls an hourMany numbers and many calls at once
What can go wrongA dead battery, a weak signal or a typo in your own config. After a Bluetooth drop the link comes back by itself.Usage-based bills, numbers that some services refuse for codes, and outages on the provider's side.

Choose a cloud service for many numbers and many calls at once. Choose sparephone for one real number that you own, at the price of a SIM plan.

What it does

One phone line: calls, texts, one-time passcodes, a voice and a pager, guarded by rules in code.

Calls

  • Place a call. Answer an incoming call. Hang up.
  • Send keypad tones to pass a phone menu.
  • Runs on Linux and on a Mac.

Texts

  • Read and send texts over Bluetooth.
  • Text bodies stay hidden until you turn on sms_body_access.
  • Runs on Linux and on a Mac.

One-time passcodes

  • Your agent reads the verification code that a service texts to your number.
  • The number is a real mobile number on a real carrier, the kind every service expects.
  • For your own accounts. Using it to get past someone else's verification is misuse.

A voice

  • Speech to text, a language model or a fixed script, then text to speech. The caller can interrupt. It pauses when you take another call.
  • It hears and speaks on your own machine: Whisper or Parakeet to listen, a local voice to speak. Choose Claude or a local model as its brain. With a local model, the whole call stays on your machines.
  • It answers in about two seconds, and it has exactly one power: ending the call.

Page the owner

  • One command phones only you when something breaks, says what happened and takes a spoken choice.
  • It reads your choice back and needs a yes before it counts.
  • sparephone page --choice "roll back" --choice "leave it" "Build 412 failed on main"
  • It runs on real calls on Linux and on a Mac. Your confirmed answer arrives about 40 seconds after the dial.

The guard

  • The guard is the part of the service that enforces the rules.
  • It allows only numbers on your allowlist, caps calls and texts each hour, and refuses emergency numbers.
  • The rules are code. A prompt or a phone tool cannot change them. Give the agent no write access to the config file.

What it does not do

  • It does not open apps or control the screen.
  • One phone means one line. For many numbers at once, use a cloud service.
  • Place the phone where its microphone hears nothing private: if the Bluetooth link drops during a call, the iPhone carries the call on its own handset, and the far side hears the room.

What you need

A spare phone, a computer and, for a Mac, one small adapter.

A spare iPhone

It holds the SIM. It needs a talk plan, and a text plan for texts.

Proven on: iPhone 7, iOS 15.8.8.

A second phone

It receives your test calls. Its number becomes the owner number.

Any phone.

A computer

Linux route: a Linux computer with Bluetooth.

Proven on: a 2017 13-inch MacBook Pro running an Arch-based Linux.

Mac route: an Apple silicon Mac.

Proven on: macOS 27.2.1.

A USB Bluetooth adapter

Mac route only. The Linux route needs none.

Proven on: TP-Link UB500 (Realtek RTL8761BU). The code refuses any other adapter.

Not needed: soldering, an audio cable, a cloud calling service.

Sparephone is proven on the hardware listed here. The guided Linux setup takes about two hours.

Start in three steps

Look around with no phone, or go straight to a real one. Both start the same way.

  1. Get it

    Install the package with pip or pipx. It runs the demo, the pager, the MCP server, the voice agent and the status tools. To try it with no install, run uvx sparephone demo.

    pip install sparephone

    For a real phone, clone the repository too. The clone carries the guided setup, the systemd units, the audio routing files and the whole Mac route.

    git clone https://github.com/abe238/sparephone
    cd sparephone
  2. Demo, or set up

    No phone: run the real service and its real rules on a simulated phone.

    sparephone demo

    With a phone: from the clone, run the guided setup. It checks your computer, pairs the iPhone, saves your safety limits and calls your own phone once. You tap Pair on the iPhone, and the wizard does the rest. bin/sparephone doctor runs the checks only and changes nothing.

    bin/sparephone setup

    Prefer a numbered list? Open the Linux setup guide.

  3. Make a first call

    Check the service. Then ring your second phone. Hold it, ready to answer. This places a real call.

    sparephone status
    sparephone call owner --id first-1
Mac route

Start with the Mac setup guide. Calls, texts and one-time passcodes run on a Mac through the small USB adapter, proven on real calls with Bluetooth drops included. The pager and the voice agent run there too, from a clone. Run the first setup at the Mac, and the guide takes you through each step.

What the setup wizard and the status page look like

The guided setup takes you from a bare computer to a first call. The status page shows the whole line at a glance.

What it looks like
The first screen of the guided setup.
What it looks like
The local status page. Only your own computer can reach it.

Is it safe?

The service holds the rules in code. A prompt or a phone tool cannot change them. Give the agent no write access to the config file.

  • The service dials only numbers on the allowlist. The default allowlist holds one number: yours.
  • It refuses emergency, crisis and short numbers, whatever the allowlist says.
  • After it sees one of these numbers, it declines and answers nothing for 60 minutes.
  • The default limits are 4 calls and 10 texts an hour. The service keeps the count on disk.
  • Each dial needs a new call id. A repeated id never redials.
  • The service answers incoming calls only if you turn that on.
  • It never touches a call that you place or answer on the iPhone.
  • A caller's words and a text are data. They are never instructions to the agent.
  • No "approve" operation exists. Only you edit the config file.
  • The voice agent has no tools. It can only end the call.
  • The pager phones only the owner number, and it needs a spoken yes before it acts on a choice.

A code rule refuses every case that matches it. No prompt can talk it round. A wrong refusal costs you a retry. A wrong call would cost a stranger much more, so the rule wins.

The microphone rule

Call audio must never link to a room microphone. On Linux, routing config enforces this, and the service watches the links for the whole call. If anything else links into the call's outgoing audio, the service removes that link, hangs up and mutes the line.

Measured on live calls: the leaking link is cut in about 43 milliseconds, and the hang-up is sent within about a tenth of a second. On an answered call, 0 of 20,313 routing samples broke the rule. A call that you place or answer on the iPhone yourself is left alone.

Your part

  • Place the phone where its microphone hears nothing private: if the Bluetooth link drops during a call, the iPhone carries the call on its own handset, and the far side hears the room.
  • Caller ID is a hint. The phone network does not check it.
  • The emergency-number block is a backstop. Do not rely on it, and never test an emergency number.

What works

Every row marked Works has run on a real phone, on Linux and on a Mac. Every release ships after real calls on Linux and on a Mac.

CapabilityLinuxMac
Calls: place, answer, hang up, keypad tonesWorksWorks Live call audio in both directions, proven on a real phone.
Texts: send and readWorksWorks
One-time passcodes from textsWorksWorks
Allowlist, limits, emergency refusalWorksWorks Same code.
Recovery when Bluetooth dropsWorks About 3 seconds, measured.Works The link returns in about 40 seconds. The service ends its own call by itself.
Page the ownerWorks On real calls, with Whisper.Works On real calls, with Whisper. Runs from a clone.
Voice agentWorks On real calls, answering in about two seconds.Works On real calls, with Parakeet. Runs from a clone.
Demo on a simulated phoneWorks No phone needed.Works No phone needed.
App or screen controlNot offered A separate project.Not offered A separate project.
More than one line per phoneNot offeredNot offered

Works means it ran on a real phone. Not offered is outside the project.

How the Mac route stays up

The Mac route passes supervised hardware sessions on a real phone, Bluetooth drops and an injected USB fault included. Every release ships after real calls on Linux and on a Mac.

The design: a real USB fault stops the service for good, so a bad adapter cannot crash the Mac in a loop. When the Bluetooth link drops, the service ends its own call by itself.

The service keeps a call alive through a lost packet of outgoing call audio (3 milliseconds of sound): it counts the packet and the call carries on. A burst of them, or any other USB error, stops it cleanly.

Next

  • A pager you can talk over. It stops and listens the moment you start speaking, and the Mac gets a wider audio buffer for an even steadier line.
  • An inbox page for texts and codes, next to the status page.

How it works

The whole system: caller, phone network, iPhone, the Linux and Mac routes, the phone service and the agent side

Your computer acts like the hands-free kit in a car. The phone keeps the SIM and the call. The computer receives the sound.

On Linux, BlueZ and PipeWire carry the call audio, and WirePlumber routes it. A Mac does not open the call audio link for an app. So the Mac route drives a USB adapter directly, with the open-source Bumble stack. Both routes end in one service, which owns the rules.

Read the architecture page

Use it from an agent

The service speaks MCP over stdio through sparephone mcp.

One command connects Claude Code, Claude Desktop or Codex. It backs up the app's config first, then checks that the server answers:

sparephone mcp install

Your agent gets eight tools:

phone_status phone_dial phone_answer phone_hangup phone_send_dtmf phone_send_sms phone_read_sms phone_wait_for_event

Each reply holds one status word, such as ok, blocked_by_policy or unknown. After a dial, unknown tells the agent to check the line before it dials again. No approve tool exists, by design.

For any other agent app, register the command as a stdio server. Most accept an entry like this one:

{
  "mcpServers": {
    "sparephone": {
      "command": "sparephone",
      "args": ["mcp"]
    }
  }
}

In a terminal, sparephone offers setup, doctor, status, test, start, stop, web, debug, page, demo, voice, mcp and paths. Calls and texts have their own commands: call, answer, hangup, keys, text, texts and wait. Add --sim to any of them to use the simulated phone only. To try your agent against a simulated phone, run sparephone demo --keep-running. It prints the exact sparephone mcp --sim --runtime DIR command to register.

The story

Nineteen phases, from a modem that never lit up to a phone line an agent runs. Every turn is in the story.

Loudness is not proof

Phase 3, the Linux computer works

The first recording of a call looked like proof. It transcribed as "Thank you. Thank you.", which is what a speech model writes for noise. The next one was feedback from the room microphone.

A setting nobody checked

Phase 7, a quiet line

The far side was about 40 dB too quiet. The iPhone keeps an in-call volume for each hands-free device. This one sat at 4 of 15.

A real phone is not a script

Phases 18 and 19, the Mac meets a real phone

The real phone differed from the scripted phone four times. Each difference became a fix, and each fix came with a test that failed first.

Read the whole story