5G-MAG M1 Interface MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@5G-MAG M1 Interface MCP ServerCreate a new provisioning session for my 5G media app"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
5G-MAG M1 Interface MCP Server
An MCP (Model Context Protocol) server that exposes the 3GPP M1 interface (TS 26.512) as AI-callable tools, enabling LLM agents to configure 5G Media Streaming (5GMS) sessions through natural language.
Overview
This server wraps the 5GMS Application Function's M1 REST API into a full set of tools covering the complete provisioning lifecycle — create, inspect, and delete sessions and their configurations.
The standard 3-step provisioning workflow is:
Step 1 → create_provisioning_session
Step 2 → create_content_hosting_configuration
Step 3 → create_consumption_reporting_configurationAdditional tools allow you to inspect and manage existing resources at any time.
Related MCP server: gNMIBuddy
Features
Full 3-step 5GMS provisioning workflow via MCP tools
GET and DELETE tools for all major resources
Enumerate all provisioning sessions via the 5G-MAG management API
Session state persisted across tool calls (M1 URL, MAF URL, and session ID remembered automatically)
Supports both DASH and HLS entry points
JSON template support for content hosting configuration
Clear, structured error messages with troubleshooting hints
Modular codebase — each resource group lives in its own tool module
Reusable MCP prompts covering the full workflow, step-by-step operations, inspection, and teardown
Compatible with any MCP client (Claude Desktop, Claude Code, custom agents)
Requirements
Python 3.10+
A running 5G-MAG Reference Tools Application Function instance with the M1 interface accessible
Installation
git clone https://github.com/aaronmontilla/M1-mcp.git
cd M1-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtDependencies
Package | Purpose |
| MCP server framework (FastMCP) |
| Async HTTP client for M1 API calls |
Usage
Running the server
source .venv/bin/activate
python server.pyThe server communicates over stdio and is intended to be launched by an MCP host (e.g. Claude Desktop).
Connecting to Claude Desktop
Add the following to your claude_desktop_config.json, using the venv Python interpreter so the installed dependencies are available:
{
"mcpServers": {
"5gms-m1": {
"command": "/path/to/M1-mcp/.venv/bin/python",
"args": ["/path/to/M1-mcp/server.py"]
}
}
}On Windows replace .venv/bin/python with .venv\Scripts\python.exe.
Connecting to Claude Code
claude mcp add 5gms-m1 /path/to/M1-mcp/.venv/bin/python /path/to/M1-mcp/server.pyTools
Provisioning Sessions
Tool | Method | Description |
| POST | Create a new provisioning session (Step 1) |
| GET | Retrieve details for an existing session |
| GET | List all provisioning sessions (uses MAF management API) |
| DELETE | Delete a provisioning session and all its configurations |
create_provisioning_session
Parameter | Required | Default | Description |
| Yes | — | Application Service Provider ID |
| Yes | — | Application ID |
| No |
|
|
| Yes (first call) | — | Base URL of M1 interface, e.g. |
enumerate_provisioning_sessions
Parameter | Required | Default | Description |
| Yes (first call) | — | Base URL of the 5G-MAG management API, e.g. |
Content Hosting Configuration
Tool | Method | Description |
| POST | Define media ingest origin and distribution entry point (Step 2) |
| GET | Retrieve the current content hosting configuration |
| DELETE | Remove the content hosting configuration |
create_content_hosting_configuration
Parameter | Required | Default | Description |
| Yes | — | Friendly name for the configuration |
| Yes | — | Origin server base URL |
| Yes | — | Path to |
| No |
| MIME type of the manifest |
| No | None | CDN hostname alias |
| No |
| DASH profile URNs |
| No |
| Pull vs push ingest |
| No | HTTP pull URN | Ingest protocol URN |
Consumption Reporting Configuration
Tool | Method | Description |
| POST | Enable viewer analytics reporting (Step 3) |
| GET | Retrieve the current consumption reporting configuration |
create_consumption_reporting_configuration
All parameters are optional.
Parameter | Required | Default | Description |
| No |
| Seconds between client reports |
| No |
| Percentage of clients that report |
| No |
| Include geographic location |
| No |
| Include network access info |
| No | state | Override the session ID from state |
| No | state | Override the M1 URL from state |
Metrics Reporting Configuration
Tool | Method | Description |
| POST | Create a new metrics reporting configuration |
| GET | Retrieve an existing metrics reporting configuration |
| DELETE | Remove a metrics reporting configuration |
create_metrics_reporting_configuration
Parameter | Required | Default | Description |
| No |
| Metrics reporting scheme URN |
| No |
| Seconds between client reports |
| No |
| Percentage of clients that report |
| Yes | — | Seconds between local metric samples |
| No | AF default | List of metric URNs to collect (e.g. |
| No | None | URL patterns to restrict reporting scope |
| No | None | DNN/APN to scope the configuration to a specific network |
| No | None | List of S-NSSAI objects (e.g. |
| No | state | Override the session ID from state |
| No | state | Override the M1 URL from state |
Prompts
The server exposes 8 reusable prompt templates (@mcp.prompt()) that MCP clients can surface as slash commands or quick-start options. Each prompt accepts typed parameters and returns a fully-formed instruction for the AI agent.
Prompt | Parameters | Description |
|
| Full 3-step setup in a single prompt |
|
| Step 1 — create a provisioning session |
|
| Step 2 — attach a content hosting configuration |
|
| Step 3 — attach a consumption reporting configuration |
|
| Optional — add QoE metrics reporting |
|
| Retrieve and display all resources for a session |
|
| List all sessions via the MAF management API |
|
| Cascade-delete all resources for a session |
* optional — has a sensible default or falls back to stored state.
Example (Claude Code)
/complete_m1_setup m1_url=http://10.0.0.5:7778 asp_id=acme app_id=live-1 \
ingest_base_url=https://origin.acme.com/ \
entry_point_path=live/event1/manifest.mpd stream_name="Acme Live"Content Hosting Configuration Template
The file content_hosting_config_template.json is used as a base for create_content_hosting_configuration. You can edit it to add additional fields that will be merged with the values you provide at runtime:
{
"name": "My 5GMS Stream",
"ingestConfiguration": {
"pull": true,
"protocol": "urn:3gpp:5gms:content-protocol:http-pull-ingest",
"baseURL": "https://example.com/media/"
},
"distributionConfigurations": [
{
"entryPoint": {
"relativePath": "stream/manifest.mpd",
"contentType": "application/dash+xml",
"profiles": ["urn:mpeg:dash:profile:isoff-live:2011"]
}
}
]
}Example Workflow
User: Set up a 5GMS stream for my live event.
Agent: Step 1 — I'll create a provisioning session.
[calls create_provisioning_session(asp_id="acme", app_id="live-event-1", m1_url="http://10.0.0.5:7778")]
→ Session ID: abc-123
Agent: Step 2 — Now I'll configure the content hosting.
[calls create_content_hosting_configuration(
name="Live Event Stream",
ingest_base_url="https://origin.acme.com/",
entry_point_relative_path="live/event1/manifest.mpd"
)]
→ Content hosting configured.
Agent: Step 3 — Finally, enabling consumption analytics.
[calls create_consumption_reporting_configuration(reporting_interval=30)]
→ All done! Your 5GMS session is ready.Project Structure
M1-mcp/
├── server.py # Entry point — imports mcp instance, tools, and prompts
├── mcp_instance.py # Shared FastMCP server instance
├── state.py # Shared session state (M1 URL, MAF URL, session ID)
├── prompts.py # Reusable workflow prompts (@mcp.prompt())
├── tools/
│ ├── __init__.py # Imports all tool modules (self-registration)
│ ├── provisioning.py # create / get / enumerate / delete provisioning sessions
│ ├── content_hosting.py # create / get / delete content hosting configurations
│ ├── consumption_reporting.py # create consumption reporting configurations
│ └── metrics_reporting.py # create / get / delete metrics reporting configurations
├── content_hosting_config_template.json # Base template for create_content_hosting_configuration
├── requirements.txt # Python dependencies
└── README.md # This fileStandards Reference
3GPP TS 26.512 — 5G Media Streaming (5GMS); Protocols
M1 Interface — Provisioning interface between AF and AS
5G-MAG Reference Tools — Open-source 5GMS implementation
Related Projects
5G-MAG Reference Tools — The Application Function this server talks to
Model Context Protocol — The protocol used to expose tools to AI agents
License
MIT — see LICENSE for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/aaronmontilla/M1-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server