logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

parl-data-gateway-toolkit

Facilitates natural language querying of Dutch parliamentary records, legislative proceedings, and representative profiles via a unified protocol interface, supporting in-depth research into governmental actions.

Author

parl-data-gateway-toolkit logo

r-huijts

MIT License

Quick Info

GitHub GitHub Stars 15
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

parliamentarylegislativeapisdutch parliamentaryparliamentary documentsrequests huijts

Parliament Data Access Toolkit (OpenTK MCP Server)

Essential Acknowledgment: This Model Context Protocol (MCP) server functions as an abstraction layer atop the exceptional OpenTK infrastructure, developed by Bert Hubert. OpenTK furnishes unparalleled programmatic access to archives of the Netherlands Parliament through an intuitive interface. Further insights into this achievement are available in Bert's exposition: Welkom bij OpenTK. Full commendation for the foundational data sourcing and transformation belongs entirely to Bert Hubert and his dedication to open governance information.

A standardized conduit enabling Large Language Models (LLMs) to interface with digitized archives of the Staten-Generaal (Dutch Parliament). This MCP implementation grants retrieval capabilities for legislative artifacts, debate transcripts, and biographical data pertaining to parliamentarians.

OpenTK Model Context Protocol Server MCP server

Illustrative Scenarios for Natural Language Interaction

Scenario 1: Contrasting Stances on Artificial Intelligence Legislation

User Prompt: "When contrasting the legislative engagements of opposition blocs PvdA, GroenLinks, and Volt with the governing entity BBB within the Tweede Kamer regarding Artificial Intelligence policy, what short-term collaborative measures, consistent with their demonstrated viewpoints over the preceding year, could they pursue? Source verification must stem from OpenTK outputs."

Scenario 2: Investigating Climate Policy Discourse in Parliament

User Prompt: "My objective is to conduct an analysis of recent legislative sessions addressing national climate strategy and emission control benchmarks in the Netherlands. Can you delineate the principal arguments advanced and the core partisan orientations articulated within the last half-year?"

Scenario 3: Analyzing a Specific Legislator's Voting History

User Prompt: "Detail the voting track record of Member of Parliament Pieter Omtzigt concerning recent healthcare sector reform bills. How do his decisions diverge from those of other non-affiliated members? Have any procedural motions on this subject originated from him?"

Scenario 4: Identifying Current Legislative Developments in Housing

User Prompt: "What are the most consequential official records and deliberative sessions concerning subsidized and accessible housing legislation from the past twelve months? I require specific attention to proposals targeting the instability in the rental property market."

Scenario 5: Mapping MP Committee Assignments

User Prompt: "List all Members of Parliament who presently hold seats on both the Financial Affairs Committee and the Portfolio Committee for Economic Affairs. Identify their respective political affiliations and note any recent joint legislative proposals they have sponsored."

User Prompt: "Are there any upcoming scheduled committee hearings or plenary sessions concerning national cybersecurity and digital infrastructure planned for the forthcoming thirty days? Specify participating cabinet members and the precise subtopics slated for discussion."

Architectural Conception

The OpenTK framework operates as a Model Context Protocol (MCP) server, furnishing structured access to the digital repository of the Dutch Parliament. It functions as the intermediary layer connecting sophisticated AI models with the operational data streams of the Tweede Kamer, enabling AI agents to execute sophisticated searches, data extraction, and analytical processing across parliamentary documents, session transcripts, and member records.

The server adheres strictly to the MCP specification via the @modelcontextprotocol/sdk, ensuring formalized data exchange protocols between the intelligence engine and the external repository. By exposing parliamentary information through clearly defined endpoints and toolsets, OpenTK empowers AI agents to perform the following key functions:

  1. Execute intricate search operations targeting parliamentary publications.
  2. Retrieve detailed profiles of sitting and former Members of Parliament.
  3. Obtain official records in various encoding formats, including full-text rendering.
  4. Analyze the historical trajectory of legislative endeavors and proceedings.
  5. Monitor the status of legislative cases and governmental commitments.

The system's primary information retrieval mechanism relies upon Bert Hubert's optimized tkconv service, which abstracts away the complexities inherent in the official Dutch Parliament APIs, presenting the data in a highly accessible structure.

Deployment Instructions

The quickest pathway to deployment involves utilizing the pre-packaged npm distribution:

npx @r-huijts/opentk-mcp

2. Integration with Desktop AI Clients (e.g., Claude)

Modify your client configuration file (e.g., ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "opentk": {
      "command": "npx",
      "args": [
        "-y",
        "@r-huijts/opentk-mcp"
      ]
    }
  }
}

Alternative Configuration for Python Environments (MultiServerMCPClient):

mcp_client = MultiServerMCPClient({
    "opentk": {
        "command": "npx",
        "args": ["-y", "@r-huijts/opentk-mcp"],
        "transport": "stdio",
    }
})

3. Local Development Setup (From Source)

For users intending to engage in code modification or contribution:

Repository Cloning:

git clone https://github.com/r-huijts/opentk-mcp.git
cd opentk-mcp

Dependency Installation:

npm install

Project Compilation:

npm run build

Server Execution:

npm start

Configuration for Local Server in Desktop Clients:

Update the configuration file with the absolute path to the compiled executable:

{
  "mcpServers": {
    "opentk-local": {
      "command": "node",
      "args": [
        "/absolute/path/to/your/opentk-mcp/dist/index.js"
      ]
    }
  }
}

Ensure the path provided in args accurately points to the dist/index.js file within your local clone.

4. Publishing Updates (Maintainer Procedure)

To release a new iteration of this scoped package:

npm run build
npm publish --access=public

Note: Scoped packages mandate the --access=public flag for public repository inclusion.

Query Capabilities

The integrated search apparatus is highly capable, supporting advanced query syntax:

  • Basic term matching: kunstmatige intelligentie
  • Literal phrase matching: "kunstmatige intelligentie"
  • Negation criteria: Hubert NOT Bruls
  • Logical conjunctions: OR, NEAR()

The underlying system is engineered to correctly interpret quoted literals, enforce appropriate HTTP content headers, implement resilient recovery paths for transient API failures, and generate contextually useful diagnostic reports.

Resilience and Fault Tolerance

The API service incorporates thorough error management strategies:

  • Safe management of HTTP failures (including 4xx and 5xx status codes).
  • Automatic reversion to simplified query patterns when intricate requests encounter issues.
  • Provision of detailed diagnostic feedback for troubleshooting.
  • Correct stream handling (logging exclusively to stderr to avoid interference with the stdio transport mechanism).

Data Source Configuration

The server establishes its connection with Bert Hubert's tkconv service. This service is instrumental, offering a vastly more accessible programming interface than the official Dutch Parliament APIs by aggregating, structuring, and serving the raw data. Our MCP server acts as a standardized wrapper built upon this robust foundation, ensuring AI assistants can interact predictably with this crucial governmental information.

Licensing

MIT

Summary

The OpenTK MCP server delivers a structurally sound and highly functional gateway to the digitized records of the Dutch Parliament, accessible via the Model Context Protocol. Its commitment to modularity, comprehensive API design, and rigorous validation ensures reliable retrieval of legislative data for AI-driven investigation, analysis, and knowledge synthesis.

Upon successful integration, Claude gains the capacity to query Dutch parliamentary data through this specialized MCP service, leveraging all the functionalities detailed in the Usage section above.

See Also

`