Simple CLI tool to fetch and parse the latest MCC/MNC data from ITU-T E.212 documents.
This tool automatically:
- Downloads the latest E.212 document from ITU website
- Extracts Mobile Country Codes (MCC) and Mobile Network Codes (MNC)
- Saves the data in a structured JSON format
# Clone repository
git clone https://github.com/username/mcc-tool.git
cd mcc-tool
# Install dependencies
npm installnode index.mjsnode index.mjs --output ./custom-path.jsonnode index.mjs --helpnpx mcc-mnc-toolThe tool generates a JSON file with the following structure:
{
"metadata": {
"generated": "2024-03-15T12:34:56.789Z",
"source": "https://www.itu.int/...",
"etag": "\"abc123\""
},
"areas": {
"united states": [
{
"name": "Verizon Wireless",
"mcc": "310",
"mnc": "004"
}
]
},
"areaNames": [
"United States",
"Canada"
]
}- Node.js 18 or later
- Internet connection to fetch ITU documents
To contribute:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE file for details.
Alexander Schrab