Skip to main content
Glama
oitvoip-mcp-server

oitvoip-mcp-server

Official
by OITApps

OITVOIP MCP Server

License: MIT TypeScript NetSapiens API v2 MCP Protocol

šŸŽÆ Production-Ready NetSapiens Integration
Comprehensive MCP server providing AI agents with full access to NetSapiens VoIP platform

A Model Context Protocol (MCP) server that provides AI agents with seamless access to the NetSapiens VoIP platform. This server enables AI applications to interact with NetSapiens functionality including user management, call detail records, and system information.

⚔ Features

  • šŸ‘„ User Management: Search users, get details, devices, answer rules, greetings, and voicemails

  • šŸ“ž Phone Number Management: List and manage phone numbers across domains

  • šŸŽÆ Call Center Operations: Manage call queues, agents, login/logout, and statistics

  • šŸ“Š Call Analytics: Access CDR records, agent statistics, and call patterns

  • šŸ¢ Domain Administration: Complete domain management and configuration

  • šŸ¤– Auto Attendant: Configure and manage automated attendants

  • šŸŽµ Media Management: Handle greetings, voicemail, and music on hold

  • šŸ’° Billing Integration: Access billing information and usage data

  • šŸ”§ Real-time Operations: Live access to NetSapiens platform data

  • ⚔ Error Handling: Robust error handling with detailed logging

  • šŸ›”ļø Rate Limiting: Built-in rate limiting for API protection

  • šŸ“ TypeScript: Full TypeScript support with comprehensive type safety

Related MCP server: VoIPBin MCP Server

šŸ—ļø Architecture

oitvoip-mcp-server/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ index.ts              # Main MCP server implementation
│   └── netsapiens-client.ts  # NetSapiens API client
ā”œā”€ā”€ types/
│   └── config.ts             # TypeScript type definitions
ā”œā”€ā”€ docs/                     # Documentation
ā”œā”€ā”€ build/                    # Compiled JavaScript output
ā”œā”€ā”€ package.json              # Project dependencies
ā”œā”€ā”€ tsconfig.json             # TypeScript configuration
└── README.md                 # This file

šŸš€ Quick Start

Prerequisites

  • Node.js 18.0.0 or higher

  • npm or yarn package manager

  • NetSapiens API credentials

Installation

npm install -g oitvoip-mcp-server

Option 2: From Source

  1. Clone the repository

    git clone https://github.com/OITApps/oitvoip-mcp-server.git
    cd oitvoip-mcp-server
  2. Install dependencies

    npm install
  3. Build the project

    npm run build
  4. Configure in your MCP client

    Add the server to your MCP client configuration with your NetSapiens credentials (see MCP Client Setup section below)

Development Mode

For development with hot reloading:

npm run dev

šŸ”§ Configuration

This MCP server is configured entirely through your MCP client's configuration file. No separate .env file is needed - all configuration is passed through environment variables in the MCP client config.

