KenyaMCPServer
🛠️ CivicAgentKit — 동아프리카 시민 AI SDK
동아프리카에서 시민 AI 도구를 구축하기 위한 통합 Python 툴킷입니다. 한 번의 설치로 케냐의 의회 기록, 카운티 예산, NDMA 가뭄 데이터, M-Pesa 결제 정보에 액세스할 수 있으며, MCP 및 A2A 프로토콜 통합을 모두 지원합니다.
설치
pip install civic-agent-kitRelated MCP server: mcp-colombia-secop
포함된 내용
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
)빠른 예제
카운티 예산 데이터 로드:
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']])A2A 에이전트로 케냐 시민 데이터 제공:
from civic_agent_kit import KenyaA2AServer
server = KenyaA2AServer(host="http://localhost:8000")
server.run() # exposes /.well-known/agent.json + JSON-RPC endpointMCP 서버로 제공:
from civic_agent_kit import KenyaMCPServer
# Run alongside mpesa-mcp for full East African AI stack
server = KenyaMCPServer()
server.run()스와힐리어로 권리 관련 질문하기:
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..."동아프리카 AI 스택
┌─────────────────────────────────────┐
│ 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│ └─────────────┘
└────────────┘데이터
케냐 시민 데이터 세트(CC BY-SA 4.0)의 모든 데이터:
Kaggle: gmahia/kenya-civic-data — DOI:
10.34740/kaggle/dsv/15473045HuggingFace: gmahia/kenya-civic-data — DOI:
10.57967/hf/8223
관련 패키지
패키지 | 설명 | PyPI |
| M-Pesa + Africa's Talking MCP 서버 | |
| 본 패키지 |
전체 포트폴리오
13개의 배포된 시민 앱: gabrielmahia.github.io
지적 재산권 및 협업
© 2026 Gabriel Mahia · contact@aikungfu.dev 라이선스: CC BY-NC-ND 4.0
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.650 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to query Colombian government procurement data via MCP tools or natural language questions.84 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.71 npmMIT
- AlicenseAqualityBmaintenanceEnables AI agents to query Kenya health facilities, maternal health indicators, immunization coverage, and disease surveillance data via the DHIS2 public API.366 PyPIMIT