Skip to main content
Glama

FedMCP - Federal Parliamentary Information

quick_test.py•1.96 kB
#!/usr/bin/env python3 """Quick test of FedMCP core functionality (no lobbying download).""" print("🧪 Testing FedMCP Core Functionality...\n") # Test 1: Import all clients print("1ļøāƒ£ Testing imports...") try: from fedmcp import ( OpenParliamentClient, MPExpenditureClient, PetitionsClient, RepresentClient, ) print(" āœ… All clients imported successfully\n") except Exception as e: print(f" āŒ Import failed: {e}\n") exit(1) # Test 2: OpenParliament print("2ļøāƒ£ Testing OpenParliament - Recent debates...") try: op = OpenParliamentClient() debates = list(op.list_debates(limit=2)) print(f" āœ… Found {len(debates)} recent debates") if debates: print(f" Latest: {debates[0].get('topic', 'N/A')[:60]}...\n") except Exception as e: print(f" āš ļø Error: {str(e)[:100]}\n") # Test 3: Petitions print("3ļøāƒ£ Testing Petitions - Active petitions...") try: petitions_client = PetitionsClient() results = petitions_client.list_petitions(category="Open", limit=2) print(f" āœ… Found {len(results)} active petitions") if results: print(f" Example: {results[0].title[:60]}...\n") except Exception as e: print(f" āš ļø Error: {str(e)[:100]}\n") # Test 4: Represent API print("4ļøāƒ£ Testing Represent - Postal code lookup...") try: represent = RepresentClient() mp = represent.find_mp_by_postal_code("K1A0A9") if mp: print(f" āœ… Found MP: {mp.get('name', 'N/A')}") print(f" Riding: {mp.get('district_name', 'N/A')}\n") except Exception as e: print(f" āš ļø Error: {str(e)[:100]}\n") print("āœ… Core functionality tests completed!") print("\nšŸ“ Next Steps:") print(" • To test lobbying: Run full test_clients.py (downloads 90MB data)") print(" • To test MCP server: Run 'python -m fedmcp.server'") print(" • To use in Claude Desktop: Add to config and restart Claude")

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/northernvariables/FedMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server