Skip to content

NethVoice: Add an MCP server to configure the PBX from the new interface #8416

Backlog

Description

@andrea-marchionni

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-nethvoice module, 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/offline
  • list_users / get_user: users, extensions, profile, linked devices
  • list_trunks / get_trunk: SIP trunks and their registration status
  • list_inbound_routes / list_outbound_routes
  • list_groups, list_queues, list_ivr
  • list_devices: provisioned phones with model, MAC and assigned user
  • list_profiles: permission profiles (Base, Standard, Advanced, custom)

Write

  • create_extension / update_extension / delete_extension
  • assign_device: link a phone (MAC/model) to a user
  • create_trunk / update_trunk
  • create_inbound_route / create_outbound_route
  • create_group, update_group_members
  • set_user_profile
  • apply_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

Activity

  1. added
    nethvoice
    on Dec 4, 2026
  2. andrea-marchionni commented on Dec 4, 2026

    @andrea-marchionni
    Author

    See also #8415

  3. added
    More effort
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    More effortnethvoice

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions