mcp-server-3gpp

mcp-server-3gpp

Enables AI assistants to search and retrieve information from 3GPP specification documents, including full-text search and specific lookup for LTE and 5G NAS cause values. It comes with pre-processed data for major specifications covering NAS, RRC, and protocol conformance testing.

Category
访问服务器

README

mcp-server-3gpp

🔍 MCP Server for 3GPP Specification Document Search

A Model Context Protocol (MCP) server that enables AI assistants to search and retrieve information from 3GPP specification documents.

Features

  • 📚 Search 3GPP Documents: Full-text search across 3GPP specifications
  • 📋 EMM/5GMM Cause Lookup: Quick reference for LTE and 5G NAS cause values
  • 🎯 Pre-built Data Included: Ready to use immediately after installation
  • 🔄 MCP SDK v1.0.0 Compatible: Full support for structured responses
  • Comprehensive Testing: 13 test scenarios with validation tools

✅ Included Specifications (Pre-processed)

  • TS 24.008 - 2G/3G NAS (MM/GMM/SM/CC)
  • TS 24.301 - LTE NAS (EMM/ESM)
  • TS 24.501 - 5G NAS (5GMM/5GSM)
  • TS 36.300 - E-UTRA Overall Description

📥 Additional Specifications (User can add)

The MCP server architecture supports expanding to more specifications. Users can add:

PCT (Protocol Conformance Test)

  • TS 51.010-1 (2G), TS 34.123-1 (3G), TS 36.523-1 (4G), TS 38.523-1 (5G)

Protocol

  • TS 31.121 (USIM), TS 31.124 (USAT)

IMS

  • TS 34.229-1 (4G IMS), TS 34.229-5 (5G IMS)

Architecture

  • TS 38.300 (NR Overall), TR 37.901 (Data Throughput)

RF (if needed)

  • TS 36.521, TS 38.521 series, etc.

To add specifications: Download PDFs → Run npm run setup

Available Tools

Tool Description
search_3gpp_docs Search 3GPP documents by keywords
get_emm_cause Get EMM cause (LTE) or 5GMM cause (5G) details
list_specs List available specifications

Testing & Validation

This package includes comprehensive testing tools:

# Run all SpecKit user story tests (13 scenarios)
npm test

# Validate data structure and MCP server
npm run validate

Test Coverage:

  • ✅ 13 acceptance scenarios from SpecKit specs
  • ✅ All 3 MCP tools (search, get_emm_cause, list_specs)
  • ✅ Data structure validation (22,408 chunks)
  • ✅ EMM/5GMM cause lookup verification

Installation

Prerequisites

  • Node.js >= 18.0.0
  • Git LFS (for downloading pre-built data)

Quick Start (Recommended)

# Install Git LFS (if not already installed)
git lfs install

# Clone and install
git clone https://github.com/Lee-SiHyeon/mcp-server-3gpp.git
cd mcp-server-3gpp
npm install

# If chunks.json is a pointer file, pull LFS data
git lfs pull

# ✅ Ready to use! Pre-built data with 17 specs included.
npm start

Note: The pre-built chunks.json (107MB) is stored with Git LFS. If you don't have Git LFS installed, you can still use the MCP server for EMM/5GMM cause lookup, or generate data yourself using the scripts.

Included Specs

The package includes pre-processed chunks for 17 specifications:

NAS Layer (4 specs)

  • TS 24.008 (2G/3G NAS)
  • TS 24.301 (LTE NAS)
  • TS 24.501 (5G NAS)
  • TS 36.300 (E-UTRA Architecture)

RRC - Radio Resource Control (3 specs) 🆕

  • TS 25.331 (3G UMTS RRC - SIB details)
  • TS 36.331 (4G LTE RRC - SIB details)
  • TS 38.331 (5G NR RRC - SIB details)

PCT - Protocol Conformance Test (4 specs)

  • TS 51.010-1 (2G Protocol)
  • TS 34.123-1 (3G Protocol)
  • TS 36.523-1 (4G Protocol)
  • TS 38.523-1 (5G Protocol)

USIM/USAT (2 specs)

  • TS 31.121 (USIM)
  • TS 31.124 (USAT)

