# 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.
**86+ tools** | **8+ data sources** | **Full government accountability** | **One-click install**
## One-Click Installation
### Claude Code (CLI)
```bash
# One-line install with auto-permission approval
curl -fsSL https://raw.githubusercontent.com/northernvariables/CanadaGPT/main/packages/fedmcp/scripts/install-claude-code.sh | bash
```
This automatically:
- Installs FedMCP Python package
- Adds MCP server to Claude Code
- Configures permissions to auto-approve all FedMCP tools
- Optionally sets up CanLII API key for legal search
### Claude Desktop (macOS/Windows)
```bash
# One-line install
curl -fsSL https://raw.githubusercontent.com/northernvariables/CanadaGPT/main/packages/fedmcp/scripts/install-claude-desktop.sh | bash
```
Then restart Claude Desktop.
### Manual Installation
<details>
<summary>Claude Code - Manual Steps</summary>
```bash
# 1. Install FedMCP
pip install git+https://github.com/northernvariables/CanadaGPT.git#subdirectory=packages/fedmcp
# 2. Add to Claude Code
claude mcp add --transport stdio --scope user fedmcp -- python -m fedmcp.server
# 3. Configure permissions (auto-approve all tools)
# Add to ~/.claude/settings.json:
{
"permissions": {
"allow": ["mcp__fedmcp__*"]
}
}
```
</details>
<details>
<summary>Claude Desktop - Manual Steps</summary>
1. Install FedMCP:
```bash
pip install git+https://github.com/northernvariables/CanadaGPT.git#subdirectory=packages/fedmcp
```
2. Add to Claude Desktop config:
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"fedmcp": {
"command": "python",
"args": ["-m", "fedmcp.server"],
"env": {
"CANLII_API_KEY": "your_key_here"
}
}
}
}
```
3. Restart Claude Desktop
</details>
## Data Sources
| Source | Description | Tools |
|--------|-------------|-------|
| **OpenParliament API** | Debates, votes, MPs, bills, committees | 17 |
| **House of Commons Hansard** | Official parliamentary transcripts | 3 |
| **LEGISinfo** | Legislative tracking and bill details | 4 |
| **CanLII API** | Canadian case law (requires free API key) | 5 |
| **Represent API** | Postal code to MP lookup | 1 |
| **MP Expenditures** | Quarterly proactive disclosure | 4 |
| **House Petitions** | Citizen petitions and responses | 2 |
| **Lobbying Registry** | Federal lobbying registrations (100K+ records) | 5 |
| **Federal Contracts** | Government contract awards | 3 |
| **Grants & Contributions** | Federal grants database | 3 |
| **Political Contributions** | Donations to political parties | 3 |
| **CanadaGPT Graph** | Enriched cross-referenced data (PRO) | 11 |
## Subscription Tiers
### FREE (No Account Required)
- ✅ 75+ parliamentary tools (public API data)
- ✅ 100 requests/hour
- Search debates, bills, votes, MPs, lobbying, contracts, etc.
### PRO (Subscription Required)
- ✅ Everything in FREE
- ✅ 10,000 requests/hour (100x more)
- ✅ **11 exclusive accountability tools** powered by CanadaGPT's graph database:
- `get_mp_scorecard` - Comprehensive MP performance metrics
- `detect_conflicts_of_interest` - Donation/lobbying/voting pattern analysis [PRO]
- `trace_money_flow` - Organization → government connections [PRO]
- `get_mp_lobbying_contacts` - Who's lobbying your MP [PRO]
- `get_bill_lobbying_analysis` - Lobbying vs voting alignment [PRO]
- `find_cross_references` - Entity mentions across debates [PRO]
- `get_enriched_mp` / `get_enriched_bill` - Full graph data [PRO]
- `get_debate_with_statements` - Complete transcripts with metadata [PRO]
- `get_committee_activity` - Committee meeting metrics [PRO]
- `get_statement_mentions` - Extracted entity references [PRO]
### Data Sources
**FREE tools** query public government APIs directly.
**PRO tools** also query the CanadaGPT graph database for enriched, cross-referenced data.
## Available Tools (86+)
### Parliamentary Data
- `search_debates` - Search House debates by keyword
- `list_debates` - List recent debates with temporal filtering
- `search_bills` - Search bills by number or keywords
- `get_bill` - Get specific bill details from LEGISinfo
- `get_bill_votes` - Get all votes on a specific bill
- `list_mps` - List Members of Parliament with filters
- `search_politician` - Search for MPs and Senators by name
- `get_politician_voting_history` - Get complete voting records
- `list_votes` - List parliamentary votes with filtering
- `get_vote_details` - Get detailed vote info with individual ballots
- `search_hansard` - Search Hansard transcripts for quotes
- `get_hansard_sitting` - Get complete sitting transcript
### MP Accountability
- `get_mp_expenses` - Get MP quarterly expenditure data
- `search_mp_expenses` - Search expenses by name/party/constituency
- `get_top_mp_spenders` - Rank MPs by spending category
- `get_party_spending_averages` - Compare party spending patterns
- `get_mp_activity_scorecard` - Comprehensive MP performance metrics
- `analyze_mp_bills` - Analyze MP legislative record and success rate
- `compare_mp_performance` - Side-by-side comparison of MPs
- `detect_conflicts_of_interest` - Cross-reference expenses, lobbying, voting [PRO]
- `get_mp_scorecard` - Full performance metrics with graph data [PRO]
- `get_mp_lobbying_contacts` - Lobbyists targeting specific MP [PRO]
### Lobbying & Influence
- `search_lobbying_registrations` - Search active lobbying registrations
- `search_lobbying_communications` - Find reported lobbying meetings
- `get_top_lobbying_clients` - Rank organizations by lobbying activity
- `analyze_bill_lobbying` - See who's lobbying on specific bills
- `analyze_industry_influence` - Industry-wide lobbying analysis
- `get_bill_lobbying_analysis` - Lobbying activity vs voting alignment [PRO]
- `trace_money_flow` - Track org → government money connections [PRO]
### Legal Data (requires CanLII API key)
- `search_cases` - Search case law by database and keywords
- `get_case` - Get case metadata
- `get_case_citations` - Get citing/cited cases and legislation
- `search_legislation` - Browse federal and provincial legislation
### Fact-Checking
- `fact_check_claim` - AI-powered verification of claims against parliamentary data
### Cross-Reference & Enrichment [PRO]
- `find_cross_references` - Find entity mentions across all debates
- `get_statement_mentions` - Extracted entities from statements
- `get_enriched_mp` - MP with full graph relationships
- `get_enriched_bill` - Bill with lobbying & vote data
- `get_debate_with_statements` - Complete debate transcripts
- `get_committee_activity` - Committee meeting metrics
## Example Prompts
### Investigating Corporate Influence
```
"What organizations are lobbying on Bill C-11?"
"Show me the lobbying communications about AI regulation"
"How did MPs vote on the Online Streaming Act?"
```
### MP Accountability Research
```
"Show me Pierre Poilievre's voting record this year"
"Which MPs spent the most on travel last quarter?"
"Compare expenses between the party leaders"
```
### Premium Accountability [PRO]
```
"Get performance scorecard for Pierre Poilievre"
"Detect conflicts of interest for Mark Holland"
"Trace money flow from SNC-Lavalin to government"
"Find all cross-references to Bill C-234 in debates"
"Who is lobbying my MP on housing policy?"
```
### Legislative Tracking
```
"What bills are currently before the Senate?"
"Track the progress of Bill C-234"
"What did MPs say about carbon tax in today's debate?"
```
### Citizen Engagement
```
"Find my MP by postal code K1A 0A6"
"Show me popular petitions about healthcare"
"What's the government's response to petition e-4567?"
```
## Configuration
### Auto-Approve All Permissions (Claude Code)
Add to `~/.claude/settings.json`:
```json
{
"permissions": {
"allow": ["mcp__fedmcp__*"]
}
}
```
This enables all FedMCP tools without individual approval prompts.
### CanLII API Key (Optional)
For Canadian legal case search:
1. Request a free key from https://www.canlii.org/en/feedback/feedback.html
2. Add to your environment or MCP config:
**Claude Code:**
```bash
claude mcp remove fedmcp
claude mcp add --transport stdio --scope user --env CANLII_API_KEY=your_key fedmcp -- python -m fedmcp.server
```
**Claude Desktop:** Add to your config:
```json
"env": {
"CANLII_API_KEY": "your_key_here"
}
```
### Enterprise Deployment
For organizations requiring centralized control:
**Option 1: Managed MCP (fixed server set)**
Deploy to system-wide location:
- macOS: `/Library/Application Support/ClaudeCode/managed-mcp.json`
- Linux: `/etc/claude-code/managed-mcp.json`
- Windows: `C:\Program Files\ClaudeCode\managed-mcp.json`
```json
{
"mcpServers": {
"fedmcp": {
"command": "python",
"args": ["-m", "fedmcp.server"]
}
}
}
```
**Option 2: Allowlist (policy-based)**
In managed settings, allow only FedMCP:
```json
{
"allowedMcpServers": [
{ "serverName": "fedmcp" }
]
}
```
## Verification
### Claude Code
```bash
# List configured servers
claude mcp list
# Inside Claude Code
/mcp
```
### Claude Desktop
Open Claude Desktop and check the MCP tools menu (tools icon).
## Documentation
- [MCP Protocol](https://modelcontextprotocol.io/)
- [Claude Code MCP Docs](https://code.claude.com/docs/en/mcp)
- [CanadaGPT Main Project](https://github.com/northernvariables/CanadaGPT)
## Troubleshooting
| Issue | Solution |
|-------|----------|
| "Module not found" | Ensure Python 3.10+ and run `pip install fedmcp` |
| Tools not appearing | Restart Claude Desktop/Code |
| Permission denied | Add `mcp__fedmcp__*` to settings.json allow list |
| CanLII errors | Verify API key is set correctly |
| Connection timeout | Increase `MCP_TIMEOUT` environment variable |
## License
MIT License - See [LICENSE](LICENSE)
## Contributing
Contributions welcome! See the main [CanadaGPT repository](https://github.com/northernvariables/CanadaGPT).
---
**Built for Canadian government transparency**