Content
# Tool List

**Just register one URL with Claude, and it answers questions about 50 startup laws and 8,191 articles based on the actual text. Instead of hallucinations like "○○ law Article N", only real articles verified through indexing are provided.**
<!-- 데모 스크린샷 자리: claude.ai에서 실제 질문→조문 답변 화면을 캡처해
docs/assets/demo.png 로 저장한 뒤 아래 줄의 주석을 해제하세요 -->
<!--  -->
> **"Can I get a tax deduction for starting a cafe?"**
> → Claude calls `search_law` → `get_article` to answer based on the original text of the <a href="#">Tax Special Exceptions Act Article 6 (Tax Deductions for Small and Medium Enterprises)</a> and its effective date (2026.01.01). Verification is also done using `verify_citation`.
If you found this project useful, please give it a ⭐.
## 🚀 Ready to Use — No Installation Required
A remote server is deployed and can be connected directly without local installation: `https://startup-law-mcp.fly.dev/mcp`
(The Fly.io app name may change after deployment, so check the repository notice for the actual URL).
| Client | Registration Method |
|---|---|
| Claude Desktop / claude.ai | Settings → Connector → Custom Connector → Enter the URL above |
| Claude Code | `claude mcp add --transport http startup-law https://startup-law-mcp.fly.dev/mcp` |
The remote version exposes only **13 tools** (excluding the management tool `sync_programs`). The machine goes into sleep mode when idle, so the first request may take a few seconds due to cold start — subsequent requests are fast. To run all 14 tools (including management) locally, follow the "Quick Start" guide below.
**Integrated MCP for Startup Laws and K-Startup Support Programs** — Indexes core laws related to startup practices, such as corporate establishment, tax deductions, first employment, and intellectual property, and provides K-Startup support program notices and introductions that can be cited directly in MCP clients like Claude Desktop.
## What Problems Does It Solve
- **Limitations of General Law Search**: Existing law MCPs deal with all national laws (thousands of them) superficially, making it easy for irrelevant results to appear for startup domain questions. This project curates only 19 startup-related laws (+ enforcement ordinances and rules) to increase accuracy.
- **LLM Hallucinations**: The problem of LLMs citing non-existent articles or creating titles is addressed by indexing and verifying citations (`verify_citation`).
- **Article Reference Tracking**: The scope of referencing between articles is visualized in a graph (`find_references`).
- **Data Freshness**: Laws are frequently revised. The synchronization script reflects the current version from the National Law Information Center Open API.
- **Support Program Exploration**: It's hard to find "what support programs are currently applicable?" just with laws. This project also queries K-Startup program notices and introductions, providing open/closing_soon/upcoming/closed status and D-day calculations (`search_program`, `list_open_programs`).
## Indexing Scope
Curated 19 laws + subordinate enforcement ordinances and rules, totaling **50 documents · 8,191 articles** (as of 2026-07-11, measured in `data/sources.json`). Law names and current status are rechecked with the Open API during synchronization.
| Category | Law | Number of Documents (Law+Ordinance/Rule) | Number of Articles | Current Effective Date |
|---|---|---:|---:|---|
| Startup·Venture Core | Support for Small and Medium Enterprise Startups Act | 3 | 157 | 2026.07.01 |
| ... | ... | ... | ... | ... |
The curation list is managed in `data/laws.json`.
### Support Programs (K-Startup)
Snapshot from the 'Startup Support Program Inquiry Service' on the Public Data Portal — **309 program notices** (filtered to only include currently open or soon-to-be-open programs, as of 2026-07-12) + **511 program introductions** (entire catalog). Stored in `data/programs/*.json`, notices include open/closed status, D-day, and target details, while introductions cover program summaries and support details.
## Quick Start
### 1. Requirements
- Python 3.10+ (using standard libraries and the `mcp` package)
- National Law Information Center Open API OC key — free issuance from [open.law.go.kr](https://open.law.go.kr) (email ID prefix is the OC value)
- (Optional) Public Data Portal authentication key — for using support program inquiries, apply and receive a key from [data.go.kr](https://www.data.go.kr) for the 'Startup Support Program Inquiry Service'. **This key is completely separate from the law OC key**, and the environment variable name is `DATA_GO_KR_KEY`.
```bash
pip install -r requirements.txt
```
### 2. Law Synchronization + Index Building
```bash
# Windows (PowerShell)
$env:LAW_OC = "issued OC key"
python law_sync.py sync
python law_search.py build
# macOS/Linux
export LAW_OC=issued OC key
python law_sync.py sync
python law_search.py build
```
`law_sync.py sync` updates `data/laws/*.md` (law-specific markdown) and `data/sources.json` (manifest) by querying the curated list in `data/laws.json` with the Open API. `law_search.py build` parses the markdown into article-level data and creates `data/index.json` (for search, not committed).
### 3. Support Program Synchronization (Optional)
```bash
# Windows (PowerShell)
$env:DATA_GO_KR_KEY = "issued authentication key"
python program_sync.py sync
# macOS/Linux
export DATA_GO_KR_KEY=issued authentication key
python program_sync.py sync
```
Updates `data/programs/announcements.json` (current notices) and `data/programs/intros.json` (program introductions). An initial snapshot is already committed to the repository, so only run this when you need the latest notices.
### 4. Connecting to Claude Desktop
Register in `claude_desktop_config.json` (Windows) or `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):
```json
{
"mcpServers": {
"startup-law": {
"command": "python",
"args": ["C:/absolute/path/startup-law-mcp/server.py"]
}
}
}
```
Restart Claude Desktop to recognize 14 tools.
## Usage Examples
When asking Claude Desktop in natural language, the server automatically calls search and inquiry tools.
- "What are the requirements for tax deductions for startups?" → `search_law` + `get_article` → answers based on the <a href="#">Tax Special Exceptions Act Article 6 (Tax Deductions for Small and Medium Enterprises)</a>
- ...
## Tools
> In the input field, parameters with `?` are **optional**, and the rest are required. `limit` is an integer between 1 and 50 (out of range returns `invalid_input`). `law_type` uses actual law type values (laws, presidential decrees, etc.) and can be confirmed with `list_laws`.
Laws (5):
| Tool | Input | Output |
|---|---|---|
| `search_law` | `query, law_type?, source?, limit?, fuzzy?` | Article-level search results (snippet + citation + score) |
| `get_article` | `source, article` | Full article text (including effective date) |
| ... | ... | ... |
...
## Data Structure
```
data/
├── laws.json # Curation list (law name, classification) — synchronization input
├── sources.json # Synchronization manifest (law name, law type, promulgation/implementation date, responsible ministry, errors) — commit target
├── laws/ # Law markdown files "{law type}_{law name}.md" — commit target
│ └── 중소기업창업 지원법.md
├── index.json # Search index array (build output, gitignored)
├── programs/ # K-Startup program snapshots — commit target
│ ├── announcements.json # Current program announcements (fetched_at, count, items[])
│ └── intros.json # Program introductions (fetched_at, count, items[])
├── stages.json # 6-stage curation for startup (id/order/name/summary/key_articles/checklist/program_hints) — commit target
└── _cache/ # Probe result JSON (gitignored)
```
`server.py`(stdio, 14 local tools) and `server_http.py`(streamable-http, 13 remote tools, excluding `sync_programs`) share the same `register_tools()` and read `data/` directly.
Law markdown files follow a fixed "Format A" structure:
```markdown
# {Law Name} ({Law Type} No. {Promulgation Number}, effective {Implementation Date})
- Law Type: {Law Type}
- Promulgation Date: ...
- Implementation Date: ...
- Responsible Ministry: ...
## {Chapter Title}
### Article {Article Number} ({Article Title})
<Effective {Article Implementation Date}>
{Article Text — flattening sections and subsections}
## Supplementary Provisions <No. {Promulgation Number}, {Promulgation Date}>
{Supplementary Provisions Text}
```
## Maintaining Currency
Laws are frequently amended, so periodic re-synchronization is necessary.
```bash
python law_sync.py sync # Re-synchronize entire curation list
python law_sync.py sync --only 창업 # Only laws with "창업" in their name
python law_search.py build # Rebuild markdown → index (always run after synchronization)
```
To add a new law, add an entry to `data/laws.json` and then run `sync` → `build`.
## Automation (v1.4)
The GitHub Actions workflow `weekly-sync` synchronizes laws and programs every Monday at 06:00 (KST). If changes are detected, a PR is automatically created in the `auto/weekly-sync` branch. After review and merge, the changes are reflected in the `main` branch.
**Fork/self-hosting setup**:
1. Repository Settings → Secrets and variables → Actions:
- `LAW_OC`: Open API OC key for the National Law Information Center
- `DATA_GO_KR_KEY`: Authentication key for the Public Data Portal (if program synchronization is required)
2. Settings → Actions → General:
- Workflow permissions: "Read and write permissions"
- "Allow GitHub Actions to create and approve pull requests" enabled
3. (Optional) manual execution: Actions tab → weekly-sync → "Run workflow"
## Technical Memo
- **Minimal dependencies**: Standard libraries only (regex, JSON, urllib) for search, indexing, and synchronization. Only the MCP server depends on the `mcp` package. No embedding/semantic search — prioritizing accuracy and transparency over dependencies.
- **Search algorithm**: Korean tokenizer + TF-IDF scoring, with optional syllable bi-gram fuzzy matching.
- **Citation verification**: `verify_citation` finds the closest law name and checks if the citation is accurate.
- **Citation graph**: `find_references` parses external and internal citations.
## Roadmap
- **v1.0** — 19 law indexing, basic 5 tools + CLI, local stdio
- **v1.1** — K-Startup program integration: 4 additional tools, 310 program announcements + 511 program introductions
- **v1.2 stabilization patch** — synchronization defense logic, URL storage boundary normalization, manifest indexing + stale display
- **v1.3 startup specialization** — 3 additional tools: delegation map, startup stage guide, and effective date check
- **v1.4 automation** — GitHub Actions weekly synchronization → automatic PR creation
- **v2.0 remote deployment** — `server_http.py` + Dockerization + Fly.io deployment → single URL connection
## License
- **Code**: MIT.
- **Law data**: Publicly available data collected through the National Law Information Center's Open API.
- **Program data**: Publicly available data provided by the Small and Medium Enterprise Promotion Agency (K-Startup) through the Public Data Portal.
- **Disclaimer**: Law articles and program information are for reference only. Official articles must be verified through the [National Law Information Center](https://www.law.go.kr), and program applications must be verified through [K-Startup](https://www.k-startup.go.kr). This server does not provide legal advice.
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
No recommendations available