Skip to content

NethVoice: add MCP server connection for debugging in the new administration interface #8415

Backlog

Description

@andrea-marchionni

Description

Add a section to the new NethVoice admin interface where the administrator can turn on and set up a connection to an MCP (Model Context Protocol) server for debugging.

With this connection, an AI assistant (Claude, Copilot, Cursor, etc.) could read diagnostic data from the PBX. Support staff and administrators could then use it to find out why something isn't working (failed calls, unregistered extensions, trunks down, provisioning errors), with no need to open an SSH session and look through logs by hand.

This is part of the admin interface redesign (see #7574).

Motivation

  • Debugging NethVoice today often needs shell access and knowing where each container's logs are (Asterisk, Kamailio/proxy, FreePBX, CTI server, Tancredi).
  • An MCP server lets an AI client look up the PBX state through controlled tools (read-only by default), so diagnosis is faster.
  • Putting the setup in the admin interface makes the feature easy to find and to manage, and allows access to be revoked.

Proposed solution

UI: new "Debug / MCP" section

In the new admin interface (e.g. under Settings → Advanced → Debug):

  • Enable/disable toggle for the MCP endpoint (off by default)
  • Shows the MCP server URL (e.g. https://<nethvoice-fqdn>/mcp) with a copy button
  • Access token creation and revocation, with optional expiry (e.g. 1h / 24h / 7 days)
  • A ready-to-copy mcp.json snippet for the most common clients, e.g.:
    {
      "mcpServers": {
        "nethvoice-debug": {
          "url": "https://<nethvoice-fqdn>/mcp",
          "headers": { "Authorization": "Bearer <token>" }
        }
      }
    }
  • Connection status (last access, active client)
  • Link to the documentation

Backend / MCP tools (initial proposal, read-only)

  • get_extensions_status: extension registration status
  • get_trunks_status: trunk/SIP peer status
  • get_active_channels: calls in progress
  • get_logs: filtered logs per service (asterisk, proxy, freepbx, cti, tancredi) with time range and limit
  • get_cdr: CDR search by number/time range
  • get_provisioning_info: provisioning state of a device (MAC)
  • get_system_info: module version, NS8 node, service status

Security

  • The endpoint is off by default; enabling it requires admin rights
  • Temporary token authentication, revocable from the UI
  • Read-only tools in the first version; any actions that write data go in a later issue with explicit confirmation
  • Masking of sensitive data in the output (SIP passwords, secrets, tokens)
  • Audit log of the calls made through MCP
  • Optional: limit access by IP / available only on the internal network

Acceptance criteria

  • The administrator can turn the MCP endpoint on and off from the new interface
  • The administrator can create, copy and revoke an access token
  • An MCP client set up with the provided snippet connects and can list the available tools
  • The tools return correct data, with secrets masked
  • A revoked or expired token is refused
  • Documentation updated (admin manual + client configuration guide)

References

Activity

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

    @andrea-marchionni
    Author

    See also #8416

  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