IMS (2 specs)

  • TS 34.229-1 (4G IMS)
  • TS 34.229-5 (5G IMS)

Architecture (2 specs)

  • TS 38.300 (5G NR)
  • TR 37.901 (Data Throughput)

Total: 22,408 pre-built chunks, ~107MB

Optional: Update Data

If you want to regenerate data with the latest 3GPP specifications:

# Option 1: Automatic (downloads and processes PDFs)
npm run setup

# Option 2: Manual
# Step 1: Download PDFs
npm run download-pdfs
# Step 2: Extract and chunk
npm run prepare-data

Data Preparation

✅ Pre-built Data Included (Git LFS)

This package includes pre-processed 3GPP specification data (chunks.json) with 17 specifications and 22,408 chunks (~107MB).

Important: The data file is stored using Git LFS (Large File Storage).

If you have Git LFS installed:

git lfs pull  # Download the actual data file

If you don't have Git LFS:

# Option 1: Install Git LFS (recommended)
# Windows: Download from https://git-lfs.github.com/
# Mac: brew install git-lfs
# Linux: sudo apt-get install git-lfs

git lfs install
git lfs pull

# Option 2: Manual download
# Download chunks.json from GitHub releases or generate it yourself (see below)

Without Git LFS: The MCP server will still work for EMM/5GMM cause lookup. Full document search requires the data file.

📥 Add More Specifications (Optional)

Want to add more specifications? Follow these steps:

Prerequisites

# Install Python dependencies (required for PDF processing)
pip install pymupdf

Option 1: Automatic Download

Download additional specifications automatically:

# Download PCT specs (Protocol, USIM, USAT, IMS, Architecture)
python scripts/download_pct_specs.py

# Download RRC specs (3G/4G/5G RRC with SIB details) 🆕
python scripts/download_rrc_specs.py

PCT specs include:

  • Protocol: TS 51.010-1 (2G), TS 34.123-1 (3G), TS 36.523-1 (4G), TS 38.523-1 (5G)
  • USIM/USAT: TS 31.121, TS 31.124
  • IMS: TS 34.229-1, TS 34.229-5
  • Architecture: TS 38.300, TR 37.901

RRC specs include (for SIB details):

  • TS 25.331 (3G UMTS RRC)
  • TS 36.331 (4G LTE RRC)
  • TS 38.331 (5G NR RRC)

Option 2: Manual Download

Download specifications manually from:

Place PDFs in the raw/ folder.

Process PDFs and Update chunks.json

After downloading PDFs:

# Step 1: Extract text from all PDFs in raw/ folder
python scripts/extract_pdf.py

# Step 2: Create chunks from extracted text
python scripts/create_chunks_simple.py

# Step 3: Copy to data folder
# Windows:
copy "extracted\chunks.json" "data\chunks.json"
# Linux/Mac:
cp extracted/chunks.json data/chunks.json

Advanced: Customize Scripts

All scripts are fully editable:

  • scripts/download_pct_specs.py - Modify to download different specs
  • scripts/extract_pdf.py - Adjust text extraction settings
  • scripts/create_chunks_simple.py - Change chunk size/overlap

Example: Edit download_pct_specs.py to add new specifications:

SPECS = [
    {
        'name': 'ts_your_spec',
        'series': '12300_12399',  # ETSI series folder
        'spec_num': '123001',     # Spec number
        'version': '18.00.00_60', # Target version
        'description': 'Your Spec Description'
    },
    # Add more specs...
]

Configuration

VS Code / GitHub Copilot

Add to your workspace .vscode/mcp.json:

{
  "servers": {
    "3gpp-docs": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/mcp-server-3gpp/src/index.js"]
    }
  }
}

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "3gpp-docs": {
      "command": "node",
      "args": ["/path/to/mcp-server-3gpp/src/index.js"]
    }
  }
}

Custom Data Path

Set the CHUNKS_FILE_PATH environment variable to use a custom chunks file location:

{
  "servers": {
    "3gpp-docs": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/mcp-server-3gpp/src/index.js"],
      "env": {
        "CHUNKS_FILE_PATH": "/path/to/your/chunks.json"
      }
    }
  }
}

Usage Examples

