PDP

Provides RAG-powered Q&A over the PDP law with six MCP tools and Pinecone-based vector search.
  • python

0

GitHub Stars

python

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "vibecoding4-jc-pdp-mcp-server": {
      "command": "python",
      "args": [
        "-m",
        "src.server"
      ]
    }
  }
}

The PDP MCP Server is a Retrieval-Augmented Generation (RAG) powered assistant that answers questions about the Indonesian Personal Data Protection Law (UU PDP) using Pinecone as a vector store. It lets you ask general questions, search specific articles, fetch definitions, and review data subject rights, controller duties, and penalties, all through a streamlined MCP client workflow.

How to use

You interact with the PDP MCP Server through an MCP client. Use it to ask general questions about UU PDP, locate pasal (sections) by number or keyword, look up legal term definitions, review the rights of data owners, understand obligations of data controllers/processors, and learn about administrative and criminal sanctions. The server uses RAG to fetch relevant content from the UU PDP corpus and provide concise, sourced answers.

How to install

Prerequisites you need to have before installing this server are Python 3.11 or newer, a Pinecone account (free tier available), and an OpenAI API key.

# 1) Clone the project repository
git clone <repository-url>
cd pdp-mcp-server

# 2) Create a virtual environment
python -m venv venv
source venv/bin/activate  # Linux/Mac
# or
.\venv\Scripts\activate  # Windows

# 3) Install dependencies
pip install -r requirements.txt

# 4) Set up environment variables
cp .env.example .env
# Edit .env with your API keys and Pinecone/OpenAI settings

Next, ingest the UU PDP data into Pinecone so the RAG system can retrieve relevant passages.

# 1) Extract text from the UU PDP PDFs
python scripts/extract_pdf.py

# 2) Ingest extracted data into Pinecone
python scripts/ingest_data.py

Finally, start the server and keep it running to handle MCP requests.

python -m src.server

Additional content

Data ingestion and runtime rely on a couple of common scripts and environment configurations. Ensure your Pinecone index is ready and your OpenAI API key is valid. You can also test the server locally with a test suite once the environment is set up.

Environment variable setup is performed via a local .env file. Create this from .env.example and fill in your keys and identifiers for Pinecone and OpenAI. The exact keys to provide include the Pinecone API key, Pinecone environment, and the OpenAI API key used by the RAG components.

To verify the MCP server functionality, run the test suite. This ensures the available MCP tools operate as expected against the UU PDP content.

Tools overview

The server exposes six MCP tools to interact with UU PDP content: tanya_pdp, cari_pasal, definisi_istilah, hak_subjek_data, kewajiban_pengendali, and sanksi_pelanggaran. Each tool targets a specific area of the law, enabling quick Q&A, passage lookup, term definitions, and rights/obligations/sanctions exploration.

Available tools

tanya_pdp

Answer general questions about the PDP law using the RAG-based system.

cari_pasal

Search for specific sections or passages by number or keyword.

definisi_istilah

Look up definitions of legal terms to improve clarity.

hak_subjek_data

Explain the rights of data owners under the PDP law.

kewajiban_pengendali

Describe duties of data controllers and processors.

sanksi_pelanggaran

Provide information on administrative and criminal penalties.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational