Logo Telnyx MCP Server

Telnyx MCP Server

Tổ chức
team-telnyx

Official Telnyx Local Model Context Protocol (MCP) Server that enables interaction with powerful telephony, messaging, and AI assistant APIs. This server allows MCP clients like Claude Desktop, Cursor, Windsurf, OpenAI Agents and others to manage phone numbers, send messages, make calls, and create AI assistants.

Nhà phát hànhteam-telnyx
Kho mãtelnyx-mcp-server
Ngôn ngữPython
Bản fork
7
Sao
25
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Telnyx MCP Server cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    25 sao và 7 bản fork từ kho mã được liên kết.

Telnyx Local Model Context Protocol (MCP) Server

⚠️ DEPRECATED: This Python-based MCP server is deprecated. Please migrate to the official TypeScript version:

New Repository: https://github.com/team-telnyx/telnyx-node/tree/master/packages/mcp-server


Official Telnyx Local Model Context Protocol (MCP) Server that enables interaction with powerful telephony, messaging, and AI assistant APIs. This server allows MCP clients like Claude Desktop, Cursor, Windsurf, OpenAI Agents and others to manage phone numbers, send messages, make calls, and create AI assistants.

Quickstart with Claude Desktop

  1. Get your API key from the Telnyx Portal.
  2. Install uvx (Python package manager), install with curl -LsSf https://astral.sh/uv/install.sh | sh , brew install uv or see the uv repo for additional install methods.
  3. Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json to include the following:
json
{
  "mcpServers": {
    "Telnyx": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/team-telnyx/telnyx-mcp-server.git", "telnyx-mcp-server"],
      "env": {
        "TELNYX_API_KEY": "<insert-your-api-key-here>"
      }
    }
  }
}

If you're using Windows, you will have to enable "Developer Mode" in Claude Desktop to use the MCP server. Click "Help" in the hamburger menu at the top left and select "Enable Developer Mode".

Running After Download

  1. Get your API key from the Telnyx Portal.

  2. Install uvx (Python package manager), install with curl -LsSf https://astral.sh/uv/install.sh | sh , brew install uv or see the uv repo for additional install methods.

  3. Clone the Git Repository
    Use Git to download the Telnyx MCP Server locally:

    bash
    git clone https://github.com/team-telnyx/telnyx-mcp-server.git
    cd telnyx-mcp-server
  4. Configure and Run with uvx
    In your Claude config, you can reference the local folder by using the --from argument. For example:

    json
    {
      "mcpServers": {
        "Telnyx": {
          "command": "uvx",
          "args": ["--from", "/path/to/telnyx-mcp-server", "telnyx-mcp-server"],
          "env": {
            "TELNYX_API_KEY": "<insert-your-api-key-here>"
          }
        }
      }
    }
  5. This instructs Claude to run the server from the folder you cloned. Replace “/path/to/telnyx-mcp-server” with the actual location of the repository.

Available Tools

Assistant Tools

  • Create AI assistants with custom instructions and configurations
  • List existing assistants
  • Get assistant details
  • Update assistant properties
  • Delete assistants
  • Get assistant TEXML configurations

Call Control Tools

  • Make outbound phone calls
  • Hang up active calls
  • Transfer calls to new destinations
  • Play audio files during calls
  • Stop audio playback
  • Send DTMF tones
  • Speak text using text-to-speech

