npm package: @ktmcp-cli/telnyx
Description: Production-ready CLI for Telnyx API - SMS, calls, and phone numbers
Author: KTMCP
Latest version: 1.0.0

![Banner](https://raw.githubusercontent.com/ktmcp-cli/telnyx/main/banner.svg)

> "Six months ago, everyone was talking about MCPs. And I was like, screw MCPs. Every MCP would be better as a CLI."
>
> — [Peter Steinberger](https://twitter.com/steipete), Founder of OpenClaw
> [Watch on YouTube (~2:39:00)](https://www.youtube.com/@lexfridman) | [Lex Fridman Podcast #491](https://lexfridman.com/peter-steinberger/)

# Telnyx CLI

> **⚠️ Unofficial CLI** - Not officially sponsored or affiliated with Telnyx.

A production-ready command-line interface for the [Telnyx API](https://developers.telnyx.com/) — programmable communications platform. Send SMS, make calls, manage phone numbers, and verify users directly from your terminal.

## Features

- **Messages** — Send and receive SMS/MMS messages
- **Phone Numbers** — List, search, and order phone numbers
- **Calls** — Initiate and control phone calls
- **Verify** — Send and check 2FA verification codes
- **Connections** — Manage SIP trunks and connections
- **Messaging Profiles** — Configure messaging settings
- **JSON output** — All commands support `--json` for scripting
- **Colorized output** — Clean terminal output with chalk

## Installation

```bash
npm install -g @ktmcp-cli/telnyx
```

## Quick Start

```bash
# Get your API key from https://portal.telnyx.com/#/app/api-keys
telnyx config set --api-key YOUR_API_KEY

# Send an SMS
telnyx messages send --from +12025551234 --to +19175559876 --text "Hello from Telnyx CLI!"

# List your phone numbers
telnyx numbers list

# Search for available numbers
telnyx numbers search --country US --area-code 212
```

## Commands

### Config

```bash
telnyx config set --api-key <key>
telnyx config show
```

### Messages

```bash
telnyx messages send --from +1XXX --to +1YYY --text "Hello"
telnyx messages send --from +1XXX --to +1YYY --text "Photo" --media-urls https://example.com/photo.jpg
telnyx messages list
telnyx messages list --json
telnyx messages get <message-id>
```

### Phone Numbers

```bash
telnyx numbers list
telnyx numbers list --json
telnyx numbers get <number-id>
telnyx numbers search --country US
telnyx numbers search --country US --area-code 212
telnyx numbers order +12125551234
telnyx numbers order +12125551234 --connection-id <id>
```

### Calls

```bash
telnyx calls create --to +1YYY --from +1XXX
telnyx calls create --to +1YYY --from +1XXX --connection-id <id>
telnyx calls hangup <call-control-id>
telnyx calls speak <call-control-id> --text "Hello, this is an automated message"
telnyx calls speak <call-control-id> --text "Bonjour" --language fr-FR --voice female
```

### Verify (2FA)

```bash
telnyx verify send --to +1XXX
telnyx verify send --to +1XXX --type sms
telnyx verify send --to +1XXX --type call
telnyx verify check <verification-id> --code 123456
telnyx verify list
```

### Connections

```bash
telnyx connections list
telnyx connections get <connection-id>
```

### Messaging Profiles

```bash
telnyx profiles list
telnyx profiles get <profile-id>
```

## JSON Output

All commands support `--json` for structured output:

```bash
telnyx numbers list --json | jq '.[].phone_number'
telnyx messages list --json | jq '.[0]'
```

## Why CLI > MCP?

No server to run. No protocol overhead. Just install and go.

- **Simpler** — Just a binary you call directly
- **Composable** — Pipe to `jq`, `grep`, `awk`
- **Scriptable** — Works in cron jobs, CI/CD, shell scripts

## License

MIT — Part of the [Kill The MCP](https://killthemcp.com) project.