Logo di Telephony MCP Server

Telephony MCP Server

Community
khan2a

A very simple no-fuss minimalist MCP Server with telephony tools like voice call and sms. This MCP Server can be integrated with LLM applications. Vonage API is used for calls, SMS, Speech-to-Text and Speech Recognition.

Autorekhan2a
Repositorytelephony-mcp-server
LinguaPython
Fork
5
Stelle
13
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    Telephony MCP Server mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    13 stelle e 5 fork nel repository collegato.

Black Ruff

📖 Blog Post: Learn more about this project in the detailed blog post: Telephony MCP Server for Agentic AI and Language Models

Telephony MCP Server

Demo Using Claude Desktop

Agentic Telephony Conversation with Speech Recognition

Use SMS during mid-conversation

SMS Enquiry (Send and Receive)

Demo Using GitHub Copilot

Introduction

This directory contains MCP (Model Context Protocol) Server tools for telephony operations, such as making voice calls and sending SMS messages using the Vonage API. These tools are designed to be integrated with Large Language Model (LLM) applications, enabling LLMs to perform real-world actions beyond simple text generation.

LLMs and Tool Integration

LLMs (Large Language Models) are advanced token generators—they can generate text, images, or even video based on input prompts. However, their core capability is limited to generating content; they cannot access external data or perform actions in the real world on their own.

To extend their functionality, LLMs can be connected to external tools. For example, when a user asks, "What's the weather today?" the LLM can invoke a backend API tool like get_weather(city) via a system prompt, parse the response, and return the result to the user. This tool-calling mechanism transforms a basic LLM into a powerful LLM Application.

Tool Calling with MCP and LangChain

  • LangChain is a popular framework for developing applications powered by LLMs. It provides a collection of pre-built tools (called a Toolkit) that LLMs can use to interact with external systems.
  • MCP (Model Context Protocol) follows the same concept: it offers a collection of pre-built tools and a framework for writing new tools and handling function calling.
  • Both frameworks allow LLMs to invoke tools, parse their outputs, and integrate the results into their responses.

How This Works

  1. Tool Definition: In this project, tools like voice_call and send_sms are defined using the MCP framework. Each tool is a function that can be called by an LLM application.
  2. LLM Application: When integrated with an LLM (such as OpenAI's GPT, Anthropic's Claude, etc.), the LLM can decide to call these tools based on user prompts.
  3. Execution Flow:
    • The LLM receives a prompt (e.g., "Call Alice and say hello").
    • The LLM determines that a tool invocation is needed and calls the appropriate MCP tool (e.g., voice_call).
    • The tool executes (e.g., initiates a phone call via Vonage) and returns the result.
    • The LLM parses the response and presents it to the user.

Running the MCP Tools

Prerequisites

  • Python 3.13+
  • MCP CLI (mcp[cli]), FastAPI, httpx, pyjwt, python-dotenv, uvicorn, pydantic (see pyproject.toml for details)
  • Vonage API credentials (API key, secret, application ID, private key)
  • Public URL for callback server (for production use)

Setup

  1. Install dependencies:

    bash
    pip install -r requirements.txt

    Or, if using Poetry:

    bash
    poetry install
  2. Configure environment variables:

    • Create a .env file with your Vonage credentials:

      VONAGE_API_KEY=your_api_key
      VONAGE_API_SECRET=your_api_secret
      VONAGE_APPLICATION_ID=your_app_id
      VONAGE_PRIVATE_KEY_PATH=path/to/private.key
      VONAGE_LVN=your_virtual_number
      VONAGE_API_URL=https://api.nexmo.com/v1/calls
      VONAGE_SMS_URL=https://rest.nexmo.com/sms/json
      CALLBACK_SERVER_URL=https://your-public-url  # URL for Vonage event callbacks

      For the CALLBACK_SERVER_URL:

      • In development: You can use http://localhost:8080 (default if not specified)
      • In production: Use a public URL (such as an ngrok URL or your deployed server)
  3. Run the MCP server:

    bash
    python telephony_server.py

    The server will start and expose the defined tools for LLM applications.