Messaging Tools

  • Send SMS and MMS messages
  • Get message details
  • Access and view ongoing SMS conversations (resource://sms/conversations)

Phone Number Tools

  • List your phone numbers
  • Buy new phone numbers
  • Update phone number configurations
  • List available phone numbers

Connection Tools

  • List voice connections
  • Get connection details
  • Update connection configurations

Cloud Storage Tools

  • Create buckets compatible with Telnyx Cloud Storage
  • List buckets across all regions
  • Upload files
  • Download files
  • List objects in a bucket
  • Delete objects
  • Get bucket location information

Embeddings Tools

  • List existing embedded buckets
  • Scrape and embed a website URL
  • Create embeddings for your own files

Secrets Manager Tools

  • List integration secrets
  • Create new bearer or basic secrets
  • Delete integration secrets

Tool Filtering

You can selectively enable or disable specific tools when running the MCP server. This is useful when you only need a subset of the available functionality.

Listing Available Tools

To see all available tools:

bash
uvx --from /path/to/telnyx-mcp-server telnyx-mcp-server --list-tools

Enabling Specific Tools

You can enable only specific tools using either:

  1. Command-line argument:

    bash
    uvx --from /path/to/telnyx-mcp-server telnyx-mcp-server --tools "send_message,get_message,list_phone_numbers"
  2. Environment variable:

    json
    {
      "mcpServers": {
        "Telnyx": {
          "command": "uvx",
          "args": ["--from", "/path/to/telnyx-mcp-server", "telnyx-mcp-server"],
          "env": {
            "TELNYX_API_KEY": "<insert-your-api-key-here>",
            "TELNYX_MCP_TOOLS": "send_message,get_message,list_phone_numbers"
          }
        }
      }
    }

Excluding Specific Tools

You can exclude specific tools while enabling all others:

  1. Command-line argument:

    bash
    uvx --from /path/to/telnyx-mcp-server telnyx-mcp-server --exclude-tools "make_call,send_dtmf"
  2. Environment variable:

    json
    {
      "mcpServers": {
        "Telnyx": {
          "command": "uvx",
          "args": ["--from", "/path/to/telnyx-mcp-server", "telnyx-mcp-server"],
          "env": {
            "TELNYX_API_KEY": "<insert-your-api-key-here>",
            "TELNYX_MCP_EXCLUDE_TOOLS": "make_call,send_dtmf"
          }
        }
      }
    }

Example Usage

Try asking Claude:

  • "Create an AI agent that can handle customer service for an e-commerce business"
  • "Send a text message to +5555551234 saying 'Your appointment is confirmed for tomorrow at 3pm'"
  • "Make a call to my customer at +5555551234 and transfer them to my support team"
  • "Find me a phone number in Chicago with area code 312"
  • "Create an auto-attendant system using Telnyx AI assistants and voice features"

Webhook Receiver

The MCP server includes a webhook receiver that can handle Telnyx webhooks directly through ngrok. This is useful for receiving call events and other notifications from Telnyx.

Enabling Webhooks

To enable the webhook receiver, you can either use the --webhook-enabled command-line flag or set the WEBHOOK_ENABLED=true environment variable. If an NGROK_AUTHTOKEN is also provided (see 'Ngrok Integration' below), the ngrok tunnel will be automatically attempted when the server starts. The command-line flag takes precedence if both are set.

Using Command-Line Flag:

bash
telnyx-mcp-server --webhook-enabled --ngrok-enabled

Using Environment Variable:

Alternatively, set the WEBHOOK_ENABLED=true environment variable. This is often convenient when configuring via MCP client settings (see 'Webhook Configuration in Claude Desktop' below) or in .env files.

bash
# Example for your shell
export WEBHOOK_ENABLED=true
export NGROK_AUTHTOKEN=your_ngrok_token # Also needed for ngrok
telnyx-mcp-server

Ngrok Integration

To enable ngrok tunneling:

  1. Get an ngrok authentication token from ngrok.com
  2. Set the NGROK_AUTHTOKEN environment variable or use the --ngrok-authtoken flag:
bash
# Using NGROK_AUTHTOKEN environment variable (recommended)
export NGROK_AUTHTOKEN=your_ngrok_token
telnyx-mcp-server --webhook-enabled # Or use WEBHOOK_ENABLED=true env var

# Or using --ngrok-authtoken command line flag
telnyx-mcp-server --webhook-enabled --ngrok-authtoken your_ngrok_token

If NGROK_AUTHTOKEN is set, the --ngrok-enabled flag is generally not required when webhooks are active.

When ngrok is enabled, the server will print the public URL that can be used to configure webhooks in the Telnyx Portal.

Important: If ngrok fails to initialize (e.g., due to an invalid authtoken, network issues, or conflicts with another ngrok process), the MCP server will exit on startup. Check the server logs for details (see Troubleshooting section).

Parent Process Monitoring

The MCP server monitors the parent process (Claude Desktop) and automatically exits when the parent process is gone. This ensures proper cleanup of resources even if Claude Desktop closes unexpectedly.

Webhook Monitoring and Runtime Control

  • You can inspect the current webhook and ngrok status by querying the resource://webhook/info resource.
  • To retrieve a history of received webhook events, use the get_webhook_events tool.

Webhook Configuration in Claude Desktop

To enable webhooks in Claude Desktop, update your configuration:

json
{
  "mcpServers": {
    "Telnyx": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/team-telnyx/telnyx-mcp-server.git", "telnyx-mcp-server"],
      "env": {
        "TELNYX_API_KEY": "<insert-your-api-key-here>",
        "NGROK_AUTHTOKEN": "<insert-your-ngrok-token-here>",
        "WEBHOOK_ENABLED": "true", // Enables webhooks via environment variable
        // Alternatively, you can use command-line flags in "args" instead of WEBHOOK_ENABLED in env:
        // e.g., "args": ["--from", "git+https://github.com/team-telnyx/telnyx-mcp-server.git", "telnyx-mcp-server", "--webhook-enabled"],
      }
    }
  }
}

