Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计提醒

riksdag-regering-mcpriksdag regering MCP 搜索

Agent Skill

riksdag-regering-mcp 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

549

周安装

22

GitHub Stars

7

下载量

178
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:riksdag-regering-mcp(riksdag regering MCP 搜索)
来源仓库:https://github.com/hack23/riksdagsmonitor
仓库路径:skills/riksdag-regering-mcp
安装命令:
npx skills add https://github.com/hack23/riksdagsmonitor --skill riksdag-regering-mcp
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/hack23/riksdagsmonitor --skill riksdag-regering-mcp

简介

riksdag-regering-mcp 用于查找、检索和筛选相关信息,支持基于关键词快速定位候选结果。

  • 适用于瑞典政治与政府事务相关的信息调研场景。
  • 通过 npx skills add 从 GitHub 仓库安装,路径为 skills/riksdag-regering-mcp。
  • 安装前建议确认是否允许访问政府公开数据接口,遵守地区合规要求。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

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

  1. Authoritative Data Source: Official Swedish government data (data.riksdagen.se, regeringen.se)
  2. Comprehensive Coverage: 50+ years of historical data (1971-2024)
  3. Structured API: 32 specialized tools for different data types
  4. Real-Time Access: Latest parliamentary and government activities
  5. GDPR Compliance: Public interest basis (Article 6(1)(e)), no personal data beyond official capacity
  6. Multi-Source Integration: Riksdag documents + Government publications

Available Tools (32 Total)

🔍 Search & Discovery (6 tools)

  • search_ledamoter: Search for MPs (349 members) by name, party, constituency
  • search_dokument: Search parliamentary documents (motions, bills, reports)
  • search_dokument_fulltext: Full-text search across document content
  • search_anforanden: Search speeches and parliamentary debates
  • search_voteringar: Search voting records and roll calls
  • search_regering: Search government documents (propositions, SOU, Dir)

📊 Detailed Information (6 tools)

  • get_dokument: Get complete document with metadata and content
  • get_ledamot: Get MP profile with assignments, activities, bio
  • get_dokument_innehall: Get document content and summary
  • get_g0v_document_content: Get government document in Markdown
  • get_discussion: Get specific discussion thread
  • get_discussion_comments: Get comments from a discussion

📝 Parliamentary Documents (6 tools)

  • get_motioner: Latest motions (proposals from MPs)
  • get_propositioner: Latest government propositions
  • get_betankanden: Latest committee reports
  • get_fragor: Latest written questions
  • get_interpellationer: Latest interpellations (formal questions)
  • get_utskott: List parliamentary committees (15 committees)

🏛️ Government Documents (4 tools)

  • get_regering_document: Get government document by ID
  • summarize_regering_document: AI-powered government document summary
  • get_g0v_document_types: List available government document types
  • get_g0v_category_codes: List government policy area codes

📈 Analytics & Aggregation (5 tools)

  • get_voting_group: Get votes grouped by party/constituency
  • list_reports: List available statistical reports
  • fetch_report: Get statistical report (MP stats, committee data)
  • analyze_g0v_by_department: Analyze government documents by department
  • get_g0v_latest_update: Check latest government data update

🔄 Advanced Queries (5 tools)

  • fetch_paginated_documents: Batch fetch with pagination
  • fetch_paginated_anforanden: Batch fetch speeches
  • batch_fetch_documents: Multi-year document batches
  • get_calendar_events: Parliamentary calendar (debates, committees)
  • enhanced_government_search: Combined Riksdag + Government search

Data Coverage

Swedish Riksdag (Parliament)

  • 349 MPs: Current members across 8 parties
  • 15 Committees: AU, FiU, JuU, KU, SkU, SfU, UU, UtU, etc.
  • Documents: 50+ years (1971-2024)

- Motions (mot): MP proposals - Propositions (prop): Government bills - Reports (bet): Committee reports - Questions (fr): Written questions - Interpellations (ip): Formal questions

  • Votes: Complete voting records with party/MP breakdown
  • Speeches: Parliamentary debates (anföranden)

Swedish Government (Regeringen)

  • Document Types: Propositions, SOU (state investigations), Dir (committee directives), DS (department series), Remisser (referrals)
  • Departments: All 10 ministries
  • Historical Data: Government documents from 1990s+
  • G0V Integration: Markdown-formatted documents via g0v.se

8 Parliamentary Parties

  • S - Socialdemokraterna (Social Democrats)
  • M - Moderaterna (Moderates)
  • SD - Sverigedemokraterna (Sweden Democrats)
  • MP - Miljöpartiet (Green Party)
  • C - Centerpartiet (Centre Party)
  • V - Vänsterpartiet (Left Party)
  • KD - Kristdemokraterna (Christian Democrats)
  • L - Liberalerna (Liberals)

