Africa Energy Data Mcp
@Navashub
About Africa Energy Data Mcp
Exposes historical electricity, energy and economic indicators for 54 African countries (2000–2022). MCP tools: get_electricity_data, get_energy_data, get_economic_data, check_api_health, list_countries.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"africa-energy": {
"command": "py",
"args": [
"server.py"
],
"description": "Run locally with Python: requires AFRICA_ENERGY_API_KEY in .env"
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Africa Energy Data Mcp?
An MCP (Model Context Protocol) server that exposes the Africa Energy Data API as tools for Claude, Cursor, and other MCP-compatible clients. It allows querying electricity, energy, and economic data for all 54 African countries spanning 2000–2022.
How to use Africa Energy Data Mcp?
Clone the repository, install dependencies with pip install -r requirements.txt, get an API key from RapidAPI, create a .env file with your AFRICA_ENERGY_API_KEY, and run python server.py. Then configure the MCP client (Claude Desktop or Cursor) by adding the server path to its settings JSON.
Key features of Africa Energy Data Mcp
- 5 tools for electricity, energy, economic data, health, and country list
- Automatic in-memory caching with 10-minute TTL
- Retry logic with exponential backoff (up to 3 attempts)
- Input validation for country names, years, and year ranges
- Structured logging to stderr for debugging
- Modular architecture with separate config, API client, and handlers
Use cases of Africa Energy Data Mcp
- Retrieve electricity metrics (e.g., access, consumption) for any African country by year
- Fetch energy sector data including access, efficiency, and renewables over a year range
- Get economic indicators such as GDP, inflation, and population for analysis
- Verify the API is online and responding before running other queries
- List all 54 supported African countries for selection in an application
FAQ from Africa Energy Data Mcp
What API does Africa Energy Data Mcp rely on?
It uses the Africa Energy Data API available on RapidAPI; a free tier is available and an API key is required.
What are the runtime requirements?
Python is required. All dependencies are listed in requirements.txt and installed with pip install -r requirements.txt.
How does caching work?
Responses are cached in memory for 10 minutes (configurable in config.py). The cache is cleared on server restart.
What happens if the API key is missing or invalid?
The server will log “AFRICA_ENERGY_API_KEY not found” and return an error. Create a .env file with a valid RapidAPI key.
Does the server retry failed requests?
Yes, it retries up to 3 times with exponential backoff (1s, 2s, 4s) on 5xx errors and timeouts, but does not retry 4xx client errors.
Frequently asked questions
What API does Africa Energy Data Mcp rely on?
It uses the Africa Energy Data API available on RapidAPI; a free tier is available and an API key is required.
What are the runtime requirements?
Python is required. All dependencies are listed in `requirements.txt` and installed with `pip install -r requirements.txt`.
How does caching work?
Responses are cached in memory for 10 minutes (configurable in `config.py`). The cache is cleared on server restart.
What happens if the API key is missing or invalid?
The server will log “AFRICA_ENERGY_API_KEY not found” and return an error. Create a `.env` file with a valid RapidAPI key.
Does the server retry failed requests?
Yes, it retries up to 3 times with exponential backoff (1s, 2s, 4s) on 5xx errors and timeouts, but does not retry 4xx client errors.
Basic information
More Data & Analytics MCP servers

Batru
BatruReal, calibrated win-rate predictions, pick recommendations, counters, synergy and tier lists for Dota 2, Deadlock and Marvel Rivals, from production models trained on ~20M matches. Free hosted endpoint (Streamable HTTP)

Opinly
Track competitors, rankings, and how AI answers rank you — then write and publish the fix.

AskRentAI
AskRentAIAsk your Rent Manager property portfolio anything, from the AI you already use. AskRentAI is a hosted, read-only MCP server for Rent Manager, the property management platform used across a large share of US rental housi

Jitsu
JitsuJitsu is an open-source Customer Data Platform — an MIT-licensed alternative to Segment. This MCP server gives your AI assistant direct control over a Jitsu workspace, so you can run and debug data pipelines in conversat

Rankbits
rankbitsAI visibility analytics across 15+ providers (ChatGPT, Perplexity, Gemini, AI Overviews, and more). The MCP connector lets assistants run scans, compare competitor mentions, and track your brand's visibility in AI answer
Comments