OpenSIPS MCP Server
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| OPENSIPS_MCP_HOST | No | Bind address for network transports | 127.0.0.1 |
| OPENSIPS_MCP_PORT | No | Listen port for network transports | 8080 |
| OPENSIPS_MCP_ROLE | No | RBAC role (readonly, admin). Defaults to least-privileged; set to admin only when write / MI-execute access is required. | readonly |
| OPENSIPS_MCP_DB_URL | No | Database connection string | sqlite+aiosqlite:///opensips.db |
| OPENSIPS_MCP_MI_URL | No | OpenSIPS MI HTTP endpoint | http://127.0.0.1:8888/mi |
| OPENSIPS_MCP_API_KEY | No | Optional API key for authentication | |
| OPENSIPS_MCP_VERSION | No | Target OpenSIPS runtime version (3.4 or 3.6) | 3.6 |
| OPENSIPS_MCP_LOG_LEVEL | No | Logging level | INFO |
| OPENSIPS_MCP_READ_ONLY | No | Force read-only mode regardless of role | false |
| OPENSIPS_MCP_TRANSPORT | No | MCP transport (stdio, sse, streamable-http) | stdio |
| OPENSIPS_MCP_OPENSIPS_BIN | No | Path to opensips binary for config validation | /usr/sbin/opensips |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| acc_query_cdrsA | Query accounting CDRs with optional date range and caller/callee filters. Parametersdate_from:
ISO-format start date/time filter (e.g. |
| acc_query_missedB | Query missed calls with optional date range and caller/callee filters. Parametersdate_from:
ISO-format start date/time filter (e.g. |
| avp_getA | Get an AVP value (global scope only — per-transaction AVPs are not MI-accessible). Parametersname:
AVP name (e.g. |
| avp_setC | Set an AVP value in the global scope. |
| avp_deleteC | Delete a global AVP. |
| b2b_list_sessionsA | List active B2B logic sessions (entity keys, state, legs). |
| b2b_list_entitiesA | List raw B2B entities (UAC/UAS/server) tracked by |
| b2b_terminateA | Terminate a B2B session by its entity key. Parameterskey:
The B2B session key as reported by |
| b2b_bridgeA | Bridge an existing B2B call to a new destination URI. Useful for attended-transfer, failover, and music-on-hold scenarios. Parameterskey:
Session key from |
| b2b_trigger_scenarioA | Trigger a B2B scenario by id (defined in b2b_logic XML scenarios). Parametersscenario_id: Scenario id from the b2b_logic configuration. custom_hdrs: Optional custom SIP headers for the scenario invocation. params: Optional semicolon-delimited parameters (per-scenario). |
| b2b_sca_listA | List active Shared Call Appearance (SCA) subscriptions. |
| bench_quick_registerA | Run a SIPp REGISTER load test against TARGET. Captures pre/post snapshots of the proxy's state so the run is self-documenting. Default: 50 CPS for 30 s = 1500 registers, safe for any non-toy proxy. Parameterstarget:
|
| bench_quick_inviteB | Run a SIPp INVITE load test against TARGET. Same shape as bench_quick_register but exercises the call path instead of the registration path. |
| bench_summaryA | Aggregate every bench artefact in OUT_DIR into one summary. Useful at the end of a tuning run: |
| cc_list_queueA | List all calls currently queued in the call center. |
| cc_list_agentsA | List all call center agents and their current state. |
| cc_agent_loginB | Log a call center agent in or out. Parametersagent_id:
The agent identifier (e.g. |
| cc_reload_toolA | Reload call center agents and flows from the database. |
| cc_statusA | Get a combined call center status: queue, agents, and flows. Returns all three datasets in a single response for a complete overview of the call center state. |
| carrierroute_reloadA | Reload carrier route tables from the database. |
| carrierroute_dumpA | Dump loaded carrier route tables (carriers, domains, prefixes, hosts). |
| carrierroute_activate_hostA | Activate a carrier route host (return to service). Use this after maintenance to re-enable a previously deactivated gateway. |
| carrierroute_deactivate_hostC | Deactivate a carrier route host (drain, take out of service). |
| carrierroute_replace_hostA | Replace a host in carrier route (e.g. IP change). Does not require a reload; applies at runtime. |
| cdr_auditA | Scan the Parametersdate_from, date_to: ISO timestamps bounding the audit window. Window is capped at 31 days; longer ranges should go through a warehouse / BI tool. max_gap_sec: Gap between consecutive CDRs that counts as a suspicious silence. Default 300s (5 min). long_call_threshold_sec: Duration above which a call is flagged as a potential stuck dialog. Default 14400s (4h). |
| cdr_summaryB | Volume and success-code breakdown over a window. Parametersdate_from, date_to:
ISO timestamps bounding the report window.
group_by:
|
| cdr_count_by_codeB | Count CDRs by SIP response code within a window. Quick-glance "what's the 5xx rate right now?" report — SQL-side aggregation so it is cheap even on large acc tables. |
| cfg_generateA | Generate an OpenSIPS configuration from a predefined scenario template. Renders the scenario template, then — by default — runs Parametersscenario:
Name of the scenario (e.g. |
| cfg_validateA | Validate an OpenSIPS configuration by running Parametersconfig_content: The full OpenSIPS configuration text to validate. |
| cfg_parseA | Parse an OpenSIPS configuration and extract its structure. Returns modules, modparams, listen addresses, routes, and global params. Parametersconfig_content: The full OpenSIPS configuration text to parse. |
| cfg_list_scenariosA | List all available OpenSIPS configuration scenarios with descriptions. |
| cfg_get_scenario_paramsB | Get required and optional parameters for a configuration scenario. Parametersscenario:
The scenario name (e.g. |
| cfg_diffA | Compute a unified diff between two OpenSIPS configurations. Parametersconfig_a: The first (original) configuration text. config_b: The second (modified) configuration text. |
| cfg_explain_routeA | Explain an OpenSIPS route block by identifying its components. Analyzes the route code and identifies SIP methods handled, module functions called, conditions, and overall flow. Parametersroute_code:
The route block code to explain (e.g. the body of a |
| cfg_add_moduleA | Add a module (with optional modparams) to an existing OpenSIPS configuration. Inserts the Parametersconfig_content:
The existing OpenSIPS configuration text.
module_name:
The module to add (e.g. |
| cfg_optimizeB | Analyze an OpenSIPS configuration and suggest optimizations. Checks for common issues: missing modules, redundant settings, performance tuning opportunities, and security recommendations. Parametersconfig_content: The OpenSIPS configuration text to analyze. |
| cfg_generate_iterativeA | Generate an OpenSIPS config and iteratively validate it. Generates a configuration from the given scenario, validates it using
Parametersscenario: The scenario template name. params: Template parameters. max_attempts: Maximum validation attempts (reserved for future auto-fix logic). |
| cfg_start_sessionB | Start an interactive m4 config-building session. Takes a natural-language description (e.g. "I need a SIP load balancer for 4 backends") and returns the suggested scenario, required site parameters with descriptions, optional parameters, and a next-step instruction for the LLM. Parametersdescription: Natural-language description of the deployment the user wants. |
| cfg_generate_m4A | Render the m4 template pair (main + local) for a scenario. The returned strings are intended to be persisted to Parametersscenario:
Scenario name ( |
| cfg_preprocessA | Run Parametersmain_m4:
Contents of |
| cfg_dry_runA | Safely iterate on a config: preprocess + validate, write nothing. Intended as the LLM's tight feedback loop while building or editing a config — call this between successive renders to verify correctness before asking the user to save. Parametersmain_m4:
Contents of |
| cfg_editA | Validate an edited OpenSIPS config and return a unified diff. Does not write anything to disk — the caller chooses to persist after reviewing the diff. Parametersexisting_cfg: The current on-disk configuration text. change_description: Short natural-language description of the intended change (e.g. "Increase children to 16 and enable TLS"). new_cfg: The LLM's rewritten configuration text. |
| cfg_m4_checkA | Diagnostic: check whether the Returns path, version, and availability status. |
| cfg_save_sessionA | Persist the m4 pair to disk, optionally also writing the preprocessed cfg. Writes The output directory is validated — writes to system directories such as
Parametersout_dir:
Directory that will receive the files. Created if missing.
main_m4:
Contents for |
| cfg_list_versionsA | List supported OpenSIPS versions and the chain of migration hops. Returns the known versions (from the migration rule tables) and the
summary of each hop (2.4 → 3.0 → ... → 4.0). Use this before
calling :func: |
| cfg_migrate_planA | Report what a version migration would do, without rewriting the config. Terraform- Parametersconfig_content:
The current OpenSIPS configuration text.
from_version:
Current OpenSIPS version (e.g. |
| cfg_migrateA | Migrate a configuration between OpenSIPS versions. Walks the hop chain ( When validate is true and an Parametersconfig_content:
The current OpenSIPS configuration text.
from_version:
Current OpenSIPS version.
to_version:
Target OpenSIPS version.
validate:
Run the migrated config through |
| cfg_check_compatA | Check a config for incompatibilities with a target OpenSIPS version. Reports modules that don't exist in the target version, deprecated
parameters, and silent-gotcha defaults. Pairs well with
:func: Parametersconfig_content: The OpenSIPS configuration text to check. target_version: The version you intend to run this config on. |
| cfg_lintA | Run the OpenSIPS semantic linter against a configuration. Checks module dependencies, orphaned modparams, deprecated parameters,
missing Parametersconfig_content:
The OpenSIPS configuration text to lint.
include:
Optional allow-list of rule ids (e.g. |
| cfg_list_lint_rulesA | Return all available lint rule ids. |
| cfg_tuneA | Generate a PGTune-style capacity-tuned override snippet. Ask the user five questions about their workload, return a small
paste-ready set of overrides with a Parametersrole:
One of |
| cfg_explainA | Explain an OpenSIPS directive, module, function, or pseudo-variable.
Parameterstopic: The directive / name to explain. |
| cfg_list_flagsA | List all available The flag vocabulary is Kamailio-compatible so engineers migrating between the two projects keep the same mental model. |
| cfg_compose_flagsA | Resolve a set of Does NOT produce a config — it answers the question "if I enable
these flags, what modules get loaded and which globals get set?".
Pairs with :func: Parametersflags:
List of |
| cfg_build_from_flagsA | Build a flat Materialises the Kamailio-style flag vocabulary as a flat, no- Parametersflags:
Any combination of |
| cfg_list_modulesA | List modules from the OpenSIPS module catalog. Used by the wizard and by LLMs that need to check whether a module is available in a given version. Parametersversion:
Filter to modules available in this OpenSIPS version (e.g. |
| cfg_diff_referenceA | Compare a config against the reference output for a scenario. Shows which parts of the config are "custom" (differ from the canned scenario template). Useful for reviewing what your team has diverged on and would need to re-apply after upgrading the reference template. Parametersconfig_content:
The OpenSIPS configuration text to compare.
scenario:
The reference scenario name (see |
| cfg_backupA | Copy config_path to a timestamped backup in a safe directory. The backup name is Parametersconfig_path:
Absolute path of the existing config file. Must live in an
allowlisted directory ( |
| cfg_list_backupsA | List available Parametersconfig_path:
Absolute path whose backups we want to enumerate. The basename
is used as the prefix filter.
backup_dir:
Optional directory to search. Defaults to the directory of
|
| cfg_rollbackA | Restore backup_path to target_path and re-validate. Before overwriting, the current contents of Parametersbackup_path:
Absolute path to the backup file to restore.
target_path:
Absolute path to overwrite. Must live in an allowlisted dir.
validate_after:
Run |
| cluster_statusA | List all cluster nodes and their current status. |
| cluster_topologyA | Show the cluster topology — how nodes are interconnected. |
| cluster_send_commandA | Send an MI command to a specific node in the cluster. Parameterscluster_id:
The cluster ID.
node_id:
The target node ID within the cluster.
mi_cmd:
The MI command to execute on the remote node. Must be registered in
:data: |
| cluster_drain_nodeA | Gracefully drain a cluster node ahead of maintenance. Marks the node as disabled in the clusterer, then polls the local dialog count until it stops declining or the timeout fires. The caller is expected to stop the OpenSIPS process only after this tool confirms the dialog backlog is low. This tool operates on the cluster metadata — it does NOT shut OpenSIPS down. Combine with your init-script / systemd unit to actually stop the service. Parameterscluster_id: Target cluster ID. node_id: Target node ID within the cluster. timeout_sec: Maximum time to wait for dialogs to drain. Clamped to 5..600. poll_interval_sec: Seconds between dialog-count samples. Clamped to 1..60. |
| cluster_promote_nodeA | Bring a disabled cluster node back into active service. Counterpart to |
| cluster_sync_checkB | Report cluster sync health: capabilities, sharing tags, topology. Combines |
| db_table_backupA | Dump table to a timestamped JSON file under out_dir. Parameterstable:
One of the supported OpenSIPS data tables (subscriber, dispatcher,
address, drouting_rule, drouting_gateway, drouting_carrier,
dialplan, load_balancer, domain, tls_mgm).
out_dir:
Directory to write into. Must be in the safe allowlist.
label:
Optional tag (e.g. |
| db_table_list_backupsA | List backup files for table under out_dir, newest first. |
| db_table_restoreA | Restore a table from a JSON backup produced by By default this is a dry-run. Pass Parametersbackup_path:
Path to the JSON file produced by |
| get_process_listA | List all running OpenSIPS processes with their PID and description. |
| get_memory_statsA | Show OpenSIPS memory usage details (shared and private memory). |
| get_uptimeA | Show how long the OpenSIPS instance has been running. |
| get_tcp_connectionsB | List all active TCP and TLS connections. |
| opensips_versionA | Show the version string of the connected OpenSIPS instance. |
| dlg_listA | List active SIP dialogs. Parameterscallid: Optional Call-ID to filter by a specific dialog. from_tag: Optional From-tag to further narrow the dialog lookup. |
| dlg_endC | End (tear down) an active dialog. Parameterscallid: The Call-ID of the dialog to terminate. from_tag: The From-tag of the dialog. to_tag: The To-tag of the dialog. |
| dlg_get_profilesA | Get dialog profile information. Parametersprofile: Specific profile name to query size for. If omitted, lists all profiles. |
| dlg_push_varC | Push a variable into an active dialog. Parameterscallid: The Call-ID of the target dialog. from_tag: The From-tag of the target dialog. var_name: Name of the dialog variable to set. var_value: Value to assign to the variable. |
| dialplan_list_rulesB | List dialplan rules, optionally filtered by dialplan id. |
| dialplan_add_ruleB | Add a dialplan translation rule. Parametersdpid: Dialplan id (translation table id, referenced from script). match_op: Match operator — 0 = equal, 1 = regex (default), 2 = fnmatch. match_exp: Pattern to match against the input. subst_exp: Substitution regex (for match_op=1). repl_exp: Replacement string. pr: Priority — lower matches first. |
| dialplan_update_ruleC | Update a dialplan rule by id. |
| dialplan_delete_ruleC | Delete a dialplan rule by id. |
| dialplan_reloadA | Reload dialplan rules from the database (triggers MI |
| dialplan_translateA | Test a dialplan translation without dispatching a call. Parametersdpid:
Dialplan table id.
input:
Input string to translate (e.g. ReturnsThe translated output string and matching rule metadata. |
| dispatcher_list_dbC | List dispatcher destinations from the database, optionally filtered by set ID. |
| dispatcher_addB | Add a new dispatcher destination. Optionally triggers MI ds_reload. |
| dispatcher_updateB | Update a dispatcher destination by ID. Optionally triggers MI ds_reload. |
| dispatcher_removeB | Remove a dispatcher destination by ID. Optionally triggers MI ds_reload. |
| docker_list_scenariosA | List all available Docker deployment scenarios. Returns the scenario names and their docker-compose file paths. |
| docker_deploy_scenarioA | Return the docker-compose command to deploy a specific scenario. Parametersscenario:
Name of the scenario directory (e.g. |
| docker_statusA | Show the status of running Docker Compose services. Executes |
| docker_logsB | Retrieve recent logs from a Docker Compose service. Parametersservice:
The service name to fetch logs for (default: |
| docker_restartC | Restart a Docker Compose service. Parametersservice:
The service name to restart (default: |
| domain_listA | List all locally-served SIP domains. |
| domain_addC | Add a new SIP domain to the database. |
| domain_deleteC | Delete a SIP domain from the database. |
| domain_reloadA | Reload the domain table in OpenSIPS via MI command. |
| drouting_list_rulesA | List dynamic routing rules, optionally filtered by group or prefix. |
| drouting_add_ruleC | Add a new dynamic routing rule. Optionally triggers MI dr_reload. |
| drouting_list_gatewaysC | List dynamic routing gateways. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| build_config | Guide the LLM to build an OpenSIPS configuration for a given scenario. |
| optimize_performance | Guide the LLM to optimize an OpenSIPS configuration for performance. |
| build_config_interactive | Guide the LLM through the interactive m4 config builder workflow. |
| edit_existing_config | Guide the LLM through an edit-existing-config workflow. |
| migrate_cfg_to_m4 | Guide the LLM through migrating a flat opensips.cfg to the m4 pattern. |
| design_architecture | Guide the LLM to design an OpenSIPS-based VoIP architecture. |
| full_call_debug | Guide end-to-end debugging of a SIP call using OpenSIPS, Homer, and RTPEngine. |
| load_test_plan | Design and guide execution of a SIPp load test plan for an OpenSIPS deployment. |
| security_pentest | Guide a SIP security audit using network tools and OpenSIPS analysis. |
| teach_concept | Guide the LLM to teach an OpenSIPS or SIP concept. |
| explain_sip_ladder | Guide the LLM to explain a SIP call flow (ladder diagram). |
| explain_route | Guide the LLM to explain an OpenSIPS route block. |
| debug_sip_message | Guide the LLM to parse and debug a SIP message. |
| migrate_version | Guide the LLM to create a migration plan between OpenSIPS versions. |
| migrate_version_auto | Guide the LLM through the automated version-migration workflow. |
| compare_modules | Guide the LLM to compare two OpenSIPS modules for a specific use case. |
| security_audit | Guide the LLM to perform a security audit of an OpenSIPS configuration. |
| plan_capacity | Guide the LLM to create a capacity plan for an OpenSIPS deployment. |
| write_module | Guide the LLM to develop a custom OpenSIPS module. |
| troubleshoot_calls | Guide the LLM to troubleshoot SIP call issues in OpenSIPS. |
| troubleshoot_registration | Guide the LLM to troubleshoot SIP registration issues. |
| explain_error | Guide the LLM to explain an OpenSIPS error message. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| templates_list | List all available OpenSIPS configuration scenario templates. |
| config_current | Description of the current OpenSIPS configuration. Provides guidance on how to inspect the running configuration of an OpenSIPS instance. |
| config_parsed | Description of parsed OpenSIPS configuration structure. Explains the sections and structure of a parsed opensips.cfg file. |
| db_subscribers | List SIP subscribers (sanitized view). Returns subscriber information with passwords and sensitive authentication data removed. Connect to a live database for real data. |
| db_dispatchers | List dispatcher destinations. Returns the configured dispatcher sets and their destination URIs. |
| db_drouting_rules | Dynamic routing rules listing. Returns information about the OpenSIPS dynamic routing rules table. |
| db_drouting_gateways | Dynamic routing gateways listing. Returns information about the OpenSIPS dynamic routing gateways table. |
| db_addresses | Address permissions listing. Returns information about the OpenSIPS address permissions table used for IP-based access control. |
| modules_list | List all known OpenSIPS modules with brief descriptions. |
| docs_faq | Frequently asked questions about OpenSIPS. Returns common questions and answers about OpenSIPS configuration, deployment, and troubleshooting. |
| ecosystem_status | Overview of the OpenSIPS ecosystem components and their expected endpoints. |
| ecosystem_tools_list | List all ecosystem integration tools with descriptions and permissions. |
| homer_stats_resource | Homer capture statistics reference. Describes what Homer statistics are available and how to query them. |
| rtpengine_stats_resource | RTPEngine statistics reference. Describes what RTPEngine metrics are available and how to query them. |
| scenarios_list | List all available OpenSIPS deployment scenarios. |
| system_version | OpenSIPS version information. Returns version details from the connected OpenSIPS instance. When no live instance is available, returns a placeholder. |
| system_uptime | OpenSIPS uptime information. Returns how long the OpenSIPS instance has been running. |
| system_processes | OpenSIPS process table. Returns information about all running OpenSIPS worker processes. |
| system_memory | OpenSIPS shared memory usage. Returns shared-memory statistics for the running instance. |
| stats_all | All OpenSIPS runtime statistics. Returns the complete set of runtime statistics from the instance. |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/OpenSIPS/opensips-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server