Skip to main content
Glama
OpenTK Model Context Protocol Server

OpenTK Model Context Protocol Server

by r-huijts

OpenTK 模型上下文协议服务器

重要声明:此 MCP 服务器基于Bert Hubert创建的优秀OpenTK 项目构建。OpenTK 项目通过用户友好的界面,提供了前所未有的荷兰议会数据访问方式。欲了解更多关于该项目的信息,请参阅 Bert 的文章: Welkom bij OpenTK 。底层数据访问和处理的所有功劳均归功于 Bert Hubert 及其对开放政府数据的贡献。

通过标准化接口,大型语言模型 (LLM) 与荷兰议会数据之间的桥梁。该 MCP 服务器提供对荷兰议会文件、辩论以及来自荷兰议会 (Tweede Kamer) 的议员信息的访问。

现实世界的自然语言交互示例

Related MCP server: Riksdag & Regering MCP

示例 1:比较各党派对 AI 政策的立场

用户查询:“将荷兰众议院反对党 PvdA、GroenLinks 和 Volt 与执政党 BBB 在人工智能领域的活动进行比较,他们在短期内可以采取哪些行动来符合他们过去一年所表明的立场和观点?请使用 OpenTK 的资料。”

示例 2:研究议会关于气候政策的讨论

用户查询:“我想分析荷兰议会最近关于气候政策和减排目标的辩论。您能帮我确定过去六个月中的关键讨论以及不同政党的主要立场吗?”

示例 3:有关特定议员投票记录的信息

用户查询:“议员 Pieter Omtzigt 在医疗改革立法方面的投票记录如何?他的立场与其他独立议员有何不同?他是否就此议题提出过任何动议?”

示例 4:查找最近的住房立法发展

用户查询:“过去一年中,关于经济适用房立法最重要的议会文件和辩论是什么?我对解决租赁市场危机的提案特别感兴趣。”

示例 5:查找具有特定委员会成员资格的议员

用户查询:“目前有哪些议员同时在财政委员会和经济事务委员会任职?他们代表哪些政党?他们最近是否提交了任何联合倡议?”

示例 6:确定即将举行的议会数字安全活动

用户提问:“下个月是否有安排关于网络安全和数字基础设施的委员会会议或辩论?哪些部长将参加?将讨论哪些具体议题?”

项目概念

OpenTK 项目是一个模型上下文协议 (MCP) 服务器,通过标准化接口提供对荷兰议会数据的访问。它充当大型语言模型 (LLM) 与荷兰议会信息系统之间的桥梁,使 AI 助手能够搜索、检索和分析议会文件、辩论和议员信息。

该服务器使用@modelcontextprotocol/sdk来实现 MCP 规范,从而实现 AI 模型与外部数据源之间的结构化通信。OpenTK 通过定义明确的工具和端点公开议会数据,使 AI 助手能够:

  1. 使用复杂查询搜索议会文件

  2. 获取有关国会议员的信息

  3. 检索各种格式的官方文档并阅读文档全文

  4. 分析议会活动和程序

  5. 追踪立法案例和政府承诺

该项目利用 Bert Hubert 的 tkconv 服务作为其主要数据源,它提供了比荷兰议会官方 API 更易于访问的 API。

安装

1. 使用 Claude Desktop 和 NPM 包

更新您的 Claude 配置文件(~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "opentk-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "opentk-mcp"
      ]
    }
  }
}

2. 从源头

克隆存储库:

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

安装依赖项:

npm install

构建项目:

npm run build

启动服务器:

npm start

2.配置Claude桌面

更新您的 Claude 配置文件:

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

确保将/absolute/path/to/your/opentk-mcp/替换为安装的实际路径。

搜索功能

搜索功能特别复杂,支持:

  • 简单的关键词搜索: kunstmatige intelligentie

  • 精确短语搜索: "kunstmatige intelligentie"

  • 排除搜索: Hubert NOT Bruls

  • 布尔运算符: OR 、 NEAR()

该实现处理各种边缘情况:

  • 保留搜索查询中的引号

  • 使用适当的内容类型标题

  • 实现 API 错误的回退机制

  • 提供有意义的错误消息

错误处理

