Skip to content

Model Context Protocol (MCP) Developer & Integration Guide

10 min readUpdated: Nov 29, 2026
View as Markdown

Ring2All Model Context Protocol (MCP) provides an enterprise-governed, multi-tenant automation bus allowing AI assistants, IDEs, voice agents, and external workflows to inspect and operate the entire Ring2All ecosystem safely. Ring2All acts both as an Inbound MCP Server—exposing 1,367 governed MCP tools across all 7 platform servers (577 PBX tools, 226 SBC tools, 170 BSS tools, 139 NCX tools, 97 DMS tools, 80 NMS tools, and 78 CRM tools) to external clients like Claude Desktop, Cursor, VS Code, and ChatGPT—and an Outbound MCP Client connecting Voice AI Agents, Omnichannel Chatbots, and NCX Flows to your external CRMs and ERPs.


flowchart LR
    subgraph External["External LLM Clients & IDEs"]
        CD["Claude Desktop / Code"]
        CUR["Cursor IDE / VS Code"]
        GPT["ChatGPT Custom GPT"]
        SCRIPT["Automation / CI Scripts"]
    end

    subgraph Inbound["Ring2All Inbound MCP Servers (1,367 Total Tools)"]
        PBX["Ring2All PBX<br/>/api/mcp/sse & /execute<br/>577 Active Tools"]
        SBC["Ring2All SBC<br/>/api/mcp/*<br/>226 Perimeter Tools"]
        BSS["Ring2All BSS<br/>/api/v1/mcp/*<br/>170 Billing Tools"]
        NCX["Ring2All NCX<br/>/api/mcp/* (PBX Bridge)<br/>139 Contact Center Tools"]
        DMS["Ring2All DMS<br/>/api/v1/mcp/*<br/>97 Hardware Tools"]
        NMS["Ring2All NMS<br/>/api/mcp/*<br/>80 Orchestrator & Ops Tools"]
        CRM["Ring2All CRM<br/>/api/mcp/*<br/>78 Sales & Helpdesk Tools"]
    end

    subgraph Engine["Execution & Enforcement Layer"]
        RBAC["JWT + Personal Access Token +<br/>MCP Tool Role RBAC"]
        TENANT["Strict Tenant / Domain Isolation<br/>(domain_id / tenant_id)"]
        DATA["FreeSWITCH ESL • Kamailio binrpc •<br/>PostgreSQL 17 • OCS Rating • LiveKit"]
    end

    subgraph Outbound["Outbound MCP Clients (AI Tool Profiles & NCX Gateway)"]
        VOICE["Realtime Voice AI &<br/>Omnichannel Chatbots"]
        EXTMCP["Your Remote MCP Servers<br/>(ERP, Zendesk, Stripe, Custom)"]
    end

    CD & CUR -->|SSE Stream + JSON-RPC| PBX & SBC & BSS & NCX & DMS & NMS & CRM
    GPT -->|OpenAPI Schema /openapi.json| PBX
    SCRIPT -->|HTTPS POST /execute| PBX
    PBX & SBC & BSS & NCX & DMS & NMS & CRM --> RBAC --> TENANT --> DATA
    VOICE -->|AI Tool Profiles<br/>JSON-RPC tools/list & tools/call| EXTMCP

User Role Key Capabilities & Permissions
Platform Architect / DevOps Wire external IDEs, CI pipelines, and internal agents to Ring2All SSE and REST MCP endpoints with expiration-managed Bearer keys.
Security & Compliance Officer Enforce least-privilege execution using MCP Tool Roles (/admin/users/mcp-roles), read-only inspection modes, and immutable audit logs.
Contact Center & AI Engineer Register external CRM/ERP MCP servers in AI Tool Profiles or NCX MCP Gateway (tools/list) so voice & chat bots execute live lookups.
NOC VoIP Administrator Query live SIP endpoints, troubleshoot NAT/RTP one-way audio, inspect call flows, and review fax/CDR metrics conversationally.

