KenyaMCPServer
A read-only MCP server for querying Kenya civic data through six tools, with most datasets explicitly marked as DEMO/sample data.
Get NDMA drought phase status for any of Kenyaβs 47 counties.
Retrieve county budget allocation, development vs recurrent split, and absorption rate.
Search Kenya Parliament bills by status and keyword.
Look up SACCOs by name or county from the SASRA registry.
Query Kenya constitutional rights by topic in English or Kiswahili.
List all 47 Kenya counties for use with other tools.
Provides BudgetAgent for county budget analysis using CrewAI framework, enabling AI agents to analyze Kenya's county budget data programmatically.
Integrates with DOI system for dataset citation, providing access to Kenya civic datasets with proper academic attribution through DOI identifiers.
Integrates with Kaggle datasets, providing access to Kenya civic data including parliament records, county budgets, and SACCO registry information.
Distributed as a Python package on PyPI, enabling easy installation and integration of Kenya civic AI tools into Python-based AI agent systems.
Built as a Python SDK, providing programmatic access to Kenya civic data and AI tools through Python interfaces for integration with AI agent systems.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@KenyaMCPServer show me the drought phases for Turkana county"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π οΈ CivicAgentKit β East African Civic AI SDK
Install: pip install civic-agent-kit Β· Use with any MCP client.
The unified Python toolkit for building civic AI tools in East Africa. One install gives you access to Kenya's parliament records, county budgets, embedded sample drought data (sources and as-of dates are not recorded), M-Pesa payments, and both MCP and A2A protocol integrations.
Install
pip install civic-agent-kitRelated MCP server: mcp-colombia-secop
What's included
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, # drought phases (sample data; provenance not recorded)
# Agents
BudgetAgent, # County budget analysis (CrewAI)
RightsAgent, # Constitutional rights Q&A (EN/SW)
DroughtAgent, # DEMO: synthetic drought values + 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
)Quick examples
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 endpointServe 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..."The East African AI Stack
βββββββββββββββββββββββββββββββββββββββ
β 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β βββββββββββββββ
ββββββββββββββData
This package has two distinct data paths:
File-backed loaders in
src/civic_agent_kit/data.py. The county-budget loader points to the Kenya Civic Datasets Kaggle DOI10.34740/kaggle/dsv/15473045; the broader dataset is also published on Hugging Face (DOI10.57967/hf/8223).Embedded MCP demo tables in
src/civic_agent_kit/server.py. Their original row-level sources and as-of dates were not recorded, so their drought, budget, parliament and SACCO values must be treated as synthetic/sample data, not official or current figures.
Dataset surfaces:
Kaggle: gmahia/kenya-civic-data β DOI:
10.34740/kaggle/dsv/15473045HuggingFace: gmahia/kenya-civic-data β DOI:
10.57967/hf/8223
See Data provenance and truthfulness for the exact boundary between sourced files, unprovenanced embedded demo values, and constitutional-rights text.
Related packages
Package | Description | PyPI |
| M-Pesa + Africa's Talking MCP server | |
| This package |
Full portfolio
13 deployed civic apps: gabrielmahia.github.io
IP & Collaboration
Β© 2026 Gabriel Mahia Β· contact@aikungfu.dev License: MIT
Protocol Coverage β Complete Stack
civic-agent-kit now supports all four major AI agent protocols for East Africa:
Protocol | What it does | Implementation |
MCP | Agent β Tool | |
A2A | Agent β Agent | |
Google ADK | Agent orchestration | |
AG-UI | Agent β Frontend |
Each protocol layer above was implemented within weeks of its global release β because the coordination gaps these tools address don't wait for tooling maturity.
from civic_agent_kit import CivicAgentKit
# Full protocol stack
kit = CivicAgentKit(
mcp_servers=["mpesa-mcp", "wapimaji-mcp"], # MCP
a2a_registry="kenya-a2a", # A2A
agui_server="kenya-agui", # AG-UI
adk_config="kenya-adk", # Google ADK
)Part of the East Africa coordination stack
Install & run:
pip install reli-cli && reli listβ the MCP servers on the official MCP Registry underio.github.gabrielmahiaEvaluate any model on Swahili agent tasks: kipimo Β· dataset Β· leaderboard
Coordinate across servers: africa-coord-bus β offline-first event bus with a built-in Kenya routing table
Datasets: huggingface.co/gmahia Β· Docs hub: nairobi-stack
Model-agnostic by design: closed APIs, open-weight models, and small distilled models are all first-class citizens.
Available Tools
6 toolskenya_budget_summaryKenya County Budget SummaryARead-onlyIdempotent
Get county budget allocation, development vs recurrent split, and absorption rate. FY 2022/23 data from Kenya Controller of Budget. DEMO data β real data: opendata.go.ke and cob.go.ke.
Inputs: county (required), language. Returns: object
kenya_counties_listKenya Counties ListARead-onlyIdempotent
List all 47 Kenya counties. Returns names suitable for use with other tools.
Inputs: no named parameters. Returns: object
kenya_county_droughtKenya County Drought StatusARead-onlyIdempotent
Get current NDMA drought phase for any of Kenya's 47 counties. Phase 1=Minimal, 2=Stressed, 3=Crisis, 4=Emergency, 5=Famine. Data source: Kenya National Drought Management Authority (NDMA). DEMO data β for real-time data see ndma.go.ke.
Inputs: county (required), language. Returns: object
kenya_parliament_billsKenya Parliament BillsARead-onlyIdempotent
Query Kenya Parliament bills and their legislative status. Returns bills with title, status, type, date and summary. DEMO data β real data: parliament.go.ke.
Inputs: status, keyword. Returns: object
kenya_rights_queryKenya Constitutional Rights Q&AARead-onlyIdempotent
Query Kenya constitutional rights from Chapter 4 of the Constitution of Kenya 2010. Returns the specific constitutional article and its provisions. Works in English and Kiswahili.
Inputs: right (required), language. Returns: object
kenya_sacco_lookupKenya SACCO LookupARead-onlyIdempotent
Look up Kenya SACCOs from the SASRA registry. Returns name, type, membership, assets, county and focus sector. DEMO data β real registry: sasra.go.ke.
Inputs: name, county. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 6 tools
Each tool addresses a distinct domain (budget, counties, drought, parliamentary bills, constitutional rights, SACCOs). There is no overlap in purpose, and agents can easily distinguish between them.
All tools follow a consistent 'kenya_<domain>_<operation>' pattern, using snake_case. The naming is predictable and easy to understand.
With 6 tools, the server is well-scoped for its purpose of providing Kenya-specific data. Each tool offers meaningful functionality without unnecessary bloat.
The tool set covers multiple important Kenya-related domains, but there are minor gaps such as missing education, health, or demographic data. However, the current selection is sufficient for many use cases.
Maintenance
Related MCP Connectors
Public Data Ukraine Mcp connects AI agents to real public APIs via MCP. Tools include
African intelligence infrastructure for AI apps, developers, and data products via MCP.
The world's public data, one API. License-cleared public data sources for agents, via MCP and REST.
Official UK, US and Australia public datasets as filtered CSV, REST API and MCP for AI agents.
Related MCP Servers
- AlicenseCqualityBmaintenanceProvides access to Kenya 47-county local government data, including demographics, budgets, services, and contact information for all counties.672 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to query Colombian government procurement data via MCP tools or natural language questions.54 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables access to UK government open data via the data.gov.uk CKAN API, allowing querying of datasets through natural language or direct MCP tools.88 npmMIT
- AlicenseAqualityBmaintenanceEnables AI agents to query Kenya health facilities, maternal health indicators, immunization coverage, and disease surveillance data via the DHIS2 public API.386 PyPIMIT