MCP Server

The seven Model Context Protocol server lets AI assistants like Claude Desktop, Claude Code and Cursor interact with the seven.io API directly. It exposes SMS, RCS, voice, lookups, contacts and account management as more than 40 tools across 12 categories.

The server is distributed as the npm package @seven.io/mcp and runs locally via npx over the MCP stdio transport. The source is on GitHub.


Installation

npm install -g @seven.io/mcp

You can also skip the global install — npx @seven.io/mcp fetches the latest version on demand whenever the MCP client launches the server.


Authentication

The server supports two authentication methods. OAuth 2.0 with PKCE is recommended — it provides automatic token refresh, fine-grained scopes and stores tokens securely in your operating system's keychain. If both methods are configured, OAuth takes priority.

Option 1: OAuth 2.0 (recommended)

Run the login command once. It opens your browser, requests the necessary scopes (SMS, Voice, RCS, …) and stores the tokens.

npx @seven.io/mcp login

Other CLI commands:

# Show whether you are signed in
npx @seven.io/mcp status

# Remove the stored tokens
npx @seven.io/mcp logout

Option 2: API key (legacy)

Set the SEVEN_API_KEY environment variable. Create your key in the seven.io dashboard.

export SEVEN_API_KEY="your-api-key"

Headless or remote setups

The OAuth login flow needs a browser on the same machine that can reach 127.0.0.1:7177 / 9437 / 8659. If you run the MCP server on a headless box or via SSH without port forwarding, fall back to the API key (Option 2) — that path doesn't require a browser.


Quick start

Add the server to the configuration of your MCP client and restart the client.

Claude Desktop

Edit your claude_desktop_config.json:

OSPath
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
Linux~/.config/Claude/claude_desktop_config.json

With OAuth (recommended) — run npx @seven.io/mcp login first:

{
  "mcpServers": {
    "seven": {
      "command": "npx",
      "args": ["@seven.io/mcp"]
    }
  }
}

With an API key:

{
  "mcpServers": {
    "seven": {
      "command": "npx",
      "args": ["@seven.io/mcp"],
      "env": {
        "SEVEN_API_KEY": "your-api-key"
      }
    }
  }
}

Claude Code

claude mcp add seven npx @seven.io/mcp

Cursor

Add the server to your project's .cursor/mcp.json:

{
  "mcpServers": {
    "seven": {
      "command": "npx",
      "args": ["@seven.io/mcp"]
    }
  }
}

Available tools

The server provides more than 40 tools grouped by capability.

Messaging

ToolDescription
send_smsSend an SMS
delete_smsDelete a scheduled SMS
send_rcsSend an RCS message
delete_rcsDelete an RCS message
rcs_eventsHandle RCS events
send_voiceSend a text-to-speech call
hangup_voiceEnd an active voice call

Account

ToolDescription
get_balanceCheck your account balance
get_pricingGet pricing per country
get_analyticsView account statistics

Lookup

ToolDescription
lookup_formatValidate a phone number's format
lookup_hlrHome Location Register (network, roaming)
lookup_mnpMobile Number Portability (carrier info)
lookup_cnamCaller ID name lookup
lookup_rcsCheck whether a number supports RCS

Status & logbook

ToolDescription
get_statusCheck delivery status
get_logbook_sentView sent messages
get_logbook_receivedView received SMS
get_logbook_voiceView voice call history

Phone numbers

ToolDescription
get_available_numbersList numbers available to order
order_numberPurchase a phone number
get_active_numbersList your active numbers
get_numberGet a number's details
update_numberUpdate a number's configuration
delete_numberCancel a number

Contacts

ToolDescription
list_contactsList all contacts
create_contactCreate a new contact
get_contactGet a contact by ID
update_contactUpdate a contact
delete_contactDelete a contact

Groups

ToolDescription
list_groupsList all groups
create_groupCreate a new group
get_groupGet a group by ID
update_groupUpdate a group
delete_groupDelete a group

Subaccounts

ToolDescription
list_subaccountsList all subaccounts
create_subaccountCreate a new subaccount
update_subaccountUpdate a subaccount
transfer_creditsTransfer credits to a subaccount
delete_subaccountDelete a subaccount

Webhooks

ToolDescription
list_webhooksList registered webhooks
create_webhookRegister a new webhook
delete_webhookRemove a webhook

Sender

ToolDescription
validate_senderValidate a sender identifier

Examples

Once the server is connected, you can ask the assistant in plain language. The MCP client picks the right tool automatically.

Send an SMS:

Send an SMS to +49170123456789 saying 'Order shipped — track at example.com/t/abc123'.

The assistant calls send_sms.

Check your balance:

What is my seven.io account balance?

The assistant calls get_balance.

Carrier lookup and RCS check:

Look up the carrier for +49170123456789 and tell me whether the number supports RCS.

The assistant chains lookup_mnp and lookup_rcs.


Debug logging

Set SEVEN_LOG_FILE to log every API request and response to a file. Useful when a tool call doesn't behave as expected.

{
  "mcpServers": {
    "seven": {
      "command": "npx",
      "args": ["@seven.io/mcp"],
      "env": {
        "SEVEN_API_KEY": "your-api-key",
        "SEVEN_LOG_FILE": "/tmp/mcp-seven-debug.log"
      }
    }
  }
}

Then tail the file:

tail -f /tmp/mcp-seven-debug.log

Resources