Every external call to Ring2All MCP supports two authentication mechanisms:

  1. Scoped Personal Access Tokens (Recommended for External Clients): Generate in Admin → AI Integration → Platform AI Assistant (MCP Server) → External Connectors (IDE) (POST /api/mcp/generate-token), sent as Authorization: Bearer <YOUR_AI_TOKEN>.
  2. Standard Admin JWT Session Token: Used by the embedded Web UI AI Assistant and API automation (Authorization: Bearer <JWT>).

All tokens are evaluated against:

  • Tenant Isolation: Calls only inspect or mutate resources belonging to the token owner’s domain_id (unless Super Admin explicitly targets another tenant via x-domain-id).
  • MCP Tool Role RBAC: Category and read/write permissions configured under Admin → Users & RBAC → MCP Tool Roles are enforced on /api/mcp/sse, /api/mcp/messages, /api/mcp/execute, and /api/mcp/action/:toolName.

Endpoint Reference Across Ring2All Applications

Section titled “Endpoint Reference Across Ring2All Applications”
Application Active Tools Categories SSE Transport Tool Catalog Direct Execution OpenAPI / Custom GPT
Ring2All PBX 577 22 GET /api/mcp/sse GET /api/mcp/tools POST /api/mcp/execute GET /api/mcp/openapi.json
Ring2All SBC 226 58 GET /api/mcp/sse GET /api/mcp/tools POST /api/mcp/execute —
Ring2All BSS 170 10 GET /api/v1/mcp/sse GET /api/v1/mcp/tools POST /api/v1/mcp/execute —
Ring2All NCX 139 12 GET /api/mcp/sse GET /api/mcp/tools POST /api/mcp/execute —
Ring2All DMS 97 8 GET /api/v1/mcp/sse GET /api/v1/mcp/tools POST /api/v1/mcp/execute —
Ring2All NMS 80 9 GET /api/mcp/sse GET /api/mcp/tools POST /api/mcp/execute —
Ring2All CRM 78 8 GET /api/mcp/sse GET /api/mcp/tools POST /api/mcp/execute —
Ecosystem Total 1,367 127 Standard MCP SSE + Streamable HTTP Dynamic RBAC-Filtered Deterministic JSON OAuth 2.1 PKCE + Bearer

[!TIP] You can inspect your live server URLs and download pre-filled JSON configs directly from Admin → AI Integration → Platform AI Assistant (MCP Server) → External Connectors (IDE) or via GET /api/mcp/external-config.


1. Claude Desktop (claude_desktop_config.json)

Section titled “1. Claude Desktop (claude_desktop_config.json)”

Add Ring2All PBX (and optionally Ring2All SBC or BSS) as remote SSE MCP servers in ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
"mcpServers": {
"ring2all-pbx": {
"url": "https://pbx.example.com/api/mcp/sse",
"headers": {
"Authorization": "Bearer YOUR_PBX_MCP_TOKEN"
}
},
"ring2all-sbc": {
"url": "https://sbc.example.com/api/mcp/sse",
"headers": {
"Authorization": "Bearer YOUR_SBC_MCP_TOKEN"
}
}
}
}

Example prompts in Claude Desktop:

  • “Check all SIP extensions registered on main.local that are experiencing high RTT or unreachable status, then run diagnose_media_nat.”
  • “List all active NCX call center queues and tell me which queue has the highest SLA breach rate today.”
  • “Show the last 10 blocked SIP flood IPs in Ring2All SBC Pike anti-fraud table.”

2. Cursor IDE & Claude Code (.cursor/mcp.json / .mcp.json)

Section titled “2. Cursor IDE & Claude Code (.cursor/mcp.json / .mcp.json)”

Enable full-stack VoIP troubleshooting directly inside Cursor IDE or Claude Code by dropping .cursor/mcp.json in your workspace root:

{
"mcpServers": {
"ring2all-pbx": {
"type": "sse",
"url": "https://pbx.example.com/api/mcp/sse",
"headers": {
"Authorization": "Bearer YOUR_PBX_MCP_TOKEN"
}
},
"ring2all-bss": {
"type": "sse",
"url": "https://bss.example.com/api/v1/mcp/sse",
"headers": {
"Authorization": "Bearer YOUR_BSS_MCP_TOKEN"
}
}
}
}

3. VS Code (settings.json / .vscode/mcp.json)

