Purpose
opentk-mcp is a Model Context Protocol (MCP) server designed to establish a standardized interface between large language models (LLMs) and Dutch Parliament (Tweede Kamer) data. It serves as a wrapper for the OpenTK project, enabling AI assistants to search, retrieve, and analyze parliamentary published documents, activities, and information, for AI-assisted research, analysis, and information retrieval.
Main Capabilities
Core Parliamentary Data Access
- Search parliamentary documents with advanced query capabilities (supports exact phrase matching with quotation marks, NOT, OR, NEAR operators)
- Access comprehensive member information and committee memberships
- Retrieve full document content (PDF, Word) with intelligent chunking
- Track legislative cases, government activities, and voting results
- Real-time access to parliamentary proceedings and upcoming events
Intelligent Document Analysis (New in v1.0.16)
- NLP-driven relevance analysis: intelligently analyze documents before loading full text
- TF-IDF keyword extraction: identify the 10-15 most important terms in a document
- Dutch-optimized entity recognition: automatically detect persons (members of parliament, ministers), political parties (VVD, PVV, CDA, D66, etc.), and organizations
- Topic classification: categorize documents into 10 main political topics (climate, economy, healthcare, education, etc.)
- Relevance scoring: rank documents by relevance to specific search terms (0-100 score)
- Context-efficient filtering: reduce context window usage by 80-90% when evaluating multiple documents
Advanced Document Navigation
- Find specific person mentions using fuzzy matching
- Find political party mentions using fuzzy matching
- Efficiently browse large documents using character offsets
- Support paginated sequential reading
Available Tools (17 total)
Overview and Discovery
- get_overview: comprehensive overview of recent parliamentary activities and member birthdays (paginated)
- birthdays_today: list members of parliament celebrating their birthday today
- list_persons: complete directory of current members of parliament with party affiliations
Search and Filtering
- search_tk: comprehensive search across all parliamentary data, supporting advanced query syntax
- search_tk_filtered: search within specific categories (documents, activities, cases)
- search_by_category: search specific document types (questions, motions, all)
Document Intelligence (New)
- analyze_document_relevance: NLP-driven document analysis, including keyword extraction, entity recognition, and relevance scoring
- get_document_content: Retrieve document content (PDF/DOCX), supporting three reading modes (targeted, sequential, full)
- find_person_in_document: Use fuzzy matching to locate all occurrences of a person in a document
- find_party_in_document: Locate all occurrences of a political party in a document
Document Metadata
- get_document_details: Retrieve structured metadata of a document
- get_document_links: Convert document URLs into clickable Markdown links
Parliamentary Structure
- get_committees: List all parliamentary committees
- get_committee_details: Detailed information about a specific committee
Activities and Voting
- get_upcoming_activities: Upcoming parliamentary debates and meetings
- get_voting_results: Recent voting results and party positions
- get_photo: Retrieve official portrait photos of members of parliament
Usage
Quick Start via NPM Package (Recommended)
Get started quickly using the published npm package. Update the configuration in the Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json).
Build from Source (Development)
- Clone the repository
- Install dependencies
- Build the project
- Start the server
- Configure Claude Desktop for local development, update the configuration file, and replace the path with the actual installation path.
Publishing (Maintainers)
When publishing a new version, scoped packages require the --access=public flag to be publicly available.
Search Functionality
The search functionality is especially powerful and supports:
- Simple keyword search: kunstmatige intelligentie
- Exact phrase search: "kunstmatige intelligentie"
- Exclusion search: Hubert NOT Bruls
- Boolean operators: OR, NEAR()
The implementation handles multiple edge cases: preserving quotation marks in search queries, using the correct content-type headers, implementing fallback mechanisms for API errors, and providing meaningful error messages. The API service includes robust error handling: gracefully handling API errors (4xx, 5xx), falling back to simplified queries when complex queries fail, detailed debug error messages, and proper logging to stderr (rather than stdout, so as not to break the stdio transport).
Data Source
The server connects to Bert Hubert's tkconv service as the primary data source, which is more accessible than the official Dutch Parliament API. The tkconv service is responsible for collecting, organizing, and providing Dutch parliamentary data in a developer-friendly format. This MCP server builds a standardized interface on top of it for AI assistants to interact with this valuable data.
Use Cases
- Compare political parties' positions in specific policy areas
- Research parliamentary discussions on topics such as climate policy and housing legislation
- Look up the voting records and motions of specific members of parliament
- Efficiently filter large numbers of documents to quickly identify the most relevant files
- Extract document topics, keywords, and mentioned political parties before reading the full text
- Find members of parliament with specific committee memberships
- Identify upcoming parliamentary activities on topics such as digital security
Capabilities After Configuration
Once configured, Claude will be able to access Dutch parliamentary data through the OpenTK MCP server using all 17 specialized tools, including search, document analysis, member of parliament information, committee tracking, voting results, and more.