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.
Basic information
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.
More Data & Analytics MCP servers
dbt MCP Server
dbt-labsA MCP (Model Context Protocol) server for interacting with dbt.
HubSpot MCP Server
peakmojoA Model Context Protocol (MCP) server that enables AI assistants to interact with HubSpot CRM data, providing built-in vector storage and caching mechanisms help overcome HubSpot API limitations while improving response times.
Google Ads MCP
cohnenAn MCP tool that connects Google Ads with Claude AI/Cursor and others, allowing you to analyze your advertising data through natural language conversations. This integration gives you access to campaign information, performance metrics, keyword analytics, and ad management—all th
MCP.science: Open Source MCP Servers for Scientific Research 🔍📚
pathintegral-instituteOpen Source MCP Servers for Scientific Research
Google Analytics MCP Server
surendranbGoogle Analytics 4 data to AI agents, agentic workflows, and MCP clients. Give agents analysis-ready access to website traffic, user behavior, and performance data with schema discovery, server-side aggregation, and safe defaults that reduce data wrangling.
Comments