Riksdag-Regering MCP server with 32 specialized tools for Swedish political data (Parliament, Government, MPs, votes, documents)
license
Apache-2.0
Riksdag-Regering MCP Server
🔴 AI FIRST Quality Principle
Apply the AI FIRST principle: never accept first-pass quality. Minimum 2 iterations. Read all output, improve every section. No shortcuts.
Purpose
Provide comprehensive access to Swedish political data through the riksdag-regering-mcp Model Context Protocol (MCP) server. Enables intelligence operatives and political analysts to query, analyze, and visualize data from the Swedish Riksdag (Parliament) and Regeringen (Government).
Core Principles
Authoritative Data Source: Official Swedish government data (data.riksdagen.se, regeringen.se)
Comprehensive Coverage: 50+ years of historical data (1971-2024)
Structured API: 32 specialized tools for different data types
Real-Time Access: Latest parliamentary and government activities
GDPR Compliance: Public interest basis (Article 6(1)(e)), no personal data beyond official capacity
Multi-Source Integration: Riksdag documents + Government publications
Quantitative Context Handoff: Pair parliamentary evidence with SCB/Riksbank helper outputs when domestic economic transmission matters; keep IMF as cross-country macro canon and SCB/Riksbank as Swedish ground truth.
Available Tools (32 Total)
🔍 Search & Discovery (6 tools)
search_ledamoter: Search for MPs (349 members) by name, party, constituency
⚠️ Tool names use underscores (e.g., get_sync_status, NOT get-sync-status).
The gateway at http://host.docker.internal:$MCP_GATEWAY_PORT/mcp/riksdag-regering (port 8080 for gh-aw v0.69+, port 80 for legacy gh-aw <0.69 — resolved dynamically by mcp-setup.sh) handles routing.
See .github/prompts/02-mcp-access.md for MCP server access, direct tool invocation, and tool-naming conventions (and the .github/prompts/README.md for the full module catalogue).
Examples (TypeScript)
Good Pattern: MP Voting Discipline Analysis
// Get all votes from current riksmöteconst votes = await riksdag_regering_mcp.search_voteringar({
rm: "2024/25",
limit: 200
});
// Analyze party cohesionconst partyDiscipline = {};
for (const party of ['S', 'M', 'SD', 'C', 'V', 'KD', 'L', 'MP']) {
const partyVotes = await riksdag_regering_mcp.get_voting_group({
rm: "2024/25",
groupBy: "parti",
limit: 200
});
// Calculate cohesion metric
partyDiscipline[party] = calculateCohesion(partyVotes);
}
Good Pattern: Committee Productivity Analysis
// Get reports from all committeesconst committees = ['AU', 'FiU', 'JuU', 'KU', 'SkU', 'SfU', 'UU'];
const productivity = {};
for (const committee of committees) {
const reports = await riksdag_regering_mcp.get_betankanden({
organ: committee,
rm: "2024/25",
limit: 100
});
productivity[committee] = {
count: reports.length,
avgProcessingTime: calculateAvgTime(reports)
};
}
Good Pattern: Government Document Analysis
// Search government propositions on specific topicconst props = await riksdag_regering_mcp.search_regering({
type: "propositioner",
title: "migration",
dateFrom: "2024-01-01",
limit: 50
});
// Get full content for analysisfor (const prop of props) {
const content = await riksdag_regering_mcp.get_g0v_document_content({
regeringenUrl: prop.url
});
// Analyze policy positionsanalyzePolicy(content);
}
RULE #1: Call get_sync_status() before any data queries
// === DATA FRESHNESS CHECK ===// ALWAYS call this FIRST - validates freshness and warms up serverconst syncStatus = get_sync_status({});
console.log("Last data sync:", syncStatus.last_updated);
// Calculate hours since last syncconst lastSync = newDate(syncStatus.last_updated);
const hoursSinceSync = (Date.now() - lastSync.getTime()) / 3600000;
// Warn if data is stale (>48 hours)if (hoursSinceSync > 48) {
console.warn(`⚠️ DATA MAY BE STALE: ${hoursSinceSync.toFixed(1)} hours since last sync`);
// Include disclaimer in analysis/articles
}
Why this matters:
Data Quality: Ensures analysis uses recent data, not stale information
Server Warmup: Warms up MCP server (avoids 30-60s cold start on first query)
User Transparency: Readers/stakeholders know when data was last updated
Quality Control: Prevents publishing analysis with outdated information
📅 Date Parameter Support Matrix
Only 3 of 32 tools support explicit date parameters:
Version: 1.0 Last Updated: 2026-02-06 Maintained by: Hack23 AB
🔗 Integration with agentic workflows & analysis artifacts
This skill is consumed by the 11 agentic news workflows in .github/workflows/news-*.md. The authoritative contract lives in .github/prompts/README.md; this skill supplies domain expertise on top of that contract.
Required before any article: 9 core artifacts (14 for Tier-C) in analysis/daily/$ARTICLE_DATE/$SUBFOLDER/; 05-analysis-gate.md is the single blocking gate.