API 服务包括强大的错误处理:

  • 优雅地处理 API 错误(4xx、5xx)

  • 当复杂查询失败时,回退到简化查询

  • 用于调试的详细错误消息

  • 正确记录到 stderr(而不是 stdout,因为 stdout 会破坏 stdio 传输)

配置

该服务器连接到 Bert Hubert 的tkconv 服务作为其主要数据源,该服务提供了比荷兰议会官方 API 更易于访问的 API。这项由 Bert Hubert 创建的服务负责收集、整理并以开发者友好的格式提供荷兰议会数据。我们的 MCP 服务器以此为基础,为 AI 助手创建了一个标准化的界面,以便与这些宝贵的数据进行交互。

执照

麻省理工学院

结论

OpenTK MCP 服务器提供了一个强大且结构良好的荷兰议会数据接口,使 AI 助手能够通过模型上下文协议 (MCP) 访问这些数据。其模块化设计、全面的 API 和全面的测试确保了 AI 辅助研究、分析和信息检索能够可靠地访问议会信息。

配置完成后,Claude 将能够通过 OpenTK MCP 服务器访问荷兰议会数据。该服务器提供了上文“使用”部分中描述的所有工具。

Available Tools

14 tools
birthdays_todayA

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. Use this tool when a user specifically asks about birthdays, wants to know which MPs are celebrating today, or needs to create 'on this day' content. This tool takes no parameters as it always returns today's birthdays. For a more general overview that includes birthdays along with other parliamentary information, use the 'get_overview' tool instead. If you need to display an MP's photo alongside their birthday information, you can use the 'get_photo' tool with the MP's ID from this response.

Inputs: no named parameters.

get_committee_detailsA

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.

Inputs: committeeId (required).

get_committeesA

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. Use this tool when a user asks about parliamentary committees, wants to know which committees exist, or needs to find committees related to specific policy areas. Committees are specialized groups of MPs that focus on specific domains like defense, healthcare, or finance. After getting the list of committees, you can use the 'get_committee_details' tool with a specific committee ID to retrieve more detailed information about that committee, including its members and recent activities. This tool takes no parameters as it returns all active committees.

Inputs: no named parameters.

get_document_contentA

Downloads a parliamentary document and extracts its text content for use in the conversation. This tool retrieves the actual content of a document based on its ID, making it available for analysis, summarization, or direct reference in the conversation. The text is extracted from PDF or Word (DOCX) documents using professional libraries and returned in a readable format.

IMPORTANT: For longer documents, the content may be truncated. The response includes pagination information to help you retrieve the complete document:

  • isTruncated: Indicates whether there is more content available

  • totalLength: The total length of the document content

  • currentOffset: The starting position of the current content chunk

  • nextOffset: The starting position for the next content chunk (use this as the 'offset' parameter in your next call)

  • remainingLength: The amount of content remaining after the current chunk

To retrieve the complete document, you can make multiple calls to this tool, incrementing the offset each time:

Example usage:

  1. First call: get_document_content({docId: '2025D18220'})

  2. If the response shows isTruncated=true, call again with the nextOffset value: get_document_content({docId: '2025D18220', offset: 8000})

  3. Continue until isTruncated=false or you've retrieved all the content you need.

This pagination approach allows you to analyze even very long documents within the conversation context.

Use this tool when you need to analyze or discuss the specific content of a document rather than just its metadata.

Inputs: docId (required), offset.

get_document_detailsA

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 clickable links to both the PDF version and the official Tweede Kamer webpage. This tool is ideal for getting quick information about a document and obtaining the relevant links for further access. To actually download the document content, use the 'download_document' tool instead.

Inputs: nummer (required).

get_overviewA

Provides a comprehensive overview of recent parliamentary activities, including the most recent documents and MPs celebrating birthdays today. This is the ideal starting point for any parliamentary data exploration. 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, and you can navigate through pages using the 'page' parameter. The tool can be used iteratively to retrieve subsequent pages of results - first call with page=1, then check the pagination.hasMoreDocuments field in the response, and if true, call again with page=2, and so on. This allows you to 'scroll' through all available documents when needed. The response includes pagination information showing the current page, whether more documents are available, and the total number of documents retrieved. Use this tool first when a user asks for general information about recent parliamentary activities or needs a starting point for research. After getting this overview, you can use other tools like 'get_document_details' to retrieve more information about specific documents, 'search_tk' to find documents on specific topics, or 'get_photo' to retrieve photos of MPs mentioned in the birthdays section.