When to Use

  • Political Intelligence: Analyze voting patterns, coalition behavior
  • Legislative Monitoring: Track bills, motions, committee work
  • MP Analysis: Profile MPs, track activities, voting discipline
  • Coalition Analysis: Assess government stability, party cooperation
  • Policy Research: Trace policy development through documents
  • Voting Analysis: Party cohesion, rebels, cross-party voting
  • Government Oversight: Track government proposals, investigations
  • Electoral Research: Historical trends, party evolution
  • Transparency Dashboards: Real-time political metrics
  • Risk Assessment: Identify democratic accountability gaps

Calling MCP Tools in Agentic Workflows

In gh-aw agentic workflows, MCP tools are called directly by name without any prefix. The MCP gateway routes to the correct server automatically:

// Direct tool calls in agentic workflows (no prefix needed):
get_sync_status({})                                       // Health check — ALWAYS call first
get_propositioner({ rm: "2025/26", limit: 20 })           // Government propositions
get_betankanden({ rm: "2025/26", limit: 20 })             // Committee reports
search_dokument({ doktyp: "prop", rm: "2025/26" })        // Search documents
search_voteringar({ rm: "2025/26", parti: "S" })          // Search votes
get_calendar_events({ from: "2026-04-01", tom: "2026-04-30" }) // Calendar events
⚠️ Tool names use underscores (e.g., get_sync_status, NOT get-sync-status). The gateway at http://host.docker.internal:80/mcp/riksdag-regering handles routing. See SHARED_PROMPT_PATTERNS.md → "MCP Architecture & Tool Reference" for full tool list.

Examples (TypeScript)

Good Pattern: MP Voting Discipline Analysis

// Get all votes from current riksmöte
const votes = await riksdag_regering_mcp.search_voteringar({
  rm: "2024/25",
  limit: 200
});

// Analyze party cohesion
const 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 committees
const 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 topic
const props = await riksdag_regering_mcp.search_regering({
  type: "propositioner",
  title: "migration",
  dateFrom: "2024-01-01",
  limit: 50
});

// Get full content for analysis
for (const prop of props) {
  const content = await riksdag_regering_mcp.get_g0v_document_content({
    regeringenUrl: prop.url
  });

  // Analyze policy positions
  analyzePolicy(content);
}

Good Pattern: Multi-Language Political Dashboard

// Get latest parliamentary activity
const motions = await riksdag_regering_mcp.get_motioner({ limit: 10 });
const props = await riksdag_regering_mcp.get_propositioner({ limit: 10 });
const questions = await riksdag_regering_mcp.get_fragor({ limit: 10 });

// Create bilingual dashboard (Swedish/English)
const dashboard = {
  sv: formatDashboardSV({ motions, props, questions }),
  en: formatDashboardEN({ motions, props, questions })
};

Anti-Pattern: Over-Fetching Without Filtering

// ❌ BAD: Fetching too much data
const allDocs = await riksdag_regering_mcp.search_dokument({
  limit: 200 // Default, could be thousands
});

// ✅ GOOD: Targeted query with filters
const recentDocs = await riksdag_regering_mcp.search_dokument({
  rm: "2024/25",
  doktyp: "mot",
  organ: "FiU",
  limit: 50
});

Anti-Pattern: Ignoring Pagination

// ❌ BAD: Only getting first page
const votes = await riksdag_regering_mcp.search_voteringar({ limit: 20 });

// ✅ GOOD: Handling pagination
const allVotes = await riksdag_regering_mcp.fetch_paginated_documents({
  doktyp: "votering",
  rm: "2024/25",
  fetchAll: true,
  maxPages: 10
});

🔥 MCP Query Best Practices

⚡ CRITICAL: Always Check Data Freshness First

RULE #1: Call get_sync_status() before any data queries

// === DATA FRESHNESS CHECK ===
// ALWAYS call this FIRST - validates freshness and warms up server
const syncStatus = get_sync_status({});
console.log("Last data sync:", syncStatus.last_updated);

// Calculate hours since last sync
const lastSync = new Date(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:

  1. Data Quality: Ensures analysis uses recent data, not stale information
  2. Server Warmup: Warms up MCP server (avoids 30-60s cold start on first query)
  3. User Transparency: Readers/stakeholders know when data was last updated
  4. Quality Control: Prevents publishing analysis with outdated information

📅 Date Parameter Support Matrix

Only 3 of 32 tools support explicit date parameters:

ToolDate ParametersExample
get_calendar_eventsfrom, tom{from: "2026-02-17", tom: "2026-02-23"}
search_regeringfrom_date, to_date{from_date: "2026-02-01", to_date: "2026-02-17"}
analyze_g0v_by_departmentdateFrom, dateTo{dateFrom: "2026-02-01", dateTo: "2026-02-17"}

All other 29 tools require post-query date filtering by:

  • datum - votes, speeches (voting/speech date)
  • publicerad - committee reports, propositions (publication date)
  • inlämnad - motions, questions, interpellations (submission date)

✅ Good Pattern: Explicit Date Filtering

// === STEP 1: Check data freshness ===
const syncStatus = get_sync_status({});

// === STEP 2: Query with explicit dates (where supported) ===
const govDocs = search_regering({
  from_date: "2026-02-01",
  to_date: "2026-02-17",
  limit: 50
});

// === STEP 3: Filter by date for tools without date params ===
const betankanden = get_betankanden({ rm: "2025/26", limit: 100 });

// Filter results by publication date
const fromDate = new Date("2026-02-01");
const recentBetankanden = betankanden.filter(bet =>
  new Date(bet.publicerad) >= fromDate
);

console.log(`Found ${recentBetankanden.length} committee reports from ${fromDate.toISOString().split('T')[0]}`);

❌ Anti-Pattern: Implicit "Latest" Reliance

// ❌ BAD: Relies on implicit sorting without date awareness
const votes = search_voteringar({ rm: "2025/26", limit: 50 });
// Problem: No idea when votes occurred, might be months old

// ✅ GOOD: Explicit date filtering
const votes = search_voteringar({ rm: "2025/26", limit: 50 });
const recentVotes = votes.filter(v =>
  new Date(v.datum) >= new Date("2026-02-01")
);
console.log(`Found ${recentVotes.length} votes since 2026-02-01`);

🔗 Cross-Referencing Strategy

Combine multiple tools for richer analysis:

Pattern 1: Committee Report Deep Dive

// 1. Get recent committee reports
const betankanden = get_betankanden({ rm: "2025/26", limit: 20 });
const recentBet = betankanden.filter(b =>
  new Date(b.publicerad) >= new Date("2026-02-01")
);

// 2. Get full details for each report
const reportDetails = recentBet.map(bet =>
  get_dokument({ dok_id: bet.dok_id })
);

// 3. Find related votes
const votes = search_voteringar({ rm: "2025/26", limit: 100 });
const relatedVotes = votes.filter(v =>
  recentBet.some(bet => v.bet === bet.beteckning)
);

// 4. Get committee members' speeches
const speeches = search_anforanden({ rm: "2025/26", limit: 100 });
const committeeSpeeches = speeches.filter(a =>
  recentBet.some(bet => a.dokument_hangar_samman === bet.dok_id)
);

// Now you have: reports + details + votes + speeches

Pattern 2: Party Behavior Analysis

// 1. Get voting patterns by party
const voteGroups = get_voting_group({ rm: "2025/26", groupBy: "parti" });

// 2. Get recent votes
const votes = search_voteringar({ rm: "2025/26", limit: 200 });
const recentVotes = votes.filter(v =>
  new Date(v.datum) >= new Date("2026-02-01")
);

// 3. Get party motions
const motions = get_motioner({ rm: "2025/26", limit: 100 });
const partyMotions = motions.filter(m =>
  new Date(m.inlämnad) >= new Date("2026-02-01")
);

// 4. Calculate party cohesion
const partyDiscipline = calculateCohesion(voteGroups, recentVotes);

🐛 Troubleshooting Guide

IssueCauseSolution
Tool not foundWrong tool nameUse exact names: get_calendar_events, search_voteringar
Empty resultsNo data in timeframeCheck get_sync_status(), widen date range, verify rm parameter
Stale dataLast sync >48h agoNote in analysis with disclaimer, use available data
TimeoutCold start (30-60s)Wait - MCP framework retries automatically
Too broad resultsNo date filteringAdd date params OR filter by datum/publicerad/inlämnad
Swedish-only resultsRiksdag API returns SwedishMust translate to target languages
Missing documentsWrong riksmöte (rm)Verify rm parameter (e.g., "2025/26")

🚀 Performance Tips

  1. Batch Queries After Warmup: Call get_sync_status() first, then batch data queries
  2. Use Pagination Wisely: Use fetch_paginated_documents for large datasets
  3. Filter Early: Apply date filters as early as possible
  4. Cache Results: MCP server data updates daily, cache results when appropriate
  5. Parallel Queries: Independent queries can run in parallel after server warmup

📊 Query Pattern Templates

Template 1: Daily News Monitoring

const syncStatus = get_sync_status({});
const today = new Date().toISOString().split('T')[0];
const yesterday = new Date(Date.now() - 86400000).toISOString().split('T')[0];

// Government activity
const govDocs = search_regering({
  from_date: yesterday,
  to_date: today,
  limit: 50
});

// Parliamentary calendar
const events = get_calendar_events({
  from: today,
  tom: today,
  limit: 50
});

// Recent votes (filter by date)
const votes = search_voteringar({ rm: "2025/26", limit: 50 });
const todayVotes = votes.filter(v => v.datum === today);

Template 2: Weekly Analysis

const syncStatus = get_sync_status({});
const today = new Date();
const weekAgo = new Date(Date.now() - 7 * 86400000);

// Committee reports (filter by publicerad)
const reports = get_betankanden({ rm: "2025/26", limit: 100 });
const weeklyReports = reports.filter(r =>
  new Date(r.publicerad) >= weekAgo
);

// Propositions (filter by publicerad)
const props = get_propositioner({ rm: "2025/26", limit: 50 });
const weeklyProps = props.filter(p =>
  new Date(p.publicerad) >= weekAgo
);

// Questions (filter by inlämnad)
const questions = get_fragor({ rm: "2025/26", limit: 100 });
const weeklyQuestions = questions.filter(q =>
  new Date(q.inlämnad) >= weekAgo
);

Template 3: MP Activity Analysis

const syncStatus = get_sync_status({});

// Get MP profile
const mp = get_ledamot({ intressent_id: "XXXXXXXX" });

// Get MP's motions
const allMotions = get_motioner({ rm: "2025/26", limit: 200 });
const mpMotions = allMotions.filter(m =>
  m.intressent_id === mp.intressent_id
);

// Get MP's speeches
const speeches = search_anforanden({
  rm: "2025/26",
  talare: mp.tilltalsnamn + " " + mp.efternamn,
  limit: 100
});

// Get MP's voting record
const votes = search_voteringar({ rm: "2025/26", limit: 200 });
// Requires cross-referencing with ledamöter data

MCP Server Configuration

HTTP Endpoint (Production)

{
  "mcpServers": {
    "riksdag-regering": {
      "type": "http",
      "url": "https://riksdag-regering-ai.onrender.com/mcp",
      "tools": ["*"]
    }
  }
}

Local Installation (Development)

# Install globally
npm install -g riksdag-regering-mcp

# Run locally
riksdag-regering-mcp
# Listens on http://localhost:3000/mcp

Data Quality Considerations

Completeness

  • Historical Data: Complete from 1971 for most document types
  • Real-Time Updates: Government data updated daily
  • Missing Data: Some older documents may lack full text

Accuracy

  • Official Source: Direct from Swedish government APIs
  • Validation: Schema validation for all responses
  • Versioning: API versioned for stability

Timeliness

  • Parliamentary Data: Updated within hours of publication
  • Government Data: Updated daily from regeringen.se
  • Latency: HTTP endpoint may have cold start delays (~30s)

GDPR Compliance

Legal Basis

  • Article 6(1)(e): Processing necessary for task carried out in public interest
  • Article 9(2)(g): Processing necessary for substantial public interest
  • Offentlighetsprincipen: Swedish Public Access to Information and Secrecy Act

Data Minimization

  • ✅ Only official capacity data (no private lives)
  • ✅ No personal contact information
  • ✅ No tracking or cookies
  • ✅ No data retention beyond cache

Transparency

  • ✅ Clear data sources documented
  • ✅ Open-source MCP server
  • ✅ Public API documentation
  • ✅ GDPR compliance statement

Remember

  • Use HTTP endpoint for production (no local installation needed)
  • Filter queries with riksmöte (rm), organ, party parameters
  • Handle pagination for large datasets (use fetchAll carefully)
  • Verify data quality - some older documents may be incomplete
  • Respect rate limits - HTTP endpoint may throttle heavy usage
  • Cache responses - avoid redundant API calls
  • GDPR compliance - only official capacity data, no personal information
  • Multi-language support - Display data in all 14 supported languages
  • Document IDs follow pattern: H901FiU1 (Riksmöte + Type + Committee + Number)

References


Version: 1.0 Last Updated: 2026-02-06 Maintained by: Hack23 AB

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.29%
按下载量换算63

Claude

28.05%
按下载量换算50

Cursor

20.62%
按下载量换算37

Gemini CLI

9.92%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills