Overview
What is Riksdagen MCP Server?
The Riksdagen MCP Server is a Model Context Protocol (MCP) server that enables AI assistants like Claude to search the Swedish Parliament (Riksdagen) document archive and retrieve URLs in JSON format. It provides tools for querying documents by keywords, types, and dates, and for generating URL lists.
How to use Riksdagen MCP Server?
Install by cloning the repository, creating a Python 3.9+ virtual environment, and installing dependencies (FastAPI, Uvicorn, httpx, MCP Python SDK). Start the server with uvicorn mcp_riksdagen_server:app --host 0.0.0.0 --port 8000 --reload. Claude can then invoke its three MCP tools: riksdagen_search, riksdagen_get_document_types, and riksdagen_create_url_list using parameters like search term, document type, parliamentary year, date range, sort order, and format.
Key features of Riksdagen MCP Server
- Search the Riksdagen archive by keyword, document type, and date
- Retrieve a list of available document type codes and descriptions
- Create URL lists for specific documents in JSON, HTML, or text format
- Output results as structured JSON for easy programmatic use
- Sort results by relevance, date, or document designation
- Limit the number of returned documents (default 10)
Use cases of Riksdagen MCP Server
- Researching Swedish parliamentary documents on specific topics (e.g., climate change)
- Compiling URLs of government propositions (prop) or motions (mot) for further analysis
- Quickly obtaining document type codes without manual lookup
- Generating formatted document lists for ingestion into other tools or workflows
FAQ from Riksdagen MCP Server
What are the prerequisites for running the server?
Python 3.9 or later, plus the packages FastAPI, Uvicorn, httpx, and the MCP Python SDK (installable via pip or directly from its GitHub repository).
How do I start the Riksdagen MCP Server?
Run uvicorn mcp_riksdagen_server:app --host 0.0.0.0 --port 8000 --reload from the project directory. The server will be available at http://localhost:8000.
What MCP tools does the server expose?
Three tools: riksdagen_search (search documents with filters), riksdagen_get_document_types (list all document type codes), and riksdagen_create_url_list (generate URLs for given document IDs in a chosen format).
Can this server be used with Claude?
Yes, the README includes an example Claude prompt and client code demonstrating how Claude can invoke the MCP tools to search and generate document URLs.
How do I see the available document types?
Use the riksdagen_get_document_types tool; it returns a dictionary mapping codes like "prop" or "mot" to their Swedish descriptions.