Inputs: page.

get_photoA

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.

Inputs: personId (required).

get_upcoming_activitiesA

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. Use this tool when a user asks about the parliamentary agenda, wants to know what events are coming up, or needs information about specific types of parliamentary activities. The results are sorted by date with the most imminent activities first. You can limit the number of results using the optional 'limit' parameter. This tool is particularly useful for helping users plan which parliamentary sessions to follow or for providing an overview of the upcoming parliamentary schedule.

Inputs: limit.

get_voting_resultsA

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. Use this tool when a user asks about recent parliamentary votes, wants to know how parties voted on specific issues, or needs to analyze voting patterns. You can control the number of results with the 'limit' parameter and choose between 'full' or 'summary' format. The 'summary' format provides a more structured representation with renamed fields, while both formats include complete party voting information. This tool is particularly valuable for tracking political alignments, understanding coalition dynamics, and analyzing how different parties position themselves on important issues.

Inputs: format, limit.

list_personsA

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. Use this tool when a user needs comprehensive information about all MPs, wants to analyze the composition of parliament by party, or needs to find specific MPs by name or party. This tool is particularly useful for creating reports about parliamentary representation or for finding the IDs of MPs that can be used with other tools like 'get_photo'. This tool takes no parameters as it returns all current MPs. For a more targeted approach when looking for specific MPs, consider using the 'search_tk' tool with the MP's name.

Inputs: no named parameters.

search_by_categoryA

Performs a search specifically for documents of a certain category, such as questions, motions, or letters. The response contains a structured JSON object with paginated results and metadata. Use this tool when a user wants to find documents of a specific type that match certain keywords or when they need more targeted search results than the general search provides. The 'category' parameter lets you filter by document type: 'vragen' for parliamentary questions, 'moties' for motions, or 'alles' for all document types. 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 you can use 'OR' for alternatives. Results are sorted by date with the most recent documents first. This tool is particularly useful for finding specific types of parliamentary documents on a given topic.

Inputs: category (required), query (required), limit, page.

search_tkA

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.

Inputs: query (required), format, limit, page.

search_tk_filteredA

Performs a targeted search within a specific category of parliamentary data. Unlike the general search, this tool allows you to limit results to only documents, activities, or cases. Use this when you need more focused search results within a particular content type. 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.

Inputs: query (required), type (required), format, limit, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 14 tools

    Disambiguation3/5

    Most tools have distinct purposes, but there is notable overlap between search_tk, search_tk_filtered, and search_by_category, which could confuse agents about which to use for document searches. Additionally, get_document_details and get_document_content serve different functions but might be misselected due to similar naming and domain overlap. The descriptions help clarify, but the boundaries are not perfectly clear.

    Naming Consistency4/5

    The naming follows a consistent verb_noun pattern (e.g., get_overview, list_persons, search_tk) with minor deviations like birthdays_today (noun_verb) and get_document_links (which could be named more consistently as get_document_links or similar). Overall, the pattern is readable and mostly predictable, with only a few inconsistencies.

    Tool Count5/5

    With 14 tools, the count is well-scoped for a parliamentary data server, covering MPs, committees, documents, activities, and searches. Each tool appears to serve a specific purpose without redundancy, fitting within the typical 3-15 range for such a domain.

    Completeness4/5

    The tool set provides comprehensive coverage for parliamentary data, including CRUD-like operations for documents (get, search), MPs (list, get photo), committees (list, get details), and activities (get overview, get upcoming). Minor gaps include no explicit update or delete tools, but this is reasonable for a read-only data source, and agents can work around this with the available search and retrieval tools.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides programmatic access to official German Bundestag parliamentary data, enabling LLMs to answer questions about legislation, voting records, and members.
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables LLMs to query and retrieve real-time open data, documents, protocols, and records from the Swedish Parliament (Riksdag) and Government Offices through 32 specialized MCP tools.
      31
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides access to Dutch Parliament (Tweede Kamer) open data through MCP tools, enabling querying of parliamentary information via natural language.
      68 npm
      MIT