Running with Docker

You can also run the telephony MCP server using Docker:

  1. Build and start the Docker container:

    bash
    docker compose up --build

    Or to run in the background:

    bash
    docker compose up --build -d
  2. Stop the Docker container:

    bash
    docker compose down
  3. View logs from the Docker container:

    bash
    docker compose logs -f

Using with LLM Applications

  • Direct Integration: Connect your LLM application (e.g., using LangChain via Adapter or a custom MCP client) to the running MCP server. The LLM can now invoke telephony tools as needed.
  • Example: When the LLM receives a prompt like "Dial this number +123 and read latest news from today", it will call the voice_call tool, passing the required parameters.
  • Example: When the LLM receives a prompt like "Call this number using a British accent", it will call the voice_call tool with specific language and style parameters.
  • Example: When the LLM receives a prompt like "Text the news instead", it will call the send_sms tool, passing the required parameters.

Using with Claude Desktop or other MCP clients

To configure an MCP client (like Claude Desktop) to use your telephony MCP server:

  1. Update your MCP client configuration file (e.g., claude_desktop_config.json):

    json
    {
      "mcpServers": {
        "telephony": {
          "command": "docker",
          "args": ["run", "-i", "--rm", "--init", "-e", "DOCKER_CONTAINER=true", "telephony-mcp-server"]
        }
      }
    }
  2. Build the Docker image (if not using docker compose):

    bash
    docker build -t telephony-mcp-server .
  3. Restart your MCP client to apply the changes.

Key Concepts

  • LLMs are content generators: They generate text, images, or video, but need external tools for actions like web search, telephony, or database access.
  • Tool calling: LLMs can invoke backend APIs (tools) to fetch data or perform actions, then parse and present the results.
  • Frameworks: Both LangChain and MCP provide a structure for defining, registering, and invoking tools from LLMs.
  • MCP: Helps you write new tools and manage function calling, making it easy to extend LLM applications with custom capabilities.

Callback Server for Vonage Events

The Telephony MCP Server also includes a Vonage Callback Server that listens on port 8080. This server is used to receive event notifications from Vonage Voice API, which are sent when voice calls are initiated, completed, or encounter errors.

Features

  • Receives and stores Vonage event callbacks
  • Provides endpoints to view and manage stored events
  • Runs as a separate service within the same application

Endpoints

  • GET / - Health check endpoint
  • POST /event - Main endpoint for receiving Vonage callbacks
  • GET /events - List all stored events (with pagination)
  • GET /events/{event_id} - Get a specific event by ID
  • DELETE /events - Clear all stored events

Configuration

To use the callback server with Vonage Voice API, you need to set the CALLBACK_SERVER_URL environment variable to your server's public URL. This URL will be used as the event_url parameter in Vonage API calls.

bash
export CALLBACK_SERVER_URL="https://your-public-url"

For local development, you can use a service like ngrok to expose your local server to the internet:

bash
ngrok http 8080

Then set the CALLBACK_SERVER_URL to the ngrok URL.

Installazione

TypingMind
Prerequisiti:

Node.js 18+

{
  "mcpServers": {
    "khan2a-telephony-mcp-server": {
      "command": "",
      "args": []
    }
  }
}

Usa MCP Telephony MCP Server con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso Telephony MCP Server, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi Telephony MCP Server come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di Telephony MCP Server.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "khan2a-telephony-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "telephony-mcp-server"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di Telephony MCP Server, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di Telephony MCP Server.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare Telephony MCP Server per aiutarmi con questa attività?
Telephony MCP Server
Certo. Ho letto.
Ecco cosa ho trovato con Telephony MCP Server.

Domande frequenti

A cosa serve il server MCP Telephony MCP Server?

Telephony MCP Server è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare Telephony MCP Server MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare Telephony MCP Server con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP Telephony MCP Server con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando Telephony MCP Server, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego Telephony MCP Server MCP a TypingMind?

Telephony MCP Server funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre Telephony MCP Server MCP in TypingMind?

Telephony MCP Server mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare Telephony MCP Server MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se Telephony MCP Server richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