Required Configuration

  • NETSAPIENS_API_URL: Your NetSapiens API endpoint (usually https://api.ucaasnetwork.com)

  • NETSAPIENS_API_TOKEN: Your NetSapiens API token

Optional Configuration

  • DEBUG: Set to true to enable debug logging (default: false)

  • NETSAPIENS_TIMEOUT: API request timeout in milliseconds (default: 30000)

šŸ”Œ MCP Client Setup

OpenCode

For OpenCode, add the MCP server to your configuration file at ~/.opencode/mcp.json:

If installed via npm:

{
  "mcpServers": {
    "oitvoip": {
      "command": "oitvoip-mcp-server",
      "env": {
        "NETSAPIENS_API_URL": "https://api.ucaasnetwork.com",
        "NETSAPIENS_API_TOKEN": "your_api_token_here"
      }
    }
  }
}

If installed from source:

{
  "mcpServers": {
    "oitvoip": {
      "command": "node",
      "args": ["/path/to/oitvoip-mcp-server/build/index.js"],
      "env": {
        "NETSAPIENS_API_URL": "https://api.ucaasnetwork.com",
        "NETSAPIENS_API_TOKEN": "your_api_token_here"
      }
    }
  }
}

Claude Desktop

For Claude Desktop, add the server to your configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

If installed via npm:

{
  "mcpServers": {
    "oitvoip": {
      "command": "oitvoip-mcp-server",
      "env": {
        "NETSAPIENS_API_URL": "https://api.ucaasnetwork.com",
        "NETSAPIENS_API_TOKEN": "your_api_token_here"
      }
    }
  }
}

If installed from source:

{
  "mcpServers": {
    "oitvoip": {
      "command": "node",
      "args": ["/path/to/oitvoip-mcp-server/build/index.js"],
      "env": {
        "NETSAPIENS_API_URL": "https://api.ucaasnetwork.com",
        "NETSAPIENS_API_TOKEN": "your_api_token_here"
      }
    }
  }
}

Cursor

For Cursor, add the server to your MCP configuration file at ~/.cursor/mcp.json:

If installed via npm:

{
  "mcpServers": {
    "oitvoip": {
      "command": "oitvoip-mcp-server",
      "env": {
        "NETSAPIENS_API_URL": "https://api.ucaasnetwork.com",
        "NETSAPIENS_API_TOKEN": "your_api_token_here"
      }
    }
  }
}

If installed from source:

{
  "mcpServers": {
    "oitvoip": {
      "command": "node",
      "args": ["/path/to/oitvoip-mcp-server/build/index.js"],
      "env": {
        "NETSAPIENS_API_URL": "https://api.ucaasnetwork.com",
        "NETSAPIENS_API_TOKEN": "your_api_token_here"
      }
    }
  }
}

Configuration Notes

  • Replace /path/to/oitvoip-mcp-server with the actual path to your installation

  • Replace your_api_token_here with your actual NetSapiens API token

  • All configuration is handled through the MCP client - no separate .env file is needed

  • After configuration, restart your MCP client to load the server

šŸ› ļø Available Tools (23 Total)

šŸ‘„ User Management

1. Search Users

Search for users in the NetSapiens system by username.

{
  "name": "search_users",
  "arguments": {
    "query": "john.doe",
    "domain": "company.com",
    "limit": 20
  }
}

2. Get User Details

Retrieve detailed information about a specific user.

{
  "name": "get_user",
  "arguments": {
    "userId": "john.doe",
    "domain": "company.com"
  }
}

3. Get User Devices

Get devices assigned to a specific user.

{
  "name": "get_user_devices",
  "arguments": {
    "userId": "john.doe",
    "domain": "company.com"
  }
}

šŸ“ž Phone Number Management

4. Get Phone Numbers

Get phone numbers for a domain.

{
  "name": "get_phone_numbers",
  "arguments": {
    "domain": "company.com",
    "limit": 50
  }
}

5. Get Phone Number Details

Get details of a specific phone number.

{
  "name": "get_phone_number",
  "arguments": {
    "domain": "company.com",
    "phoneNumber": "+15551234567"
  }
}

šŸ¢ Domain Management

6. Get Domains

Get list of domains in the NetSapiens system.

{
  "name": "get_domains",
  "arguments": {}
}

7. Get Domain Details

Get detailed information about a specific domain.

{
  "name": "get_domain",
  "arguments": {
    "domain": "company.com"
  }
}

šŸŽÆ Call Center Management

8. Get Call Queues

Get call queues for a domain.

{
  "name": "get_call_queues",
  "arguments": {
    "domain": "company.com"
  }
}

9. Get Call Queue Details

Get details of a specific call queue.

{
  "name": "get_call_queue",
  "arguments": {
    "domain": "company.com",
    "queueId": "sales-queue"
  }
}

10. Get Call Queue Agents

Get agents assigned to a call queue.

{
  "name": "get_call_queue_agents",
  "arguments": {
    "domain": "company.com",
    "queueId": "sales-queue"
  }
}

11. Get Agents

Get agents for a domain.

{
  "name": "get_agents",
  "arguments": {
    "domain": "company.com"
  }
}

12. Login Agent

Login an agent to a call queue.

{
  "name": "login_agent",
  "arguments": {
    "domain": "company.com",
    "queueId": "sales-queue",
    "agentId": "agent001"
  }
}

13. Logout Agent

Logout an agent from a call queue.

{
  "name": "logout_agent",
  "arguments": {
    "domain": "company.com",
    "queueId": "sales-queue",
    "agentId": "agent001"
  }
}

šŸ“Š Call Analytics

14. Get CDR Records

Retrieve call detail records with optional filtering.

{
  "name": "get_cdr_records",
  "arguments": {
    "startDate": "2024-01-01",
    "endDate": "2024-01-31",
    "user": "john.doe",
    "domain": "company.com",
    "limit": 100
  }
}

15. Get Agent Statistics

Get agent statistics for a domain.

{
  "name": "get_agent_statistics",
  "arguments": {
    "domain": "company.com",
    "agentId": "agent001"
  }
}

šŸ¤– Auto Attendant

16. Get Auto Attendants

Get auto attendants for a domain.

{
  "name": "get_auto_attendants",
  "arguments": {
    "domain": "company.com"
  }
}

šŸ“‹ Answer Rules

17. Get User Answer Rules

Get answer rules for a user.

{
  "name": "get_user_answer_rules",
  "arguments": {
    "userId": "john.doe",
    "domain": "company.com"
  }
}

18. Get User Answer Rule

Get specific answer rule for a user.

{
  "name": "get_user_answer_rule",
  "arguments": {
    "userId": "john.doe",
    "domain": "company.com",
    "timeframe": "business"
  }
}

šŸŽµ Media Management

19. Get User Greetings

Get greetings for a user.

{
  "name": "get_user_greetings",
  "arguments": {
    "userId": "john.doe",
    "domain": "company.com"
  }
}

20. Get User Voicemails

Get voicemails for a user.

{
  "name": "get_user_voicemails",
  "arguments": {
    "userId": "john.doe",
    "domain": "company.com"
  }
}

21. Get Music on Hold

Get music on hold files for a domain.

{
  "name": "get_music_on_hold",
  "arguments": {
    "domain": "company.com"
  }
}

šŸ’° Billing

22. Get Billing

Get billing information for a domain.

{
  "name": "get_billing",
  "arguments": {
    "domain": "company.com"
  }
}

šŸ”§ System

23. Test Connection

Test connectivity to the NetSapiens API.

{
  "name": "test_connection",
  "arguments": {}
}

šŸ“ API Examples

Searching for Users

// Search for users with "john" in a specific domain
const result = await mcp.callTool('search_users', {
  query: 'john',
  domain: 'company.com',
  limit: 10
});

Getting User Details

// Get detailed information about a specific user
const result = await mcp.callTool('get_user', {
  userId: 'john.doe',
  domain: 'company.com'
});

Getting Call Records

// Get call records for a specific user in the last month
const result = await mcp.callTool('get_cdr_records', {
  startDate: '2024-01-01',
  endDate: '2024-01-31',
  user: 'john.doe',
  domain: 'company.com'
});

Getting User Devices

// Get devices assigned to a user
const result = await mcp.callTool('get_user_devices', {
  userId: 'john.doe',
  domain: 'company.com'
});

šŸƒā€ā™‚ļø Development

Available Scripts

  • npm run build - Compile TypeScript to JavaScript

  • npm run dev - Run in development mode with hot reloading

  • npm start - Run the compiled server

  • npm run watch - Watch mode for development

  • npm run clean - Clean build directory

Project Structure

src/
ā”œā”€ā”€ index.ts                 # Main server entry point
ā”œā”€ā”€ netsapiens-client.ts     # NetSapiens API client
└── tools/                   # Individual tool implementations

types/
ā”œā”€ā”€ config.ts               # Configuration types
└── netsapiens.ts           # NetSapiens API types

Adding New Tools

  1. Define the tool in the ListToolsRequestSchema handler

  2. Add a handler method in the CallToolRequestSchema handler

  3. Implement the tool logic in the NetSapiens client

  4. Update type definitions as needed

šŸ”’ Security

šŸ” MCP Security Best Practices

  • API Tokens: Configure your NetSapiens API tokens securely in your MCP client configuration

  • Token Security: Use strong API tokens and rotate them regularly

  • Access Control: Ensure API tokens have minimal required permissions

  • Rate Limiting: Built-in rate limiting prevents API abuse

  • Error Handling: Secure error logging without exposing sensitive data

  • Input Validation: All inputs are validated before processing

🚨 Security Guidelines

  1. Secure MCP Configuration: Store your MCP client configuration files securely

  2. Strong API Tokens: Use secure NetSapiens API tokens and rotate regularly

  3. Monitor Access: Check NetSapiens access logs for unauthorized usage

  4. Regular Audits: Run npm audit regularly for dependency vulnerabilities

  5. Keep Updated: Maintain latest versions for security patches

  6. HTTPS Only: All API communications use secure HTTPS connections

  7. Environment Isolation: Use different tokens for development/production environments

šŸ› Troubleshooting

Common Issues

  1. Connection Failed

    • Verify your API URL and token in .env

    • Check network connectivity to NetSapiens server

    • Ensure API token has proper permissions

  2. Build Errors

    • Run npm run clean and rebuild

    • Check TypeScript configuration

    • Verify all dependencies are installed

  3. Tool Not Found

    • Ensure the tool name matches exactly

    • Check the tool is properly registered in ListToolsRequestSchema

Debug Mode

Enable debug logging by setting DEBUG=true in your .env file:

DEBUG=true

šŸ“š Documentation

šŸ¤ Contributing

  1. Fork the repository

  2. Create a feature branch (git checkout -b feature/amazing-feature)

  3. Commit your changes (git commit -m 'Add some amazing feature')

  4. Push to the branch (git push origin feature/amazing-feature)

  5. Open a Pull Request

šŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

šŸ¢ About OITVOIP

OITVOIP provides comprehensive VoIP solutions powered by the NetSapiens platform. This MCP server enables seamless integration between AI applications and our VoIP infrastructure.


Built with ā¤ļø by the OITVOIP team

From frontend finesse to backend brilliance - we stack it all! ⭐

Available Tools

23 tools
get_agentsB

Get agents for a domain

Inputs: domain (required).

get_agent_statisticsB

Get agent statistics for a domain

Inputs: domain (required), agentId.

get_auto_attendantsC

Get auto attendants for a domain

Inputs: domain (required).

get_billingB

Get billing information for a domain

Inputs: domain (required).

get_call_queueB

Get details of a specific call queue

Inputs: domain (required), queueId (required).

get_call_queue_agentsB

Get agents assigned to a call queue

Inputs: domain (required), queueId (required).

get_call_queuesB

Get call queues for a domain

Inputs: domain (required).

get_cdr_recordsB

Retrieve call detail records (CDR)

Inputs: startDate, endDate, user, domain, +1 more.

get_domainB

Get detailed information about a specific domain

Inputs: domain (required).

get_domainsC

Get list of domains in the NetSapiens system

Inputs: no named parameters.

get_music_on_holdB

Get music on hold files for a domain

Inputs: domain (required).

get_phone_numberC

Get details of a specific phone number

Inputs: domain (required), phoneNumber (required).

get_phone_numbersC

Get phone numbers for a domain

Inputs: domain (required), limit.

get_userC

Get detailed information about a specific user

Inputs: userId (required), domain (required).

get_user_answer_ruleC

Get specific answer rule for a user

Inputs: userId (required), domain (required), timeframe (required).

get_user_answer_rulesC

Get answer rules for a user

Inputs: userId (required), domain (required).

get_user_devicesB

Get devices assigned to a specific user

Inputs: userId (required), domain (required).

get_user_greetingsC

Get greetings for a user

Inputs: userId (required), domain (required).

get_user_voicemailsC

Get voicemails for a user

Inputs: userId (required), domain (required).

login_agentC

Login an agent to a call queue

Inputs: domain (required), queueId (required), agentId (required).

logout_agentB

Logout an agent from a call queue

Inputs: domain (required), queueId (required), agentId (required).

search_usersC

Search for users in the NetSapiens system

Inputs: query (required), domain, limit.

test_connectionB

Test connectivity to NetSapiens API

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 23 tools

    Disambiguation4/5

    Most tools target distinct resources (agents, domains, users, call queues, phone numbers, etc.), but there are a few potentially confusing pairs like `get_call_queue` vs `get_call_queues` and `get_phone_number` vs `get_phone_numbers`, though descriptions clarify the singular/plural distinction.

    Naming Consistency4/5

    The vast majority of tools follow the 'get_<resource>' pattern, with only three exceptions (`login_agent`, `logout_agent`, `test_connection`). This deviation is minor but prevents a perfect score.

    Tool Count4/5

    23 tools is slightly above the typical range for a focused server, but the domain (VoIP management) has many distinct resource types, so the count is reasonable and each tool serves a clear purpose.

    Completeness2/5

    The tool surface is heavily read-oriented with almost all tools being getters. Only two mutation tools exist (login/logout agent). Missing CRUD operations for domains, users, phone numbers, etc., severely limits management capabilities.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      The Voyp MCP Server enables AI systems to integrate with VOYP's calling capabilities, allowing for secure telephony actions such as making calls, scheduling appointments, and tracking call statuses through the Model Context Protocol.
      7
      53 npm
      10
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables AI models to interact with VoIPBin's VoIP services, supporting features like call management, agent management, campaigns, conferences, and chat functionality.
      4
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      MCP server for the Ringer WARP platform giving AI agents 135 tools to manage SIP trunking, phone numbers, porting, messaging, billing, and analytics.
      135
      66 npm
      MIT