Once configured, you can ask your AI assistant:

  • "What is EMM cause #3?"
  • "Search for attach procedure in 3GPP docs"
  • "Explain 5GMM cause #7"
  • "Find information about tracking area update"
  • "List all available 3GPP specifications"
  • "Search for SIB information in RRC specs"

Response Format

All tools return structured responses compatible with MCP SDK v1.0.0:

{
  "content": [
    {
      "type": "text",
      "text": "Human-readable response"
    }
  ],
  "structuredContent": {
    "results": [
      {
        "source": "ts_124301_v18.9.0_LTE_NAS",
        "content": "Detailed specification text..."
      }
    ]
  }
}

This allows AI clients to:

  • Display formatted text to users
  • Process structured data programmatically
  • Integrate with automation workflows

EMM/5GMM Cause Quick Reference

Common EMM Causes (LTE - TS 24.301)

Cause Name
#3 Illegal UE
#6 Illegal ME
#7 EPS services not allowed
#11 PLMN not allowed
#12 Tracking Area not allowed
#15 No Suitable Cells In TA
#22 Congestion

Common 5GMM Causes (5G - TS 24.501)

Cause Name
#3 Illegal UE
#6 Illegal ME
#7 5GS services not allowed
#11 PLMN not allowed
#62 No network slices available
#65 Maximum PDU sessions reached

Project Structure

mcp-server-3gpp/
├── src/
│   └── index.js                    # MCP server implementation
├── scripts/
│   ├── extract_pdf.py              # PDF text extraction (editable)
│   ├── create_chunks_simple.py     # Text chunking (editable)
│   ├── download_pct_specs.py       # Auto-download PCT specs (editable)
│   ├── download_rrc_specs.py       # Auto-download RRC specs (editable) 🆕
│   ├── download-pdfs.js            # Download NAS specs
│   └── postinstall.js              # Post-install setup
├── data/
│   └── chunks.json                 # Pre-built chunks (22,408 chunks, 107MB)
├── test_speckit_userstories.js     # Comprehensive test suite 🆕
├── validate.js                     # Data & server validation 🆕
├── raw/                            # Place PDFs here (optional)
├── extracted/                      # Extracted text files (generated)
├── package.json
└── README.md

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file.

Disclaimer

This project is not affiliated with 3GPP. 3GPP specifications are copyrighted by ETSI and 3GPP partners. Users are responsible for complying with 3GPP's terms of use when downloading and using specification documents.

Developer Documentation

SpecKit (Spec-Driven Development)

This project uses SpecKit for maintaining development context and collaboration.

What is SpecKit?

SpecKit is a Spec-Driven Development framework that helps developers and AI agents maintain shared context through structured specifications.

Key Principle: Specifications come first, code follows.

SpecKit Workflow

Constitution → Specify → Plan → Tasks → Implement
  1. Constitution (.specify/constitution.md): Project principles, technical stack, historical decisions
  2. Specs (.specify/specs/): Feature specifications with user stories and acceptance criteria
  3. Plans (.specify/plans/): Technical implementation plans and architecture
  4. Tasks (.specify/tasks/): Granular task breakdowns with dependencies

Using SpecKit

If you have Claude Desktop or VS Code with the SpecKit extension:

Available Slash Commands:

  • /speckit-constitution - View/update project constitution
  • /speckit-specify - Create feature specifications
  • /speckit-plan - Create implementation plans
  • /speckit-tasks - Break down tasks
  • /speckit-implement - Execute implementation
  • /speckit-clarify - Clarify ambiguous specifications
  • /speckit-analyze - Analyze consistency across specs
  • /speckit-checklist - Quality checklist
  • /speckit-taskstoissues - Convert tasks to GitHub Issues

Manual Access: All SpecKit files are in .specify/ directory and can be read/edited directly:

.specify/
├── constitution.md          # Project overview
├── specs/
│   └── 001-3gpp-document-search.md
├── plans/
│   └── 001-implementation-plan.md
├── tasks/
│   └── 001-tasks.md
└── templates/               # Templates for new features

Why SpecKit for this Project?

  • Context Sharing: NAD team and future developers have complete project history
  • AI Collaboration: AI agents understand design decisions and constraints
  • Onboarding: New contributors can read specs instead of reverse-engineering code
  • Documentation: Living documentation that evolves with code

Related Projects

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选