OpenTK Model Context Protocol Server
Important Attribution: This MCP server is built as a wrapper around the excellent OpenTK project created by Bert Hubert. The OpenTK project provides unprecedented access to Dutch parliamentary data through a user-friendly interface. Learn more about the project in Bert's article: Welkom bij OpenTK. All credit for the underlying data access and processing goes to Bert Hubert and his contributions to open government data.
A bridge between large language models (LLMs) and Dutch parliamentary data through a standardized interface. This MCP server provides access to Dutch parliamentary documents, debates, and member information from the Tweede Kamer.
Real-World Natural Language Interaction Examples
Example 1: Researching Parliamentary Discussions on Climate Policy
User Query: "I need to find recent parliamentary discussions about climate policy and carbon emissions targets in the Netherlands."
AI Assistant Process:
- Uses
search_tk
tool with query "klimaatbeleid CO2 doelstellingen" - Analyzes results and identifies key documents
- Uses
get_document_details
to retrieve metadata for the most relevant documents - Provides a summary of findings with
get_document_links
for further reading
Response Example:"I found several recent parliamentary discussions on climate policy. The most significant is a debate from March 2025 where the Minister of Climate presented new carbon emission targets. Here are the key documents:
- Committee Report on Climate Goals 2025-2030
- Minister's Letter on Updated CO2 Reduction TargetsThe documents show that the government is proposing a 60% reduction in emissions by 2030, which was debated extensively in the committee meeting on March 15th."
Example 2: Information About a Specific MP
User Query: "Who is the current MP Pieter Omtzigt and what's his background?"
AI Assistant Process:
- Uses
list_persons
to find Pieter Omtzigt's MP ID and basic information - Retrieves his photo using
get_photo
- Analyzes his recent parliamentary activities using
search_tk_filtered
with his name and type "Document"
Response Example:"Pieter Omtzigt is a current Member of Parliament who leads the Nieuw Sociaal Contract (NSC) party. According to the parliamentary database, he has been in parliament since 2003 and is known for his work on government transparency and accountability. He played a key role in uncovering the childcare benefits scandal. Recently, he has been active in debates on constitutional reform and tax policy, with several parliamentary questions submitted in the past month. Here's his official parliamentary portrait: [Image]"
Example 3: Finding Recent Housing Legislation
User Query: "What are the most recent parliamentary documents about housing legislation?"
AI Assistant Process:
- Uses
search_by_category
with category "alles" and query "woningwet" - Sorts results by date to focus on recent entries
- Uses
get_document_details
to retrieve metadata for the most relevant documents - Provides clickable links with
get_document_links
Response Example:"I found several recent parliamentary documents related to housing legislation. The most recent is a letter from the Minister of Housing dated April 3, 2025, outlining proposed amendments to the Housing Act (Woningwet). The key changes include new regulations for affordable housing development and rent control measures. Here are links to the most relevant documents:
Download Minister's Letter on Housing Act Amendments (PDF)View on Tweede Kamer website
The letter indicates that the formal bill will be submitted to parliament next month after the consultation period ends."
Example 4: Finding MPs with Birthdays Today
User Query: "Are there any Dutch MPs celebrating their birthday today?"
AI Assistant Process:
- Uses
birthdays_today
to retrieve MPs with birthdays on the current date - For each MP with a birthday, uses
get_photo
to retrieve their portrait
Response Example:"Yes, there are two Members of Parliament celebrating their birthdays today:
Judith van Swaaij (D66) turns 42 today. She has been serving in parliament since 2021 and is currently on the Education Committee.
Bart van Kent (SP) turns 38 today. He is a member of the Social Affairs Committee and has been in parliament since 2017.
Here are their official parliamentary portraits: [Images]
Would you like me to find more information about either of these MPs?"
Example 5: Finding Upcoming Parliamentary Activities
User Query: "What parliamentary activities are scheduled for next week?"
AI Assistant Process:
- Uses
get_upcoming_activities
to retrieve scheduled parliamentary activities - Filters and organizes activities by date
Response Example:"Here are the key parliamentary activities scheduled for next week:
Monday, April 28, 2025:
- 10:00 AM: Committee meeting on Climate Policy (Thorbeckezaal)
- 2:00 PM: Plenary debate on the Spring Budget (Plenaire zaal)
Tuesday, April 29, 2025:
- 9:30 AM: Technical briefing on Digital Security (Troelstrazaal)
- 1:00 PM: Committee meeting on Healthcare Reform (Groen van Prinstererzaal)
Wednesday, April 30, 2025:
- 10:00 AM: Plenary debate on Housing Crisis (Plenaire zaal)
- 3:00 PM: Roundtable discussion with experts on Energy Transition (Thorbeckezaal)
Would you like more details about any of these activities?"
Project Concept
The OpenTK project is a Model Context Protocol (MCP) server that provides access to Dutch parliamentary data through a standardized interface. It serves as a bridge between large language models (LLMs) and the Dutch Parliament's information systems, allowing AI assistants to search, retrieve, and analyze parliamentary documents, debates, and member information.
The server uses the @modelcontextprotocol/sdk
to implement the MCP specification, which enables structured communication between AI models and external data sources. By exposing parliamentary data through well-defined tools and endpoints, OpenTK makes it possible for AI assistants to:
- Search for parliamentary documents using complex queries
- Access information about Members of Parliament
- Retrieve official documents in various formats
- Analyze parliamentary activities and proceedings
- Track legislative cases and government pledges
The project leverages Bert Hubert's tkconv service as its primary data source, which provides a more accessible API than the official Dutch Parliament APIs.
MCP Tools
The MCP server currently exposes the following tools to AI assistants:
MP Information Tools
birthdays_today
- Lists all Members of Parliament celebrating their birthday todaylist_persons
- Provides a complete directory of current Members of Parliamentget_photo
- Retrieves an MP's official portrait photograph
Search Tools
search_tk
- Comprehensive search across all parliamentary datasearch_tk_filtered
- Search filtered by document type (Document, Activiteit, Zaak)search_by_category
- Search specifically for documents of a certain category (questions, motions, etc.)
Document Tools
get_document_details
- Retrieves metadata about a parliamentary documentget_document_links
- Converts document URLs into clickable links
Committee Tools
get_committees
- Retrieves a list of all parliamentary committeesget_committee_details
- Retrieves detailed information about a specific committee
Activity and Voting Tools
get_upcoming_activities
- Retrieves a list of upcoming parliamentary activitiesget_voting_results
- Retrieves recent voting results on parliamentary motions and bills
Search Functionality
The search functionality is particularly sophisticated, supporting:
- Simple keyword searches:
kunstmatige intelligentie
- Exact phrase searches:
"kunstmatige intelligentie"
- Exclusion searches:
Hubert NOT Bruls
- Boolean operators:
OR
,NEAR()
The implementation handles various edge cases:
- Preserves quotes in search queries
- Uses proper content type headers
- Implements fallback mechanisms for API errors
- Provides meaningful error messages
Error Handling
The API service includes robust error handling:
- Graceful handling of API errors (4xx, 5xx)
- Fallback to simplified queries when complex ones fail
- Detailed error messages for debugging
- Proper logging to stderr (not stdout, which would break the stdio transport)
Configuration
The server connects to Bert Hubert's tkconv service as its primary data source, which provides a more accessible API than the official Dutch Parliament APIs. This service, created by Bert Hubert, does the heavy lifting of collecting, organizing, and making available Dutch parliamentary data in a developer-friendly format. Our MCP server builds upon this foundation to create a standardized interface for AI assistants to interact with this valuable data.
License
MIT
Conclusion
The OpenTK MCP server provides a robust and well-structured interface to Dutch parliamentary data, making it accessible to AI assistants through the Model Context Protocol. Its modular design, comprehensive API, and thorough testing ensure reliable access to parliamentary information for AI-assisted research, analysis, and information retrieval.
Installation
1. From Source
Clone Repository:
git clone https://github.com/r-huijts/opentk-mcp.git
cd opentk-mcp
Install Dependencies:
npm install
Build the Project:
npm run build
Start the Server:
npm start
2. Configure Claude Desktop
Update your Claude configuration file:
{
"mcpServers": {
"opentk-mcp-local": {
"command": "node",
"args": [
"/absolute/path/to/your/opentk-mcp/dist/index.js"
]
}
}
}
Make sure to replace /absolute/path/to/your/opentk-mcp/
with the actual path to your installation.
Once configured, Claude will be able to access Dutch parliamentary data through the OpenTK MCP server. The server exposes all the tools described in the Usage section above.