Switzerland Land & Woodland MCP
README.md
# Switzerland Land & Woodland MCP
[](https://github.com/ansvar-systems/ch-land-woodland-mcp/actions/workflows/ci.yml)
[](https://github.com/ansvar-systems/ch-land-woodland-mcp/actions/workflows/ghcr-build.yml)
[](https://opensource.org/licenses/Apache-2.0)
Swiss land law, forest protection, and spatial planning via the [Model Context Protocol](https://modelcontextprotocol.io). Query BGBB land acquisition rules, Waldgesetz forest duties, RPG building zones, Fruchtfolgeflaechen quotas, and agricultural leases -- all from your AI assistant.
Part of [Ansvar Open Agriculture](https://ansvar.eu/open-agriculture).
## Why This Exists
Swiss land and woodland law is spread across multiple federal acts (BGBB, WaG, RPG, LPG) and cantonal regulations. Farmers, notaries, and spatial planners need quick access to acquisition restrictions, forest clearing rules, building permits in agricultural zones, farmland protection quotas, and lease conditions. This MCP server makes all of it searchable.
## Quick Start
### Claude Desktop
Add to `claude_desktop_config.json`:
```json
{
"mcpServers": {
"ch-land-woodland": {
"command": "npx",
"args": ["-y", "@ansvar/ch-land-woodland-mcp"]
}
}
}
```
### Claude Code
```bash
claude mcp add ch-land-woodland npx @ansvar/ch-land-woodland-mcp
```
### Streamable HTTP (remote)
```
https://mcp.ansvar.eu/ch-land-woodland/mcp
```
### Docker (self-hosted)
```bash
docker run -p 3000:3000 ghcr.io/ansvar-systems/ch-land-woodland-mcp:latest
```
### npm (stdio)
```bash
npx @ansvar/ch-land-woodland-mcp
```
## Example Queries
Ask your AI assistant:
- "Wer darf landwirtschaftlichen Boden kaufen? (BGBB Selbstbewirtschafter)"
- "What are the forest clearing rules in Switzerland?"
- "Can I build a farmhouse in the Landwirtschaftszone?"
- "How are Fruchtfolgeflaechen quotas distributed by canton?"
- "What is the minimum lease duration for Betriebspacht?"
- "Search planning zones for Schutzzone restrictions"
## Stats
| Metric | Value |
|--------|-------|
| Tools | 10 (3 meta + 7 domain) |
| Jurisdiction | CH |
| Data sources | BGBB (SR 211.412.11), WaG (SR 921.0), RPG (SR 700), LPG (SR 221.213.2), Sachplan FFF |
| License (data) | Swiss Federal Administration -- free reuse |
| License (code) | Apache-2.0 |
| Transport | stdio + Streamable HTTP |
## Tools
| Tool | Description |
|------|-------------|
| `about` | Server metadata, version, coverage, links |
| `list_sources` | Data sources with authority, URL, license |
| `check_data_freshness` | Staleness status and refresh instructions |
| `search_land_rules` | Full-text search across all land/woodland regulations |
| `get_bgbb_rules` | BGBB land acquisition rules (Selbstbewirtschafter, Realteilung, Ertragswert) |
| `get_forest_rules` | Waldgesetz duties (Rodungsverbot, Realersatz, Waldabstand) |
| `get_building_rules` | RPG building rules in agricultural/non-building zones |
| `get_farmland_protection` | FFF quotas (national minimum, cantonal distribution) |
| `get_lease_rules` | Agricultural lease rules (LPG duration, rent, termination) |
| `search_planning_zones` | Planning zone search (Landwirtschafts-, Bau-, Schutzzonen) |
See [TOOLS.md](TOOLS.md) for full parameter reference.
## Coverage
12 BGBB rules, 8 forest rules, 9 building rules, 16 farmland protection entries, 5 lease rules, 9 planning zones. Jurisdiction: CH (federal level). See [COVERAGE.md](COVERAGE.md) for gaps and limitations.
## Documentation
- [TOOLS.md](TOOLS.md) -- full tool reference with parameters and examples
- [COVERAGE.md](COVERAGE.md) -- what is and is not included
- [DISCLAIMER.md](DISCLAIMER.md) -- bilingual legal disclaimer (DE/EN)
- [SECURITY.md](SECURITY.md) -- vulnerability reporting
- [PRIVACY.md](PRIVACY.md) -- data handling
- [CHANGELOG.md](CHANGELOG.md) -- release history
## Development
```bash
npm install
npm run build
npm test
npm run dev # watch mode
npm run lint # ESLint
npm run typecheck # tsc --noEmit
```
## Data Ingestion
```bash
npm run ingest # standard ingestion
npm run ingest:fetch # fetch upstream only
npm run ingest:diff # check for changes
npm run ingest:full # force full rebuild
```
Automated via GitHub Actions: `ingest.yml` runs monthly, `check-freshness.yml` runs daily.
## License
Code: [Apache-2.0](LICENSE). Data: Swiss Federal Administration -- free reuse.
Built by [Ansvar Systems](https://ansvar.eu) | [MCP Network](https://ansvar.ai/mcp)
This server cannot be deployed
Maintenance
ActivityNo data
ResponsivenessSyncing