Section titled “3. VS Code (settings.json / .vscode/mcp.json)”

For Visual Studio Code MCP support:

{
"servers": {
"ring2all-pbx": {
"type": "sse",
"url": "https://pbx.example.com/api/mcp/sse",
"headers": {
"Authorization": "Bearer YOUR_PBX_MCP_TOKEN"
}
}
}
}

Every tool exposed over SSE can also be invoked deterministically via standard HTTPS POST /api/mcp/execute — ideal for CI pipelines, Slack/Teams bots, or webhook responders.

Step A: List Available Tools (Filtered by Category)

Section titled “Step A: List Available Tools (Filtered by Category)”
Terminal window
curl -sS "https://pbx.example.com/api/mcp/tools?category=telephony" \
-H "Authorization: Bearer YOUR_PBX_MCP_TOKEN" | jq '.tools[:5]'

Step B: Execute a Diagnostic Tool (query_sip_endpoints)

Section titled “Step B: Execute a Diagnostic Tool (query_sip_endpoints)”
Terminal window
curl -sS -X POST "https://pbx.example.com/api/mcp/execute" \
-H "Authorization: Bearer YOUR_PBX_MCP_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tool": "query_sip_endpoints",
"args": {
"filter": "registered"
}
}' | jq

Step C: Provision a Virtual Fax Endpoint with Collision Guardrails

Section titled “Step C: Provision a Virtual Fax Endpoint with Collision Guardrails”
Terminal window
curl -sS -X POST "https://pbx.example.com/api/mcp/execute" \
-H "Authorization: Bearer YOUR_PBX_MCP_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tool": "create_fax_device",
"args": {
"name": "Finance AP Virtual Fax",
"number": "4088",
"type": "VIRTUAL",
"direction": "both",
"emailTo": "ap-faxes@company.com",
"t38Enabled": true,
"convertToPdf": true
}
}' | jq
Terminal window
# Create a 90-day Personal Access Token (requires Admin JWT)
curl -sS -X POST "https://pbx.example.com/api/mcp/generate-token" \
-H "Authorization: Bearer ADMIN_JWT" \
-H "Content-Type: application/json" \
-d '{"name":"Nightly Audit Script","expiresInDays":90}'
# List active tokens
curl -sS "https://pbx.example.com/api/mcp/tokens" \
-H "Authorization: Bearer ADMIN_JWT"
# Revoke a token by ID
curl -sS -X DELETE "https://pbx.example.com/api/mcp/tokens/12" \
-H "Authorization: Bearer ADMIN_JWT"

5. ChatGPT Custom GPT Actions (OpenAPI 3.1 Schema)

Section titled “5. ChatGPT Custom GPT Actions (OpenAPI 3.1 Schema)”

Ring2All PBX automatically generates a filtered OpenAPI 3.1 schema tailored for OpenAI ChatGPT Custom GPT Actions (which enforce a maximum of 30 operations per GPT Action):

Default curated 30-operation GPT Action schema:
https://pbx.example.com/api/mcp/openapi.json
Filter by operational domain:
https://pbx.example.com/api/mcp/openapi.json?category=telephony
https://pbx.example.com/api/mcp/openapi.json?category=extensions
https://pbx.example.com/api/mcp/openapi.json?category=call-center
Full unrestricted schema (for LangChain / LlamaIndex / OpenAPI codegen):
https://pbx.example.com/api/mcp/openapi.json?all=true

Setup steps in ChatGPT:

  1. Create a new GPT → Configure → Actions → Create new action.
  2. Click Import from URL and paste https://pbx.example.com/api/mcp/openapi.json?category=call-center.
  3. Under Authentication, choose API Key → Bearer and paste your Personal Access Token generated in Tab 3.
  4. Prompt ChatGPT: “Summarize today’s queue abandonment and check which NCX agents are currently paused.”

Outbound MCP Clients: Connecting Ring2All AI Agents & NCX to Your External Systems

Section titled “Outbound MCP Clients: Connecting Ring2All AI Agents & NCX to Your External Systems”

