- Explore MCP Servers
- asterisk-bot-mcp
Asterisk Bot Mcp
What is Asterisk Bot Mcp
Asterisk-bot-mcp is a TypeScript Node.js server designed as a Management Control Program (MCP) for Asterisk servers, enabling interaction and management functionalities.
Use cases
Use cases include managing VoIP systems, automating call routing, monitoring call statuses, and integrating Asterisk with other applications or services.
How to use
To use asterisk-bot-mcp, clone the repository, install dependencies using ‘npm install’, configure environment variables in the .env file with your Asterisk AMI credentials, and run the server.
Key features
Key features include checking PJSIP endpoint registration status, creating and managing extensions, configuring ring groups, setting up call queues, modifying dialplan logic, and real-time call monitoring.
Where to use
Asterisk-bot-mcp can be used in telecommunications, VoIP services, and any environment requiring management of Asterisk servers.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Asterisk Bot Mcp
Asterisk-bot-mcp is a TypeScript Node.js server designed as a Management Control Program (MCP) for Asterisk servers, enabling interaction and management functionalities.
Use cases
Use cases include managing VoIP systems, automating call routing, monitoring call statuses, and integrating Asterisk with other applications or services.
How to use
To use asterisk-bot-mcp, clone the repository, install dependencies using ‘npm install’, configure environment variables in the .env file with your Asterisk AMI credentials, and run the server.
Key features
Key features include checking PJSIP endpoint registration status, creating and managing extensions, configuring ring groups, setting up call queues, modifying dialplan logic, and real-time call monitoring.
Where to use
Asterisk-bot-mcp can be used in telecommunications, VoIP services, and any environment requiring management of Asterisk servers.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Asterisk Bot MCP Server
This project is a TypeScript Node.js server designed to act as a Management Control Program (MCP) for an Asterisk server. It provides functionalities to interact with Asterisk.
Proof of Concept (POC) - Phase 1:
The initial version primarily focuses on a proof-of-concept command: checking PJSIP endpoint registration status. This serves as the first round of testing and establishes the foundational connection and interaction with Asterisk.
Future Vision:
The long-term goal is to develop this into a full-fledged MCP server. This advanced server will enable comprehensive control and management of an Asterisk instance, potentially through an interface suitable for interaction with Large Language Models (LLMs) like Claude. Planned capabilities include, but are not limited to:
- Creating and managing extensions (PJSIP and SIP)
- Configuring ring groups
- Setting up and managing call queues
- Modifying dialplan logic
- Real-time call monitoring and control
- And much more, providing a robust API for programmatic Asterisk administration.
This project aims to simplify complex Asterisk management tasks through a modern, programmatic interface.
Prerequisites
- Node.js (v16 or later recommended)
- npm (usually comes with Node.js)
- An Asterisk server with AMI (Asterisk Manager Interface) enabled and configured.
- For local development, you can run Asterisk in Docker, WSL, or a VM.
Setup
-
Clone the repository (if applicable) or ensure all files are in your project directory.
-
Install dependencies:
npm install -
Configure Environment Variables:
- Copy the
.env.examplefile to a new file named.env:# On Windows (PowerShell) Copy-Item .env.example .env # On macOS/Linux # cp .env.example .env - Edit the
.envfile with your Asterisk AMI credentials:
Ensure your AsteriskASTERISK_HOST=your_asterisk_ip_or_hostname ASTERISK_PORT=your_ami_port (default: 5038) ASTERISK_USERNAME=your_ami_username ASTERISK_SECRET=your_ami_secretmanager.confallows this user to connect from the host where this MCP server will run and has necessary read/write permissions (e.g.,system,call,config,reportingdepending on future needs. ForPJSIPShowEndpoints,systemorconfigread permissions are typically needed).
- Copy the
Available Scripts
-
Build the project:
npm run buildThis compiles TypeScript to JavaScript in the
distdirectory. -
Start the server (production mode):
npm run startThis runs the compiled code from the
distdirectory. -
Start the server (development mode):
npm run devThis uses
nodemonandts-nodeto run the server and automatically restart it on file changes in thesrcdirectory. -
Lint the code:
npm run lintThis checks the code for linting errors using ESLint.
-
Format the code:
npm run formatThis formats the code using Prettier.
-
Run tests:
npm run testThis executes tests using Jest.
-
Check PJSIP Registered Endpoints:
npm run check-endpointsThis script connects to the Asterisk server defined in your
.envfile, queries for PJSIP endpoints, and reports how many are currently considered registered.Note: This
check-endpointsscript is part of the initial proof-of-concept phase.
Asterisk Configuration Notes (manager.conf)
Ensure your Asterisk manager.conf has a user configured with appropriate permissions. For example:
[mcp_user] ; Corresponds to ASTERISK_USERNAME
secret = your_ami_secret ; Corresponds to ASTERISK_SECRET
permit = 0.0.0.0/0 ; Or a more specific IP/subnet for security
read = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate
write = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate
; Adjust read/write permissions as needed. For PJSIPShowEndpoints, 'system' or 'config' read is usually sufficient.
Reload Asterisk dialplan or manager settings after changes (manager reload in Asterisk CLI).
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