Webhook Example



Remote MCP Now Available

Telnyx now offers a remote MCP implementation based on the latest MCP specification. This allows you to access Telnyx's powerful communications APIs through a remotely hosted MCP server. No need to run the server locally. Learn more in the official documentation.

Contributing

If you want to contribute or run from source:

  1. Clone the repository:
bash
git clone https://github.com/team-telnyx/telnyx-mcp-server.git
cd telnyx-mcp-server
  1. Create a virtual environment and install dependencies using uv:
bash
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"  # Includes development dependencies like ruff
  1. Create a .env file and add your Telnyx API key:
bash
echo "TELNYX_API_KEY=YOUR_API_KEY" > .env
  1. Run the tests to make sure everything is working:
bash
pytest
  1. Install the server in Claude Desktop: mcp install src/telnyx_mcp_server/server.py
  2. Debug and test locally with MCP Inspector: mcp dev src/telnyx_mcp_server/server.py

Code Quality with Ruff

This project uses Ruff for linting and formatting Python code. Ruff is a fast Python linter and formatter written in Rust, designed to replace multiple Python code quality tools with a single, unified tool.

Installing Ruff

Ruff is included in the development dependencies. Install it with:

bash
uv pip install -e ".[dev]"

Using Ruff

Linting

To check your code for issues:

bash
ruff check .

To automatically fix issues where possible:

bash
ruff check --fix .

Formatting

To format your code:

bash
ruff format .

Pre-commit Workflow

For the best development experience, run these commands before committing changes:

bash
# Format code
ruff format .

# Fix linting issues
ruff check --fix .

# Run tests
pytest

Configuration

Ruff is configured in the pyproject.toml file. The configuration includes:

  • Code style rules based on PEP 8
  • Import sorting
  • Docstring style checking (Google style)
  • Code complexity checks
  • And more

See the [tool.ruff] section in pyproject.toml for the complete configuration.

Troubleshooting

Logs when running with Claude Desktop can be found at:

  • Windows: %APPDATA%\Claude\logs\mcp-server-telnyx.log
  • macOS: ~/Library/Logs/Claude/mcp-server-telnyx.log

MCP Telnyx: spawn uvx ENOENT

If you encounter the error "MCP Telnyx: spawn uvx ENOENT", confirm its absolute path by running this command in your terminal:

bash
which uvx

Once you obtain the absolute path (e.g., /usr/local/bin/uvx), update your configuration to use that path (e.g., "command": "/usr/local/bin/uvx"). This ensures that the correct executable is referenced.

Server Fails to Start (Especially with Webhooks/Ngrok)

If the MCP server fails to start, particularly if you have webhooks enabled, it might be due to an issue with ngrok initialization. One common cause is an existing ngrok process running in the background, potentially from a previous server instance that didn't shut down cleanly.

  • Check for running processes: Use commands like ps aux | grep telnyx-mcp-server (Linux/macOS) or check Task Manager (Windows) for any lingering telnyx-mcp-server processes. Since ngrok is managed internally by the server, you typically won't see a separate 'ngrok' process.
  • Kill old processes: If found, terminate these old processes.
  • Check logs: Review the server logs (locations mentioned above) for specific error messages related to ngrok or server startup.

Cài đặt

TypingMind
Yêu cầu:

Node.js 18+

{
  "mcpServers": {
    "Telnyx": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/team-telnyx/telnyx-mcp-server.git",
        "telnyx-mcp-server"
      ],
      "env": {
        "TELNYX_API_KEY": "<insert-your-api-key-here>"
      }
    }
  }
}

Dùng MCP Telnyx MCP Server với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Telnyx MCP Server, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Telnyx MCP Server làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Telnyx MCP Server.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "telnyx-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "git+https://github.com/team-telnyx/telnyx-mcp-server.git"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Telnyx MCP Server, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Telnyx MCP Server.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Telnyx MCP Server giúp tôi làm việc này không?
Telnyx MCP Server
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Telnyx MCP Server.

Câu hỏi thường gặp

Máy chủ MCP Telnyx MCP Server dùng để làm gì?

Telnyx MCP Server là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Telnyx MCP Server với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Telnyx MCP Server với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Telnyx MCP Server với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Telnyx MCP Server, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Telnyx MCP Server với TypingMind?

Telnyx MCP Server hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Telnyx MCP Server cung cấp những công cụ nào trong TypingMind?

Telnyx MCP Server cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Telnyx MCP Server không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Telnyx MCP Server yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