ID

i-dot-ai/parliament-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

31 stars 18 forks Качество 83 Тренд 31MIT

Внедрение парламентских API, включая Hansard и Members API

Обзор

Сервер MCP, который примерно отображает подмножество https://developer.parliament.uk/,, а также предлагает дополнительные возможности семантического поиска. Этот проект предоставляет: - : сервер на основе FastMCP - : Небольшой пакет Python для запроса и загрузки парламентских данных из T1 в Qdrant - : Векторная база данных для семантического поиска по данным Hansard и Parliamentary Questions. Подключение к Claude Desktop через mcp-remote proxy MCP Server предоставляет 13 инструментов для помощи в парламентских исследованиях: 1. - Получить результаты выборов для избирательных округов или конкретных членов 2. - Поиск членов палаты общин или лордов по различным критериям (включая поиск местоположения / почтового индекса) 3. - Получите полную информацию о членах, включая биографию, контакты, интересы, запись голосования и членство в комитете 4. - Получить состояние партий на дом на определенную дату 5. - Получить исчерпывающий список всех правительственных или оппозиционных должностей и их нынешних владельцев 6.

Обзор (машинный перевод)

Сервер MCP, который примерно отображает подмножество https://developer.parliament.uk/,, а также предлагает дополнительные возможности семантического поиска.

Архитектура

Этот проект предусматривает: MCP Server: сервер на базе FastMCP ** Пакет Python**: небольшой пакет Python для запроса и загрузки парламентских данных из https://developer.parliament.uk/ в Qdrant Qdrant: Векторная база данных для семантического поиска по данным Hansard и Parliamentary Questions. Claude Integration: Подключение к Claude Desktop через прокси-сервер mcp-remote

Особенности

Инструменты MCP

MCP Server предоставляет 13 инструментов для помощи в парламентских исследованиях:

Депутаты и выборы

      • get_election_results ** - Получить результаты выборов для избирательных округов или конкретных членов
      • search_members * * - Поиск членов Палаты общин или лордов по различным критериям (включая поиск по местоположению / почтовому индексу)
      • get_detailed_member_information * * - Получите полную информацию о членах, включая биографию, контакты, интересы, запись голосования и членство в комитете

Парламентская структура

      • get_state_of_the_parties * * - Получить состояние сторон для дома в определенную дату

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

Parliament MCP Server

An MCP server that roughly maps onto a subset of https://developer.parliament.uk/, as well as offering additional semantic search capabilities.

Architecture

This project provides:

  • MCP Server: FastMCP-based server
  • Python package: A small python package for querying and loading parliamentary data from https://developer.parliament.uk/ into Qdrant
  • Qdrant: Vector database for semantic search over Hansard and Parliamentary Questions data.
  • Claude Integration: Connect to Claude Desktop via mcp-remote proxy

Features

MCP Tools Available

The MCP Server exposes 13 tools to assist in parliamentary research:

Members & Elections

  1. get_election_results - Get election results for constituencies or specific members
  2. search_members - Search for members of the Commons or Lords by various criteria (includes location/postcode search)
  3. get_detailed_member_information - Get comprehensive member information including biography, contact, interests, voting record, and committee membership

Parliamentary Structure

  1. get_state_of_the_parties - Get state of the parties for a house on a specific date
  2. list_ministerial_roles - Get exhaustive list of all government or opposition posts and their current holders
  3. get_departments - Get reference data for government departments

Committees

  1. list_all_committees - List all parliamentary committees by status and house
  2. get_committee_details - Get comprehensive committee information including members, publications, evidence, and upcoming events
  3. get_committee_document - Retrieve committee documents including oral evidence, written evidence, and publications

Parliamentary Business

  1. search_parliamentary_questions - Search Parliamentary Written Questions (PQs) by topic, date, party, or member
  2. search_debate_titles - Search through debate titles to find relevant debates
  3. find_relevant_contributors - Find members who have contributed most on specific topics
  4. search_contributions - Search Hansard parliamentary records for actual spoken contributions during debates

Quick Start (local qdrant)

You will need

  • Docker and Docker Compose
  • Node.js (for mcp-remote)
  • Claude Desktop (or another MCP client)
  • Azure OpenAI account with API access

Create a .env file by copying the .env.example in the project root and replace the necessary variables.

After configuring your .env file, run the following command for a one shot setup of the MCP server and the Qdrant database with some example data from June 2025.

make dev_setup_from_scratch

Once this is run, you can connect to the MCP server using this config

# Add this to your Claude Desktop config, or another MCP client:
# On macOS Claude Desktop config is located at `~/Library/Application\ Support/Claude/claude_desktop_config.json`
{
  "mcpServers": {
    "parliament-mcp": {
Открыть полный README на GitHub

Установка

npx mcp-remote http://localhost:8080/mcp/ --allow-http --debug
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

# Add this to your Claude Desktop config, or another MCP client: # On macOS Claude Desktop config is located at `~/Library/Application\ Support/Claude/claude_desktop_config.json` { "mcpServers": { "parliament-mcp": { "command": "npx", "args": ["mcp-remote", "http://localhost:8080/mcp/", "--allow-http", "--debug"] } } }