50 free queries/day · no card required · OAuth signup at ansvar.eu/gateway
One endpoint, one OAuth signup, access from any MCP-compatible client.
Claude Code (one line):
claude mcp add ansvar --transport http https://gateway.ansvar.eu/mcpClaude Desktop / Cursor — add to claude_desktop_config.json (or mcp.json):
{
"mcpServers": {
"ansvar": {
"type": "url",
"url": "https://gateway.ansvar.eu/mcp"
}
}
}Claude.ai — Settings → Connectors → Add custom connector → paste https://gateway.ansvar.eu/mcp
First request opens an OAuth flow at ansvar.eu/gateway. After signup, your client is bound to your account; tier (free / premium / team / company) determines fan-out, quota, and which downstream MCPs are reachable.
You can also clone this repo and build the corpus yourself. The schema, fetcher, and tool implementations all live here. What is not in the repo is the pre-built database — TDM and standards-licensing constraints on the upstream sources mean we host the corpus on Ansvar infrastructure rather than redistribute it as a public artifact.
Build your own: run this repo's ingestion script (entry-point varies per
repo — typically scripts/ingest.sh, npm run ingest, or make ingest;
check the repo root).
Five MCP (Model Context Protocol) servers providing structured access to Swedish agency regulations governing the work environment, building safety, emergency preparedness, public health, and radiation protection.
| Package | Agency | Gazette | Description |
|---|---|---|---|
arbetsmiljo |
Arbetsmiljoverket (AV) | AFS | Occupational safety and health: chemical hazards, asbestos, machinery, ergonomics, construction sites, ventilation |
boverket |
Boverket | BFS | Building codes (BBR), construction products, planning and building permits, accessibility, energy performance |
msb |
Myndigheten for samhallsskydd och beredskap (MSB) | MSBFS | Fire protection, hazardous materials transport, IT security for essential services, civil protection |
folkhalsomyndigheten |
Folkhalsomyndigheten (FoHM) | FoHMFS | Indoor air quality, drinking water, noise limits, hygiene, infection control, environmental health |
stralsakerhet |
Stralsakerhetsmyndigheten (SSM) | SSMFS | Radiation protection, nuclear facility safety, medical radiation, radioactive waste, transport of radioactive materials |
Add to your MCP client configuration:
docker pull ghcr.io/ansvar-systems/swedish-work-environment-mcp:latest
docker run -p 3000:3000 ghcr.io/ansvar-systems/swedish-work-environment-mcp:latestEach agency has its own image. Replace swedish-work-environment-mcp with:
swedish-building-code-mcp(Boverket)swedish-emergency-preparedness-mcp(MSB)swedish-public-health-mcp(FoHM)swedish-radiation-protection-mcp(SSM)
All five servers expose the same 9 tools:
search_regulations-- Full-text search across regulationsget_regulation-- Retrieve a regulation by IDget_section-- Retrieve a specific section by IDlist_regulations-- List regulations with filtering and paginationsearch_definitions-- Search defined terms across regulationsget_cross_references-- Get cross-references to SFS laws, EU directives, SIS standardsvalidate_citation-- Check if a citation refers to a valid regulation or sectionlist_sources-- List data sources and provenanceabout-- Server metadata and database statistics
See TOOLS.md for full parameter and response schemas.
All data is sourced from official Swedish government publications under PSI / open data re-use rules. See sources.yml for per-agency details including URLs, licenses, and refresh schedules.
- Node.js >= 20
- npm 10+
git clone https://github.com/Ansvar-Systems/swedish-work-environment-fleet.git
cd swedish-work-environment-fleet
npm install
npm run buildnpm testnpm run build -w packages/core
npx -w packages/arbetsmiljo tsx src/ingest.ts --forceReplace arbetsmiljo with any package name. Database files (*.db) are gitignored and must be generated via ingestion.
npm run serve -w packages/arbetsmiljoThis is an npm workspaces monorepo:
packages/
core/ Shared library: database schema, 9 tool implementations, FTS5 search, HTTP server
arbetsmiljo/ AV ingestion + config
boverket/ Boverket ingestion + config
msb/ MSB ingestion + config
folkhalsomyndigheten/ FoHM ingestion + config
stralsakerhet/ SSM ingestion + config (PDF extraction)
Each agency package provides an ingestion script that fetches regulations from official sources, parses them, and writes a SQLite database. The shared core provides the MCP tool definitions, FTS5 search index, HTTP server, and citation formatting.
- CI: Lint, typecheck, and test on every push
- GHCR build: On push to
main, builds 5 Docker images with fresh ingestion data and pushes to GHCR - npm publish: Publishes all 5 packages to npm on tagged releases
- Freshness monitoring: Daily check for data staleness, auto-creates GitHub issues
- Security scanning: CodeQL, Semgrep, Trivy, Gitleaks, OpenSSF Scorecard, Dependabot