pbx-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ASTERISK_AMI_TLS | No | Set 'true' if tlsenable=yes. | false |
| ASTERISK_AMI_HOST | No | Hostname or IP of the Asterisk box. Required to enable Asterisk tools. | |
| ASTERISK_AMI_PORT | No | AMI port from manager.conf. | 5038 |
| PBX_MCP_TIMEOUT_MS | No | Per command timeout. | 10000 |
| FREESWITCH_ESL_HOST | No | Hostname or IP of the switch. Required to enable FreeSWITCH tools. | |
| FREESWITCH_ESL_PORT | No | Inbound ESL port. | 8021 |
| PBX_MCP_ALLOW_WRITE | No | Unlocks call control. Read the safety section first. | false |
| ASTERISK_AMI_PASSWORD | No | AMI secret. | |
| ASTERISK_AMI_USERNAME | No | AMI user. | |
| FREESWITCH_ESL_PASSWORD | No | From event_socket.conf.xml. | ClueCon |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| asterisk_statusA | Core status of the Asterisk server: version, uptime, active calls and calls processed. Use this first to confirm the PBX is reachable before running other Asterisk tools. |
| asterisk_channelsA | Every channel currently up on the PBX, with caller ID, state, bridge, duration and the dialplan location it is sitting in. This is the tool for 'what calls are live right now'. |
| asterisk_endpointsA | PJSIP endpoints with their device state and how many contacts are registered. Use this to answer 'is extension 1001 registered' or 'which phones are offline'. Falls back to chan_sip peers on older installations. |
| asterisk_dialplanA | Dump the dialplan for a context, or for one extension within a context. Useful for tracing where a call would go before placing it. |
| asterisk_cliB | Run a command through the Asterisk CLI and return its raw output. In the default read-only mode only inspection commands such as 'core show', 'pjsip show' and 'queue show' are permitted. Set PBX_MCP_ALLOW_WRITE=true to lift that restriction. |
| asterisk_hangup_previewA | Show which live channels a hangup would affect, without touching them. Takes the same channel argument as asterisk_hangup and reports the exact match plus any near misses, so you can see the blast radius before dropping a call. Always available, including in read-only mode. |
| freeswitch_statusA | Core status of the FreeSWITCH server: version, uptime, current and maximum sessions. Use this first to confirm the switch is reachable before running other FreeSWITCH tools. |
| freeswitch_channelsA | Every call leg currently up on the switch, as returned by 'show channels'. This is the tool for 'what calls are live right now' on FreeSWITCH. |
| freeswitch_registrationsA | Registered SIP users on a Sofia profile, with contact URI, user agent and expiry. Use this to answer 'is this extension registered' or 'which devices dropped off'. |
| freeswitch_sofia_statusA | State of every Sofia SIP profile and gateway, including whether trunks are registered upstream. This is where to look when outbound calls fail but the switch itself is healthy. |
| freeswitch_apiA | Run a command through the FreeSWITCH event socket and return its raw output. In the default read-only mode only inspection commands such as 'status', 'show' and 'sofia status' are permitted. Set PBX_MCP_ALLOW_WRITE=true to lift that restriction. |
| freeswitch_hangup_previewA | Show which live call legs a hangup would affect, without touching them. Takes the same UUID argument as freeswitch_hangup and reports the matching channel plus the leg it is bridged to, so you can see the blast radius first. Always available, including in read-only mode. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 12 tools
Tools are cleanly partitioned by platform prefix (asterisk_* vs freeswitch_*) and each resource is distinct: channels vs endpoints vs status vs sofia profiles answer different questions. The main overlap is that asterisk_cli/freeswitch_api can reproduce nearly everything the specialized tools do, but the descriptions steer agents toward the purpose-built tools and the read-only default limits the damage.
Consistent snake_case with a predictable platform_resource pattern (asterisk_channels, freeswitch_registrations, etc.), mirrored neatly across both subsystems. The only blemish is that the raw-command tool is called asterisk_cli on one side and freeswitch_api on the other, so the parallel naming breaks for that one pair.
12 tools split roughly six-and-six across two PBX platforms, with each tool earning its place (status, channels, registrations, dialplan/profiles, raw command, hangup preview). Well within a comfortable range for the scope.
Both *_hangup_preview tools explicitly reference an asterisk_hangup / freeswitch_hangup counterpart that does not exist in the surface, leaving the previews as dead ends an agent cannot act on. Read-only inspection is otherwise well covered, but there is no originate, no queue/voicemail-specific tools, and no write path beyond flipping the raw CLI/API escape hatch.