Supports deployment and hosting of Neo4j databases on Google Cloud Platform with automated migration scripts, VM configuration, and backup management.
Enables daily automated backups of Neo4j databases to Google Cloud Storage as part of the GCP deployment workflow.
Provides production deployment capabilities for Neo4j graph databases on Google Cloud Platform, including migration from local instances and automated backup strategies.
FedMCP - Canadian Government Accountability Platform
A comprehensive MCP (Model Context Protocol) server providing deep access to Canadian federal parliamentary, legal, and accountability data through Claude and other LLM applications.
42 tools | 8 data sources | Full government accountability | Advanced analytics
🎯 What is FedMCP?
FedMCP is a research and transparency platform that gives you unprecedented access to Canadian government data:
Track who is lobbying government and on what issues
Monitor MP expenses and spending patterns
Follow citizen petitions and government responses
Search parliamentary debates and voting records
Analyze legislative progress and bill sponsorship
Browse Canadian case law and legal precedents
Detect conflicts of interest through cross-source analysis
Compare MP performance across multiple accountability metrics
Perfect for journalists, researchers, activists, and engaged citizens.
📊 Data Sources (8 Total)
OpenParliament API - Debates, votes, MPs, bills, committees
House of Commons Hansard - Official parliamentary transcripts
LEGISinfo - Legislative tracking and bill details
CanLII API - Canadian case law and legislation (requires free API key)
Represent API - Postal code to MP lookup
MP Expenditures - Quarterly proactive disclosure data
House Petitions - Citizen petitions and government responses
Lobbying Registry - Federal lobbying registrations and communications (100,000+ records)
🚀 Quick Start
Installation
Configuration
For CanLII access, obtain a free API key:
Request key from https://www.canlii.org/en/feedback/feedback.html
Add to environment:
Claude Desktop Setup
Add to your configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop and the FedMCP tools will appear in your MCP tools menu.
🔧 Available Tools (42 Total)
Parliamentary Data (17 tools)
search_debates- Search House debates by keywordlist_debates- List recent debates with temporal filteringsearch_bills- Search bills by number or keywordsget_bill- Get specific bill details from LEGISinfolist_bills- List bills with filtering optionsget_bill_votes- Get all votes on a specific billlist_mps- List Members of Parliament with filterssearch_politician- Search for MPs and Senators by nameget_politician_voting_history- Get complete voting recordslist_votes- List parliamentary votes with filteringget_vote_details- Get detailed vote info with individual ballotslist_committees- List parliamentary committeesget_committee_details- Get committee meetings and membersfind_mp_by_postal_code- Find your MP by postal codesearch_hansard- Search Hansard transcripts for quotesget_hansard_sitting- Get complete sitting transcriptsearch_topic_across_sources- Search across bills, debates, votes, Hansard
MP Accountability (11 tools)
get_mp_expenses- Get MP quarterly expenditure datasearch_mp_expenses- Search expenses by name/party/constituencyget_top_mp_spenders- Rank MPs by spending categoryget_party_spending_averages- Compare party spending patternsget_mp_activity_scorecard- Comprehensive MP performance metricsanalyze_mp_bills- Analyze MP legislative record and success ratecompare_mp_performance- Side-by-side comparison of 2-5 MPsanalyze_mp_voting_participation- Voting attendance and patternsanalyze_party_discipline- Find MPs who voted against party lineget_bill_legislative_progress- Track bill journey through Parliamentdetect_conflicts_of_interest- Cross-reference expenses, lobbying, voting
Petitions (2 tools)
search_petitions- Search citizen petitions by keyword/sponsorget_petition_details- Get petition with government response
Lobbying & Influence (5 tools)
search_lobbying_registrations- Search active lobbying registrationssearch_lobbying_communications- Find reported lobbying meetingsget_top_lobbying_clients- Rank organizations by lobbying activityanalyze_bill_lobbying- See who's lobbying on specific billsanalyze_industry_influence- Industry-wide lobbying analysis
Analytics (1 tool)
track_committee_activity- Analyze committee productivity and focus
Legal Data (5 tools - requires CanLII API key)
search_cases- Search case law by database and keywordsget_case- Get case metadataget_case_citations- Get citing/cited cases and legislationsearch_legislation- Browse federal and provincial legislationlist_legal_databases- List available court/tribunal databases
💡 Use Case Examples
🔍 Investigating Corporate Influence
Scenario: You want to know who's lobbying on Bill C-11 (Online Streaming Act)
📊 MP Performance Analysis
Scenario: Comparing your MP to others in the same party
🗳️ Tracking Citizen Engagement
Scenario: Following petition activity on climate change
💰 Expense Monitoring
Scenario: Analyzing MP spending patterns
🏛️ Legislative Research
Scenario: Understanding a bill's journey through Parliament
⚖️ Legal Research
Scenario: Finding case law on Charter rights
🔴 Corruption Detection
Scenario: Identifying unusual patterns
🏗️ Architecture
Client Structure
All clients follow consistent patterns with built-in rate limiting and retry logic:
OpenParliamentClient (
clients/openparliament.py) - Pagination-aware API client with automatic next-page fetchingOurCommonsHansardClient (
clients/ourcommons.py) - XML parser for Hansard transcripts with UTF-8 BOM handlingLegisInfoClient (
clients/legisinfo.py) - Access to LEGISinfo bill and legislation dataCanLIIClient (
clients/canlii.py) - REST API with 2 req/sec rate limiting (0.5s minimum interval)RepresentClient (
clients/represent.py) - Postal code lookup via Open North APIMPExpenditureClient (
clients/expenditure.py) - House of Commons proactive disclosure dataPetitionsClient (
clients/petitions.py) - XML API for petition data with client-side filteringLobbyingRegistryClient (
clients/lobbying.py) - Downloads and caches federal lobbying data (~90MB)
Rate Limiting
All HTTP clients use RateLimitedSession with:
Proactive rate limiting: Configurable minimum interval between requests
Reactive retry logic: Exponential backoff for 429/5xx errors
Automatic retries: Up to 5 attempts with increasing delays
Caching Strategy
Lobbying Registry:
Downloads 100,000+ records (~90MB compressed) on first use
Cached at
~/.cache/fedmcp/lobbying/Optional auto-update after 7 days
Instant loading on subsequent uses
📈 Recent Enhancements
Phase 8: Advanced Analytics (November 2025) 🆕
✅ Industry Influence Analysis - Track corporate lobbying across entire industries
✅ MP Performance Comparison - Side-by-side metrics for 2-5 MPs
✅ Cross-source accountability engine with 42 total tools
Phase 7: Multi-Source Correlation (November 2025) 🆕
✅ MP Activity Scorecard - Comprehensive metrics from 6+ data sources
✅ Committee Activity Tracking - Productivity and focus analysis
✅ Conflict of Interest Detection - Cross-reference expenses, lobbying, voting
Phase 6: Bill Analysis (November 2025)
✅ MP Bill Analysis - Legislative record and success rates
✅ Party Bill Comparison - Compare party legislative effectiveness
✅ Bill Progress Tracking - Detailed timeline through Parliament
Phase 5: Lobbying Registry (November 2025)
✅ Lobbying Search - 100,000+ registrations, 350,000+ communications
✅ Top Clients Analysis - Rank organizations by lobbying activity
✅ Bill Lobbying Analysis - See who's lobbying on specific bills
✅ Latin-1 encoding support for Canadian government CSV data
Phase 4: Petitions System (November 2025)
✅ Petition Search - 341+ active petitions with keyword search
✅ Government Response Tracking - Full petition text and official responses
✅ Client-side filtering for comprehensive search
Phase 3: MP Expenditures (November 2025)
✅ Quarterly Expense Data - Salaries, travel, hospitality, contracts
✅ Top Spenders Analysis - Rank MPs by spending category
✅ Party Spending Averages - Compare party spending patterns
Phase 2: Enhanced Parliamentary Tools (November 2025)
✅ Postal Code to MP Lookup - #1 most requested citizen feature
✅ Party Discipline Analysis - Identify MPs voting against party line
✅ Committee Data Access - List committees, get meeting details
✅ Temporal Filtering - Date ranges for votes and debates
Phase 1: Foundational Features (November 2025)
✅ Politician search by name
✅ Voting history and participation analysis
✅ Full Hansard sitting transcripts
✅ Enhanced debate/MP/vote listings
Total Growth: From initial 14 tools to 42 tools (+200%) with full government accountability coverage.
🎓 For Developers
Testing Client Usage
Running Tests
Adding New Tools
Define tool schema in
list_tools()inserver.pyImplement handler in
call_tool()functionReturn results as
TextContentobjectsHandle errors with try/except blocks
Update documentation in
CLAUDE.md
⚠️ Important Notes
Data Freshness
OpenParliament: Real-time API (updated continuously)
Hansard: Published daily after sittings
LEGISinfo: Updated as bills progress through Parliament
MP Expenditures: Published quarterly (90 days after quarter end)
Petitions: Real-time API
Lobbying Registry: Updated monthly (cached locally for 7 days)
CanLII: Updated daily with new case law
Rate Limits
OpenParliament: 10 req/sec (conservative, API allows more)
CanLII: 2 req/sec, 5,000 queries/day (enforced by API key)
All others: No rate limiting required (static data or tolerant APIs)
Data Limitations & Caveats
MP Expenditure Data:
Historical Limit: Data only available from July 2020 (FY 2020-2021 Q2) onward
Missing Quarter: FY 2020-2021 Q1 (Apr-Jun 2020) returns server errors - not available
Pre-2020 Data: Not available through current proactive disclosure system (likely different format/archived)
Total Coverage: ~4.5 years of expense data vs. 20+ year MP careers
Travel Expense Reporting Nuances:
Party leader travel may be funded through:
Party budgets (not individual MP office budgets)
Research office allocations
Parliamentary precinct allowances
MPs with ridings near Ottawa (e.g., Carleton, Ottawa-area) naturally have lower travel expenses
COVID-19 pandemic (2020-2021) significantly reduced all travel expenses
$0 travel expenses do NOT necessarily indicate no travel occurred - check expense category definitions
Lobbying Registry:
First-time data download takes ~30 seconds (~90MB)
Subsequent loads are instant (cached locally)
Data updated monthly by Office of the Commissioner of Lobbying
Privacy & Ethics
All data is publicly available government information
Designed for transparency and accountability, not harassment
Use responsibly for research, journalism, and civic engagement
Respect MP privacy for non-parliamentary activities
Expense data represents office spending, not personal wealth or income
☁️ Deploying to Google Cloud
Want to move your Neo4j database to production on GCP? We've created a complete migration guide with automated scripts.
See: GCP_MIGRATION_QUICKSTART.md
What you get:
Automated migration scripts (8 steps, ~1 hour)
Production-ready VM configuration (n2-standard-2, 8GB RAM)
Daily automated backups to Google Cloud Storage
Firewall rules and security best practices
Cost: ~$50-65/month
Full rollback capability
All scripts are in scripts/gcp-migration/ - ready to run!
📝 License
MIT License - see LICENSE file for details
🙏 Credits
Based on canfedinfo library from broadcast-os project
Uses Open North's Represent API for postal code lookup
CanLII data courtesy of Canadian Legal Information Institute
OpenParliament data from openparliament.ca
Parliamentary data from House of Commons and Senate
🤝 Contributing
Contributions welcome! Please:
Fork the repository
Create a feature branch
Add tests for new functionality
Update documentation (CLAUDE.md and README.md)
Submit a pull request
📧 Support
For bugs or feature requests, open an issue on GitHub.
For CanLII API key issues, contact https://www.canlii.org/en/feedback/feedback.html
Built with ❤️ for Canadian democracy and government transparency