uk-parliament-data-mcp: Instructions file for Claude Code

CLAUDE.md

uk-parliament-data-mcp CLAUDE.md is an instructions file for Claude Code from ChrisBrooksbank/uk-parliament-data-mcp. It costs 2,155 tokens per session, scanned A, original, from a forked repository, MIT.

A set of instructions and command-line tools for accessing UK Parliament data, including information about members, bills, votes, committees, and debates. UK Parliament data covers the activity of the United Kingdom's legislature; Hansard is its published record of parliamentary debates.

In plain words
What is it for?
Use it to search for MPs, look up bills, check voting records, view live chamber activity, search debates, and find an MP by postcode.
Why use it?
It gives a coding assistant clear setup and usage guidance for working with this unofficial Parliament data service.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is ChrisBrooksbank/uk-parliament-data-mcp's own configuration. It tells Claude Code how to work on uk-parliament-data-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything uk-parliament-data-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ChrisBrooksbank/uk-parliament-data-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ChrisBrooksbank/uk-parliament-data-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/ChrisBrooksbank/uk-parliament-data-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for uk-parliament-data-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/chrisbrooksbank/uk-parliament-data-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/chrisbrooksbank/uk-parliament-data-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/chrisbrooksbank/uk-parliament-data-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/chrisbrooksbank/uk-parliament-data-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for uk-parliament-data-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/chrisbrooksbank/uk-parliament-data-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/chrisbrooksbank/uk-parliament-data-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,155 This file is loaded in full into every session.
When invoked 2,155 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin fork From a forked repository.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02155 $0.02155
Opus 5.5 $0.00862 $0.00862
Sonnet 5.5 $0.00431 $0.00431
Haiku 4.5 $0.00215 $0.00215

Measured 5d ago against content hash 43cd1eda368c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

uk-parliament-data-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 74 lines

How it starts

The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

UK Parliament MCP Server (Unofficial), a community project that is not affiliated with or endorsed by UK Parliament. One Python 3.11+ package (uk-parliament-mcp) ships two front ends over the public *.parliament.uk REST APIs:

  • MCP server (uk-parliament-mcp / python -m uk_parliament_mcp): FastMCP over stdio, with 233 read-only tools plus prompts and resources.
  • CLI (parliament): a Typer app with command groups (members, bills, votes, committees, hansard, composite, live, digest, watch, api, guide, …).

End-user usage of both is documented in README.md.

Commands

pip install -e ".[dev]"                 # dev install (Python 3.11+)

# Validation (CI runs exactly these on 3.11 and 3.12)
ruff check src/ tests/ && ruff format --check src/ tests/ && mypy src/ && pytest

ruff check src/ tests/ --fix && ruff format src/ tests/   # auto-fix

# Tests (pytest adds --cov by default via pyproject addopts)
pytest tests/test_tools/                                  # MCP tool tests
pytest tests/test_cli/                                    # CLI tests
pytest tests/test_tools/test_members.py::TestMembersToolsRegistration -q
pytest -k "search_member" --no-cov                        # single test, skip coverage
PARLIAMENT_LIVE_TESTS=1 pytest tests/live --no-cov        # call the real APIs (skipped otherwise; runs weekly in CI)

python -m uk_parliament_mcp             # run MCP server (stdio)
parliament --help                       # run CLI
python scripts/generate_api_metadata.py # regenerate cli/api_metadata.json from context/*.json specs

mypy runs in strict mode. Ruff line length is 100, but E501 is ignored because tool docstrings are long single lines.

Architecture

MCP client ──stdio──> server.py (FastMCP) ──> tools/*.py ─┐
                                                          ├─> http_client.py ──HTTP──> *.parliament.uk
terminal ──> cli/main.py (Typer) ──> cli/*.py ────────────┘

Read the full file on GitHub · 74 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed 43cd1eda368c
  2. 25d ago Changed · +2 lines · +396 tokens per session de625462bcaf
  3. 26d ago Changed · -500 lines · -3,132 tokens per session 9f5f18986fd8
  4. 1mo ago First seen · 572 lines · 4,891 tokens per session scan A f25c52cea428

Subscribe to this mod's changes

uk-parliament-data-mcp CLAUDE.md is an instructions file published in the GitHub repository ChrisBrooksbank/uk-parliament-data-mcp (8 stars, last pushed 5d ago), licensed MIT. It adds 2,155 tokens to every session, about $0.0086 per session on Opus 5.5. A static security scan graded it A with 0 findings. It comes from a forked repository.

Related

Other instructions, from other repositories