Skip to main content
Glama
Abinash009

sync-spec-agent

by Abinash009
README.md
# sync-spec-agent

πŸ” AI-powered MCP assistant for telecom synchronization standards (ITU-T & 3GPP)

Ask questions about PTP, SyncE, GNSS, timing budgets in plain English β€” get answers with exact standard references.

## What it does

```
You ask:  "What is the time error requirement for 5G TDD base stations?"
Agent:    "Per ITU-T G.8271, the maximum absolute time error at the air 
           interface is Β±1.5 ΞΌs for wide-area phase synchronization.
           Reference: G.8271 Table 1, Category A."
```

## Quick Start

```bash
# 1. Clone and install
git clone https://github.com/abinashkumar/sync-spec-agent.git
cd sync-spec-agent
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

# 2. Set API key
export GOOGLE_API_KEY='your-gemini-key'

# 3. Index the knowledge base
python ingest.py

# 4. Start MCP server
python server.py
```

## Supported Standards

### ITU-T Synchronization
- G.8271 β€” Time/phase sync requirements
- G.8272 / G.8272.1 β€” PRTC / ePRTC
- G.8275.1 β€” PTP Full Timing Support (L2 profile)
- G.8275.2 β€” PTP Partial Timing Support (L3 profile)
- G.8262 / G.8262.1 β€” SyncE EEC / eEEC
- G.8264 β€” ESMC (SyncE messaging)
- G.8273.2 β€” T-BC / T-TSC clock requirements

### 3GPP
- TS 38.104 β€” NR base station timing requirements
- TS 38.401 β€” NG-RAN architecture (sync aspects)

### IEEE
- IEEE 1588-2019 β€” Precision Time Protocol v2.1

## Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚             sync-spec-agent                      β”‚
β”‚                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚Knowledge │──►│ Chunking  │──►│  ChromaDB  β”‚ β”‚
β”‚  β”‚  Base    β”‚   β”‚ + Embed   β”‚   β”‚ (vectors)  β”‚ β”‚
β”‚  β”‚(docs/)   β”‚   β”‚           β”‚   β”‚            β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                        β”‚        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                   β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚   MCP    │◄──────────────────│ RAG Engine  β”‚ β”‚
β”‚  β”‚  Server  β”‚   answer + refs   β”‚ (query +    β”‚ β”‚
β”‚  β”‚          β”‚                   β”‚  generate)  β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚       β”‚                                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚ MCP Protocol
        β–Ό
  Any MCP Client (Claude, Kiro, etc.)
```

## Tech Stack

- Python 3.11+
- ChromaDB (vector store)
- Google Gemini (embeddings + generation)
- MCP SDK (Model Context Protocol server)

## Project Structure

```
sync-spec-agent/
β”œβ”€β”€ docs/                  # Knowledge base documents
β”‚   β”œβ”€β”€ itu-t/            # ITU-T standards summaries
β”‚   β”œβ”€β”€ 3gpp/            # 3GPP spec extracts
β”‚   └── guides/          # Vendor white papers & guides
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ ingest.py        # Document ingestion pipeline
β”‚   β”œβ”€β”€ rag.py           # RAG query engine
β”‚   └── server.py        # MCP server
β”œβ”€β”€ tests/               # Test queries and validation
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ README.md
└── .env.example
```

## Author

**Abinash Kumar** β€” Telecom Systems Engineer | 14 years in 5G RAN, synchronization testing, and test automation

- LinkedIn: [linkedin.com/in/abinash-kumar-26261657](https://linkedin.com/in/abinash-kumar-26261657)

## License

MIT