MCP.so
Sign In

OpenTK Model Context Protocol Server

@r-huijts

About OpenTK Model Context Protocol Server

A Model Context Protocol (MCP) server providing access to Dutch parliamentary data (Tweede Kamer) through OpenTK . This server enables AI assistants to search, retrieve, and analyze parliamentary documents, activities, and information as published by parliament..

Config

Add this server to your MCP-compatible client using the configuration below.

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

Tools

17

Provides a comprehensive overview of recent parliamentary activities, including the most recent documents and MPs celebrating birthdays today. The response contains structured data with two main sections: 'recentDocuments' (listing the latest parliamentary documents with their IDs, titles, types, dates, and URLs) and 'birthdays' (listing MPs celebrating birthdays today). The results are paginated with 10 documents per page. The tool supports iterative pagination - check the pagination.hasMoreDocuments field in the response to determine if additional pages are available. The response includes pagination information showing the current page, whether more documents are available, and the total number of documents retrieved. Applicable when general information about recent parliamentary activities is needed.

Lists all Members of Parliament celebrating their birthday today, including their names, political parties, and birth dates. The response is a JSON array where each entry contains the MP's ID, name, party affiliation, and other details. This tool takes no parameters as it always returns today's birthdays. Applicable when information about MPs' birthdays is needed.

Provides a complete directory of current Members of Parliament with their IDs, names, titles, party affiliations, and faction memberships. The response is a JSON array where each entry contains an MP's full details including unique MP IDs that can be referenced by other tools. This tool takes no parameters as it returns all current MPs. Applicable when comprehensive information about all MPs is needed or when analyzing the composition of parliament by party.

Performs a comprehensive search across all parliamentary data including documents, activities, and cases. Returns results matching the provided keyword or phrase. Use this for general searches when you need information on any topic discussed in parliament, regardless of document type or context. Search syntax: Searching for 'Joe Biden' finds documents containing both 'Joe' and 'Biden' anywhere in the text. Searching for "Joe Biden" (with quotes) finds only documents where these words appear next to each other. Searching for 'Hubert NOT Bruls' finds documents containing 'Hubert' but not 'Bruls'. The capital letters in 'NOT' are important. You can also use 'OR' and 'NEAR()' operators.

Performs a search within a specific category of parliamentary data, allowing results to be limited to only documents, activities, or cases. Returns paginated results sorted by date (most recent first). Search syntax supports: keyword searches ('Joe Biden' finds both terms), exact phrase searches ("Joe Biden" with quotes finds the exact phrase), exclusion ('Hubert NOT Bruls' excludes documents with 'Bruls'), and boolean operators ('OR', 'NEAR()'). Results can be returned in 'full' or 'summary' format.

Retrieves the official portrait photograph of a Member of Parliament. Returns the image as a binary resource that can be displayed or saved. Use this when you need to include a visual representation of an MP in reports, presentations, or profiles.

Retrieves metadata about a parliamentary document in a structured JSON format, without downloading the actual document content. Returns information including title, type, document number, dates, version number, and links to both the PDF version and the official Tweede Kamer webpage.

Converts document URLs into clickable markdown-formatted links. This tool takes either a direct PDF link or a Tweede Kamer webpage link and returns them as properly formatted clickable links.

Retrieves a list of all parliamentary committees with their IDs, names, and URLs. The response is a JSON array where each entry represents a committee with its unique identifier and name. Committees are specialized groups of MPs that focus on specific domains like defense, healthcare, or finance. This tool takes no parameters as it returns all active committees.

Retrieves detailed information about a specific parliamentary committee, including its members, recent activities, and description. This provides deeper insight into the committee's composition, leadership roles, and recent work. Use this when you need comprehensive information about a particular committee's structure and activities.

Retrieves a list of upcoming parliamentary activities including debates, committee meetings, and other events. The response contains a structured JSON object with both a chronological list of activities and activities grouped by date. Each activity includes details like date, time, location, committee, type, and a URL for more information. The results are sorted by date with the most imminent activities first. The optional 'limit' parameter controls the number of results returned (default: 20, max: 100).

Retrieves recent voting results on parliamentary motions and bills. The response contains a structured JSON object with voting results sorted by date (newest first). Each result includes detailed information such as the title of the motion/bill, the date of the vote, the submitter, whether it was accepted or rejected, the vote counts (for/against), and which political parties voted for or against. The 'limit' parameter controls the number of results (default: 20, max: 100) and 'format' parameter allows choosing between 'full' or 'summary' format. The 'summary' format provides a more structured representation with renamed fields, while both formats include complete party voting information.

Performs a search for documents of a certain category, such as questions ('vragen'), motions ('moties'), or all document types ('alles'). The response contains a structured JSON object with paginated results and metadata. The search syntax supports advanced queries: 'Joe Biden' finds documents with both terms anywhere, '"Joe Biden"' (with quotes) finds exact phrases, 'Hubert NOT Bruls' finds documents with 'Hubert' but not 'Bruls' (capital NOT is required), and 'OR' for alternatives. Results are sorted by date with the most recent documents first.

Retrieves the content of a parliamentary document (PDF or DOCX). This tool supports three modes of operation depending on parameters provided: 1. TARGETED RETRIEVAL (with offset): Provide docId + offset (+ optional maxLength, default 3000). Returns text centered around the offset position, extracting approximately 1,500 chars before and 1,500 chars after the offset. Finds natural paragraph boundaries for clean extraction. 2. SEQUENTIAL READING (with maxLength, no offset): Provide docId + maxLength (no offset). Returns first maxLength characters from document start. Includes nextOffset for pagination to continue reading. 3. FULL DOCUMENT RETRIEVAL (no offset, no maxLength): Provide docId only. Returns complete document text (may be 100KB+). Note: May use significant context window space. PARAMETERS: - docId: Document ID to retrieve (required) - offset (optional): Character position to center extraction around. Can be obtained from find_person_in_document or from the nextOffset value in previous responses. - maxLength (optional): Maximum characters to return. Default is 3000 when offset is provided, no limit when offset is not provided. RESPONSE FORMAT: - text: Extracted document content - textLength: Length of returned text - offset: Starting position in full document - nextOffset: Position to continue reading (null if at end) - prevOffset: Position to read backwards (null if at start) - hasMoreBefore: Boolean indicating more content exists before - hasMoreAfter: Boolean indicating more content exists after - note: Instructions for retrieving more content

Searches for all occurrences of a person's name within a parliamentary document and returns their precise locations. This tool efficiently navigates large documents by identifying where specific persons speak, are mentioned, or are referenced without loading the entire document. The tool uses fuzzy matching, so partial names work well: - Searching for "Wilders" will find "Geert Wilders", "de heer Wilders", "Minister Wilders", etc. - Searching for "Rutte" will find "Mark Rutte", "Premier Rutte", "Minister-president Rutte", etc. - Searching for "Van der" will find "Van der Staaij", "Van der Plas", etc. The response includes: - Total number of occurrences found - For each occurrence: - Line range (e.g., lines 45-47) showing where in the document the name appears - Character offset in the full document text (can be used with get_document_content) - A brief snippet (preview) of the surrounding text to verify context Particularly valuable for debate transcripts, committee meetings, and lengthy parliamentary documents where multiple people speak.

Searches for all occurrences of a political party within a parliamentary document and returns their precise locations. This tool efficiently navigates large documents by identifying where specific political parties are mentioned, referenced, or their positions are discussed without loading the entire document. The tool uses fuzzy matching with party abbreviations: - Searching for "VVD" will find "VVD", "de VVD", "VVD-fractie", "VVD-kamerlid", etc. - Searching for "PVV" will find "PVV", "de PVV", "PVV-fractie", "PVV-kamerlid", etc. - Searching for "CDA" will find "CDA", "de CDA", "CDA-fractie", "CDA-kamerlid", etc. - Searching for "D66" will find "D66", "de D66", "D66-fractie", "D66-kamerlid", etc. The response includes: - Total number of occurrences found - For each occurrence: - Line range (e.g., lines 45-47) showing where in the document the party appears - Character offset in the full document text (can be used with get_document_content) - A brief snippet (preview) of the surrounding text to verify context Particularly valuable for debate transcripts, committee meetings, and lengthy parliamentary documents where multiple parties' positions are discussed.

