loading…
Search for a command to run...
loading…
Provides access to Kenya's civic datasets including parliament records, county budgets, SACCO registry, and drought data through MCP tools. Enables AI agents to
Provides access to Kenya's civic datasets including parliament records, county budgets, SACCO registry, and drought data through MCP tools. Enables AI agents to analyze and query Kenyan public data for civic applications.
The unified Python toolkit for building civic AI tools in East Africa. One install gives you access to Kenya's parliament records, county budgets, NDMA drought data, M-Pesa payments, and both MCP and A2A protocol integrations.
pip install civic-agent-kit
from civic_agent_kit import (
# Data loaders — Kenya's public civic datasets
KenyaBudgetData, # Controller of Budget — 47 counties
KenyaParliamentData, # MPs, bills, CDF — 13th Parliament
KenyaSACCOData, # SASRA SACCO registry
KenyaDroughtData, # NDMA drought phases
# Agents
BudgetAgent, # County budget analysis (CrewAI)
RightsAgent, # Constitutional rights Q&A (EN/SW)
DroughtAgent, # Drought + SMS alert agent
# Protocols
KenyaMCPServer, # MCP server — wraps all Kenya data as MCP tools
KenyaA2AServer, # A2A server — Kenya civic skills for agent-to-agent
# Utils
KenyaCounties, # All 47 county codes + names
KiswahiliTranslator, # Simple civic term translations EN↔SW
)
Load county budget data:
from civic_agent_kit import KenyaBudgetData
budgets = KenyaBudgetData.load()
low_absorption = budgets[budgets['absorption_rate'] < 0.5]
print(low_absorption[['county', 'allocation_kes_m', 'absorption_rate']])
Serve Kenya civic data as an A2A agent:
from civic_agent_kit import KenyaA2AServer
server = KenyaA2AServer(host="http://localhost:8000")
server.run() # exposes /.well-known/agent.json + JSON-RPC endpoint
Serve as an MCP server:
from civic_agent_kit import KenyaMCPServer
# Run alongside mpesa-mcp for full East African AI stack
server = KenyaMCPServer()
server.run()
Ask a rights question in Kiswahili:
from civic_agent_kit import RightsAgent
agent = RightsAgent(language="sw")
answer = agent.ask("Haki yangu ya ardhi ni nini?")
print(answer)
# → "Kifungu 40: Kila mtu ana haki ya kupata na kumiliki mali..."
┌─────────────────────────────────────┐
│ Your AI Agent │
└─────────────┬───────────────────────┘
│
┌──────────────────┴──────────────────────┐
│ │
┌──────▼──────┐ ┌───────▼──────┐
│ MCP Layer │ │ A2A Layer │
│ (tools) │ │ (agents) │
└──────┬───────┘ └───────┬──────┘
│ │
┌─────────┴──────────┐ ┌──────────┴─────────┐
│ │ │ │
┌────▼────┐ ┌──────▼─────┐ ┌───────▼────┐ ┌──────▼──────┐
│mpesa-mcp│ │KenyaMCP │ │kenya-a2a │ │CivicAgent │
│payments │ │civic data │ │parliament │ │Kit agents │
│SMS │ │budgets │ │budgets │ │budget/rights│
│airtime │ │parliament │ │drought │ │drought │
└─────────┘ └────────────┘ │rights EN/SW│ └─────────────┘
└────────────┘
All data from the Kenya Civic Datasets (CC BY-SA 4.0):
10.34740/kaggle/dsv/1547304510.57967/hf/8223| Package | Description | PyPI |
|---|---|---|
mpesa-mcp |
M-Pesa + Africa's Talking MCP server | PyPI |
civic-agent-kit |
This package | PyPI |
13 deployed civic apps: gabrielmahia.github.io
© 2026 Gabriel Mahia · [email protected] License: MIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"kenyamcpserver": {
"command": "npx",
"args": []
}
}
}