MCP (Model Context Protocol) server for the Korean National Assembly Open API. It enables AI agents like Claude to search, retrieve, and analyze legislative data, meeting records, and member information from the Korean National Assembly in real-time.
This server provides the following tools:
-
Bill Search & Retrieval
search_bills(keyword): Search for bills by keyword (e.g., "AI", "Budget").get_recent_bills(): Get a list of recently proposed bills.get_bill_details(bill_id): Get detailed information (summary, reason for proposal) of a specific bill.get_bill_info(...): Advanced search with filters like bill ID, proposer, date, etc.
-
Meeting Records & Committees
get_meeting_records(bill_id): Get committee meeting records related to a specific bill.search_meetings(...): Search meeting records by date, committee name, etc.get_committee_list(): Get a list of National Assembly committees.get_committee_members(...): Get the roster (member list) of a committee.
-
Member Information
get_member_info(name): Get details about a National Assembly member (party, constituency, etc.).
-
Advanced Tools
get_assembly_info(): Check server status and available API info.list_api_services(): Search for all available API services.call_api_raw(): (Advanced) Call API services directly with custom parameters.
- The server can reach ~270 National Assembly OpenAPI endpoints. If a high-level tool is missing, do NOT answer “not supported.”
- Default pattern:
list_api_services(keyword)→get_api_spec(service_id)→call_api_raw(service_id, params). This lets you fetch any dataset. - Search with broad keywords (Korean/English, spacing variants). Use
get_api_specto confirm required params, then call viacall_api_raw. - Example: “committee members” → search
list_api_services("위원 명단" or "committee member")→ inspect withget_api_spec→ fetch withcall_api_raw→ enrich individuals viaget_member_info. - When replying: if a high-level tool is absent, propose this workflow or directly chain the calls to produce the answer.
- Shortcut: committee rosters are available directly via
get_committee_members, then enrich individuals viaget_member_info.
This project is managed with uv and can be run directly using uvx without manual installation.
Obtain an API key from the Public Data Portal (data.go.kr). Look for APIs provided by the National Assembly Secretariat (국회사무처).
To use this MCP server with the Claude Desktop app, you need to configure it.
-
Open the configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Add the following configuration. (Replace
your_api_key_herewith your actual API key)
{
"mcpServers": {
"assembly": {
"command": "uvx",
"args": ["git+https://github.com/StatPan/AssemblyMCP"],
"env": {
"ASSEMBLY_API_KEY": "your_api_key_here"
}
}
}
}- Restart Claude Desktop. You should see the 🔌 icon indicating the AssemblyMCP tools are active.
You can run the server directly in your terminal to verify it starts correctly.
# Set API Key (Linux/macOS)
export ASSEMBLY_API_KEY="your_api_key_here"
# Run Server
# Fetches the latest code from GitHub and runs it.
uvx git+https://github.com/StatPan/AssemblyMCPTo contribute or run locally for development:
- Python 3.12+
- uv package manager
# 1. Clone repository
git clone https://github.com/StatPan/AssemblyMCP.git
cd AssemblyMCP
# 2. Install dependencies
uv sync
# 3. Configure environment
cp .env.example .env
# Edit .env and add your ASSEMBLY_API_KEY
# 4. Run development server
uv run assemblymcp# Lint and Format
uv run ruff check .
uv run ruff format .
# Run Tests
uv run pytestAssemblyMCP adopts a "Battery-Included" architecture, allowing you to control operational features like logging and caching via environment variables without modifying the code.
| Variable | Description | Default | Example |
|---|---|---|---|
ASSEMBLY_API_KEY |
[Required] API Key | - | 1234abcd... |
ASSEMBLY_LOG_LEVEL |
Logging Level | INFO |
DEBUG |
ASSEMBLY_LOG_JSON |
Enable JSON Logging (for Cloud Run) | False |
True |
ASSEMBLY_ENABLE_CACHING |
Enable In-Memory Caching | False |
True |
ASSEMBLY_CACHE_TTL_SECONDS |
Cache TTL (seconds) | 300 (5 min) |
600 |
ASSEMBLY_CACHE_MAX_SIZE |
Max Cache Items | 100 |
500 |
For serverless environments like Cloud Run or AWS Lambda, we recommend the following settings:
# Enable JSON logging for structured logs
export ASSEMBLY_LOG_JSON=true
# Enable caching to reduce API calls and improve speed
export ASSEMBLY_ENABLE_CACHING=trueThis server can be easily deployed to cloud platforms like Google Cloud Run, Railway, and Fly.io using Docker.
- A Dockerfile is included, so you can build immediately.
- Set the required environment variables (e.g.,
ASSEMBLY_API_KEY) during deployment. - The server runs in
Streamable HTTPmode on port8000by default.
gcloud run deploy assembly-mcp \
--source . \
--region asia-northeast3 \
--allow-unauthenticated \
--set-env-vars ASSEMBLY_API_KEY="your_key",ASSEMBLY_LOG_JSON="true",ASSEMBLY_ENABLE_CACHING="true"- Streamable HTTP Transport: Uses the latest MCP standard.
- Endpoint: The MCP server runs at
/mcp.
MIT