Repository navigation
Backlog
Backlog
Copy link
Labels
More effortA label linked to issues that are not milestone goals but require significant development effortnethvoiceBug or features releted to the NethVoice project
Milestone
Description
Description
We propose adding a Model Context Protocol (MCP) server to the new NethVoice administration interface on NethServer 8. It would let an MCP-compatible AI assistant (such as Claude, another MCP client, or an assistant built into the interface) read and change the PBX configuration.
The MCP server adds no new configuration logic of its own. It offers the REST APIs that the new interface and the wizard already use as MCP tools. Validation, permissions and the "apply configuration" flow therefore stay exactly the same.
Motivation
- Faster setup. Repetitive tasks such as creating 50 extensions, assigning profiles or configuring trunks can be requested in plain language ("create extensions 201 to 250 for the users in the Sales group").
- Support and troubleshooting. The assistant can read the PBX state (trunk registrations, devices, routes) and help find the cause of common problems.
- Easier onboarding for installers who don't know the interface well yet.
- Integration with the AI tools that partners and customers already use.
Proposal
Architecture
- An MCP server shipped with the
ns8-nethvoicemodule, either as an extra service in the container or as an endpoint of the admin backend. - Streamable HTTP transport, exposed through Traefik on the NethVoice admin host (e.g.
https://<nethvoice-host>/mcp). - Each tool calls the existing backend APIs. Nothing accesses the FreePBX/Asterisk database directly.
- Optional, enabled from the module settings and off by default.
Tools (first version)
Read-only
get_pbx_status: overall status, version, registered extensions, trunks online/offlinelist_users/get_user: users, extensions, profile, linked deviceslist_trunks/get_trunk: SIP trunks and their registration statuslist_inbound_routes/list_outbound_routeslist_groups,list_queues,list_ivrlist_devices: provisioned phones with model, MAC and assigned userlist_profiles: permission profiles (Base, Standard, Advanced, custom)
Write
create_extension/update_extension/delete_extensionassign_device: link a phone (MAC/model) to a usercreate_trunk/update_trunkcreate_inbound_route/create_outbound_routecreate_group,update_group_membersset_user_profileapply_configuration: same as the "Apply configuration" button
MCP resources (optional)
- NethVoice documentation and the list of supported phone models, as context for the assistant.
Security
- Authentication: OAuth 2.1 or a personal access token generated from the admin interface, with an expiry date and the option to revoke it.
- Authorization: the same RBAC rules as the interface. A token can also be limited to read-only.
- Destructive operations (
delete_*,apply_configuration): marked as such in the tool metadata (destructiveHint) so the client asks for explicit confirmation. - Audit log: every MCP call that changes the configuration is logged with user, tool, parameters and timestamp. The log can be viewed from the interface.
- Rate limiting on the MCP endpoint.
- Read tools never return secrets (SIP passwords, trunk credentials) in clear text.
User interface
- A new Settings → Integrations → MCP section with:
- an enable/disable toggle
- the endpoint URL, ready to copy
- token management (create, revoke, read/write scope)
- sample configurations for popular MCP clients
- a link to the audit log
Acceptance criteria
- The MCP server can be turned on and off from the module settings and is off by default
- A standard MCP client can connect with a valid token and list the tools
- Read tools return the same data the interface shows
- Write tools go through the existing APIs and apply the same validation
- A read-only token cannot call write tools
- Destructive operations are marked correctly and recorded in the audit log
- No secrets are returned in clear text
- Documentation added to the NethVoice NS8 guide
Out of scope (for now)
- Editing the Visual Plan or complex call flows
- CTI features (calls, presence, user phonebook)
- Direct access to advanced FreePBX settings
- An AI assistant built into the interface (separate issue, if wanted)
Open questions
- Should the MCP server live in the NethVoice container or in a separate NS8 module?
- Should we use the NS8 cluster's OIDC authentication or a dedicated token system?
- Do we need a "dry run" mode that shows the changes before they are applied?
- Should CDR/reports also be exposed as read-only?
References
- Model Context Protocol: https://modelcontextprotocol.io
- Module repository: https://github.com/nethesis/ns8-nethvoice
- NethVoice NS8 documentation: https://ns8.nethserver.org/en/latest/nethvoice.html
Metadata
Metadata
Assignees
Labels
More effortA label linked to issues that are not milestone goals but require significant development effortnethvoiceBug or features releted to the NethVoice project
Type
Projects
- StatusShow more project fieldsTodo
Activity
andrea-marchionni commentedon Dec 4, 2026
See also #8415