In addition to exposing internal telecom tools, Ring2All AI Tool Profiles and the NCX Omnichannel MCP Gateway allow Ring2All Voice Agents, Web/WhatsApp Chatbots, and NCX Flows to call your external MCP servers (such as HubSpot, Salesforce, Zendesk, Shopify, Stripe, or custom microservice MCP gateways).

Remote MCP Server Configuration (tools/list Auto-Discovery)

Section titled “Remote MCP Server Configuration (tools/list Auto-Discovery)”

When creating a profile in Admin → AI Integration → AI Tool Profiles:

  1. Select Connector Type: Remote MCP Server.
  2. Enter your external server URL (e.g., https://crm-mcp.internal.company.com/mcp) and bearer/API header credentials.
  3. Click Discover Tools (tools/list). Ring2All sends a JSON-RPC 2.0 tools/list probe:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}
  1. Ring2All parses each tool schema (name, description, inputSchema), registers them into the AI Agent’s function-calling manifest, and automatically invokes JSON-RPC tools/call whenever a caller asks to check an order status, verify an invoice balance, or open a support ticket.

Server CLI MCP Assistant (mcp-assistant / ss_cmd mcp)

Section titled “Server CLI MCP Assistant (mcp-assistant / ss_cmd mcp)”

In addition to HTTP/SSE transport, softswitch-pbx-api installs standalone terminal binaries on the PBX host (/usr/local/bin/mcp-assistant, /usr/local/bin/ring2all-copilot, /usr/local/bin/softswitch-mcp, and ss_cmd mcp) running directly inside the bundled CLI engine with automatic tenant/domain context resolution:

Terminal window
# Inspect registered PBX MCP tools, system health, tenants, and domains
mcp-assistant --tools
mcp-assistant --status
mcp-assistant --tenants
mcp-assistant --domains
# Execute a one-shot natural language query scoped to a tenant or domain
mcp-assistant -t 1 "List registered extensions and active SIP registrations"
mcp-assistant -d pbx.example.com -v "Show today's CDR summary"
# Launch the interactive REPL console (uses /help, /tenants, /domains, /tenant, /domain, /context, /tools, /status, /clear, /exit)
mcp-assistant
# Or invoke identically via the unified system CLI:
ss_cmd mcp --status

[!WARNING] Least-Privilege Tokens: Always assign a dedicated non-superuser MCP Tool Role before distributing Personal Access Tokens to external developers or GPTs. Never grant delete_* or hangup_call permissions to read-only monitoring bots.

  1. Always Enforce HTTPS: Never expose /api/mcp/sse over plain HTTP in production; terminate TLS at Nginx with valid certificates.
  2. Scoped Expirations: Issue short-lived tokens (30 or 90 days) and revoke unused keys in External Connectors (IDE).
  3. Interactive Safety Prompts: Keep Require Confirmation for Mutating Actions enabled for human AI Assistant users so accidental destructive phrases require confirmation.
  4. Monitor Rate & Execution Logs: Audit every external tool invocation in Admin → Logs & Audit alongside tenant security alerts.

What is the difference between /api/mcp/sse and /api/mcp/execute?

Section titled “What is the difference between /api/mcp/sse and /api/mcp/execute?”

/api/mcp/sse + /api/mcp/messages implements the stateful official Model Context Protocol (MCP) transport expected by Claude Desktop, Cursor IDE, and VS Code, where clients discover schemas dynamically (tools/list) and invoke them over SSE. POST /api/mcp/execute is a stateless HTTP RPC endpoint ideal for scripts, webhooks, and custom backends.

Why does /api/mcp/openapi.json return 30 tools by default while the catalog shows 577 PBX tools?

Section titled “Why does /api/mcp/openapi.json return 30 tools by default while the catalog shows 577 PBX tools?”

ChatGPT Custom GPT Actions enforce a hard limit of 30 operations per schema import. Ring2All’s default /api/mcp/openapi.json returns the 30 highest-impact operational tools cleanly while supporting ?category=... or ?all=true for larger orchestrators.

Can external MCP tools access multiple tenants from one token?

Section titled “Can external MCP tools access multiple tenants from one token?”

No. External Personal Access Tokens inherit the issuing administrator’s tenant boundary (domain_id), guaranteeing strict multi-tenant isolation by default.