pasal
The first open, AI-native Indonesian legal platform. MCP server + web app giving Claude grounded access Indonesian laws.
claude mcp add --transport stdio ilhamfp-pasal python -m fastmcp \ --env DATABASE_URL="Connection string for primary store (if different from Supabase)" \ --env SUPABASE_URL="PostgreSQL database URL for Pasal data" \ --env SUPABASE_ANON_KEY="Anon/public key for Supabase access"
How to use
Pasal's MCP server provides four grounded tools to Claude for accessing Indonesian legal data: search, retrieval of specific articles (pasal), amendment status tracking, and browsing capabilities. These tools ensure Claude can operate on verified regulations with exact citations rather than generating unsupported content. Once the server is running, you can connect Claude to the Pasal MCP server and issue queries to search the Indonesian regulations corpus, fetch particular articles by identifier, or explore amendment histories and related regulations. The system is designed to return structured data that includes precise article numbers, titles, and citations to source regulations, enabling reliable grounding for legal queries.
To use the server effectively, start by establishing a connection through your Claude instance using the provided MCP endpoint. Then leverage the four grounded tools: 1) search_laws for full-text indexing and Indonesian-stemmed search across 937,000+ articles; 2) get_pasal to retrieve exact articles by article number and type; 3) get_law_status to verify amendment chains and current validity; and 4) list_laws to browse regulations by type or category. The REST API also exposes endpoints for programmatic access to search results, browse structures, and individual article retrieval, enabling integration with other tools or user interfaces on top of Pasal’s data layer.
How to install
Prerequisites:
- Python 3.10+ installed on your system
- Network access to install dependencies (pip) and reach the data backend (Supabase/PostgreSQL)
- Optional: a Claude-enabled workflow for MCP integration
-
Clone the repository containing the Pasal MCP server: git clone https://github.com/ilhamfp-pasal/mcp-server-pasal.git cd mcp-server-pasal
-
Create a virtual environment and activate it: python -m venv venv source venv/bin/activate # on macOS/Linux venv\Scripts\activate # on Windows
-
Install Python dependencies: pip install -r requirements.txt
-
Configure environment variables (example): export SUPABASE_URL="https://xyz.supabase.co" export SUPABASE_ANON_KEY="your-anon-key" export DATABASE_URL="postgres://user:pass@host:5432/dbname"
-
Run the MCP server: python -m fastmcp
-
Verify the server is running by hitting the MCP endpoint (default http://localhost:8000/mcp) or the Railway-provisioned URL if deployed.
Notes:
- If you deploy to a cloud host or Railway, adjust environment variables accordingly and use the provided endpoint for Claude integration.
Additional notes
Tips and common issues:
- Ensure your database connection strings and API keys are correctly set in env variables (SUPABASE_URL, SUPABASE_ANON_KEY, DATABASE_URL).
- If you encounter authentication errors, verify network access from your runtime to the data backend and that RLS/permissions on the database allow the MCP server to read the regulations data.
- The four MCP tools (search_laws, get_pasal, get_law_status, list_laws) return structured results with citations. Use get_pasal with exact article identifiers to obtain precise article text and metadata.
- When running locally, you can test endpoints with curl or a simple HTTP client to confirm the MCP server responds as expected before connecting Claude.
- For production deployments, monitor logs for parsing errors or rate limits on upstream data sources and ensure the environment provides sufficient memory for the full 937k+ article index.
Related MCP Servers
mcp-nixos
MCP-NixOS - Model Context Protocol Server for NixOS resources
maverick
MaverickMCP - Personal Stock Analysis MCP Server
mcp -aws
A Model Context Protocol server implementation for operations on AWS resources
lc2mcp
Convert LangChain tools to FastMCP tools
vibe-check
Stop AI coding disasters before they cost you weeks. Real-time anti-pattern detection for vibe coders who love AI tools but need a safety net to avoid expensive overengineering traps.
claude-vigil
🏺 An MCP server for checkpointing and file recovery in Claude Code