Skip to main content
Glama
README.md
# PDP MCP Server

MCP Server untuk menjawab pertanyaan seputar **UU Nomor 27 Tahun 2022 tentang Perlindungan Data Pribadi (UU PDP)** menggunakan RAG (Retrieval-Augmented Generation) dengan Pinecone sebagai vector database.

## ๐Ÿš€ Features

- **RAG-powered Q&A**: Menjawab pertanyaan berdasarkan isi UU PDP
- **6 MCP Tools**:
  - `tanya_pdp` - Pertanyaan umum tentang UU PDP
  - `cari_pasal` - Cari pasal berdasarkan nomor/keyword
  - `definisi_istilah` - Cari definisi istilah hukum
  - `hak_subjek_data` - Hak-hak pemilik data pribadi
  - `kewajiban_pengendali` - Kewajiban pengendali/prosesor data
  - `sanksi_pelanggaran` - Sanksi administratif dan pidana

## ๐Ÿ“‹ Requirements

- Python 3.11+
- Pinecone Account (Free tier available)
- OpenAI API Key

## ๐Ÿ› ๏ธ Installation

1. Clone repository:
```bash
git clone <repository-url>
cd pdp-mcp-server
```

2. Create virtual environment:
```bash
python -m venv venv
source venv/bin/activate  # Linux/Mac
# atau
.\venv\Scripts\activate  # Windows
```

3. Install dependencies:
```bash
pip install -r requirements.txt
```

4. Setup environment variables:
```bash
cp .env.example .env
# Edit .env dengan API keys Anda
```

## ๐Ÿ“š Data Ingestion

1. Ekstrak PDF UU PDP:
```bash
python scripts/extract_pdf.py
```

2. Ingest data ke Pinecone:
```bash
python scripts/ingest_data.py
```

## ๐Ÿ–ฅ๏ธ Running the Server

```bash
python -m src.server
```

## ๐Ÿงช Testing

```bash
pytest tests/ -v
```

## ๐Ÿ“– Usage with Claude Desktop

Add to your Claude Desktop config (`claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "pdp-assistant": {
      "command": "python",
      "args": ["-m", "src.server"],
      "cwd": "/path/to/pdp-mcp-server"
    }
  }
}
```

## ๐Ÿ“„ License

MIT License

## ๐Ÿ“š References

- [UU No. 27 Tahun 2022 tentang Perlindungan Data Pribadi](https://peraturan.bpk.go.id/Details/229798/uu-no-27-tahun-2022)
- [FastMCP Documentation](https://github.com/jlowin/fastmcp)
- [Pinecone Documentation](https://docs.pinecone.io/)

TDQS

C2.9/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have completely distinct purposes: one checks server status, the other answers questions about PDP law. There is no overlap or confusion possible.

Naming Consistency4/5

Both tools use snake_case, but 'server_status' is noun_noun while 'tanya_pdp' is verb_noun. Also, one is in English and the other in Indonesian, a minor inconsistency.

Tool Count3/5

With only 2 tools, the server feels thin. While it might be acceptable for a very narrow purpose, typically a PDP law server would need more tools for comprehensive coverage.

Completeness2/5

The server only offers server status and Q&A. Missing essential operations like searching articles, listing definitions, or providing document references, leaving significant gaps for an agent.

Maintenance

ActivityInactive
ResponsivenessNo issues