Performs intelligent pre-analysis of a parliamentary document to determine its relevance WITHOUT loading the full content into your context window. This is a lightweight reconnaissance tool that extracts key information about a document's content before you commit to reading the full text. Use this to efficiently assess whether a document is worth reading in detail, especially when you're uncertain about relevance or need to triage multiple documents. WHAT THIS TOOL RETURNS: - **Keywords**: Top 10-15 most important terms extracted via TF-IDF analysis, revealing the document's main subjects (e.g., 'klimaat', 'belasting', 'migratie', 'gezondheidszorg') - **Named Entities**: Structured lists of people mentioned (MPs, ministers, officials), political parties (VVD, PVV, CDA, D66, GroenLinks, etc.), and organizations - **Statistics**: Document length (character count, word count), estimated reading time, and structural information about the document format - **Preview**: The first ~500 characters of the document for immediate context - **Topics**: Main themes and subject areas identified through content analysis - **Relevance Score** (optional): If you provide the searchTerms parameter, returns a 0-100 score indicating how well the document matches those specific terms, helping you rank multiple documents by relevance WHEN TO USE THIS TOOL: - When you need to understand what a document is about before reading it in full - When you have multiple candidate documents and need to determine which ones are most relevant - When you want to verify a document contains specific topics or entities before loading its full content - When context window efficiency is important and you want to avoid loading large documents that may not be relevant - When a user asks about document content but you're uncertain if it matches their query - When you need to filter or triage search results before committing to detailed reading WHEN NOT TO USE THIS TOOL: - When the user explicitly requests the full content or specific quotes from a document - When you already have high confidence the document is relevant and need to read it anyway - When you specifically need to locate where a person appears in a document (find_person_in_document is optimized for this) - When you only need structural metadata like title, date, and links RELATIONSHIP TO OTHER DOCUMENT TOOLS: - **get_document_content**: This analysis tool is lighter weight (~1-2KB) compared to reading full documents (10-50KB). Both tools access document content but serve different purposes: analysis for triage and overview, get_document_content for detailed reading. - **find_person_in_document**: The analysis tool identifies IF a person is mentioned; find_person_in_document locates WHERE they appear with character offsets. Analysis provides presence information, find_person provides location information. - **get_document_details**: Details provides structural metadata (title, type, date, links); this tool provides content intelligence (keywords, entities, topics). They offer complementary information about documents. - **search_tk/search_tk_filtered**: Search identifies candidate documents; this tool provides detailed content analysis of those candidates. CONTEXT WINDOW EFFICIENCY: This tool returns approximately 1-2KB of analysis data versus 10-50KB for reading full documents. Using this tool before get_document_content can reduce context usage by 80-90% when documents turn out to be irrelevant. It's particularly valuable when evaluating multiple documents or when a user's query is exploratory rather than specific. The searchTerms parameter is powerful for ranking documents by relevance: when provided, it calculates a 0-100 relevance score based on how well the document matches your search terms, allowing you to objectively compare multiple documents before deciding which to read in full.

Overview

What is OpenTK Model Context Protocol Server?

This MCP server is a bridge between large language models and Dutch parliamentary data. It provides access to documents, debates, and member information from the Tweede Kamer via a standardized interface, built as a wrapper around Bert Hubert's OpenTK project.

How to use OpenTK Model Context Protocol Server?

Run instantly with npx @r-huijts/opentk-mcp. For Claude Desktop, add the server to your claude_desktop_config.json using the npx command. Once configured, Claude can use all 17 tools to search, analyze, and retrieve parliamentary data.

Key features of OpenTK Model Context Protocol Server

  • Search parliamentary documents with advanced query syntax (quotes, NOT, OR, NEAR)
  • Access comprehensive MP profiles and committee memberships
  • Retrieve full document content from PDF/Word with smart chunking
  • NLP-powered relevance analysis and keyword extraction (v1.0.16)
  • Dutch-optimized entity recognition for persons, parties, and organizations
  • Track legislative cases, voting results, and upcoming activities

Use cases of OpenTK Model Context Protocol Server

  • Compare party positions on policy topics like AI or climate using parliamentary sources
  • Research an MP's voting record, motions, and committee involvement
  • Triage large sets of documents by relevance without reading every full text
  • Identify upcoming debates, committee meetings, and related documents
  • Find which MPs serve on specific committees and their recent joint initiatives

FAQ from OpenTK Model Context Protocol Server

What are the runtime dependencies?

The server runs on Node.js and is installed via npm. It uses the @modelcontextprotocol/sdk and connects to Bert Hubert's tkconv service over HTTP.

Where does the parliamentary data come from?

It sources data from the tkconv service (https://berthub.eu/tkconv/), which provides a developer-friendly API to Dutch parliamentary information.

What transport does the server use?

It uses stdio transport as per the MCP specification, configured via npx or a local Node.js command.

Does it require authentication or API keys?

No authentication or API keys are mentioned; the server accesses a publicly available parliamentary API.

Can it retrieve full document content?

Yes, tools like get_document_content fetch content from PDF and Word documents with three reading modes (targeted, sequential, full).

Frequently asked questions

What are the runtime dependencies?

The server runs on Node.js and is installed via npm. It uses the `@modelcontextprotocol/sdk` and connects to Bert Hubert's tkconv service over HTTP.

Where does the parliamentary data come from?

It sources data from the tkconv service (https://berthub.eu/tkconv/), which provides a developer-friendly API to Dutch parliamentary information.

What transport does the server use?

It uses stdio transport as per the MCP specification, configured via `npx` or a local Node.js command.

Does it require authentication or API keys?

No authentication or API keys are mentioned; the server accesses a publicly available parliamentary API.

Can it retrieve full document content?

Yes, tools like `get_document_content` fetch content from PDF and Word documents with three reading modes (targeted, sequential, full).

Comments

More Other MCP servers