Platform
MCP Server
Connect AI assistants to live African data with the official Africa API MCP server. 40 read-only tools across countries, indicators, markets, trade, elections, and policies.
Africa API ships an official MCP server, africa-api-mcp on npm. It gives Claude, Cursor, and any other MCP client direct, read-only access to the platform: 40 tools across countries, indicators and time series, markets, FX, trade, elections, policies, and government records for all 54 African countries.
The server runs locally via npx, so there is nothing to install or host. You only need an API key from the dashboard.
Connect your client
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"africa-api": {
"command": "npx",
"args": ["-y", "africa-api-mcp"],
"env": {
"AFRICA_API_KEY": "your-api-key-here"
}
}
}
}Restart Claude Desktop and the tools appear automatically.
One command:
claude mcp add africa-api -e AFRICA_API_KEY=your-api-key-here -- npx -y africa-api-mcpAdd the same server definition to .cursor/mcp.json in your project (or the global Cursor MCP settings):
{
"mcpServers": {
"africa-api": {
"command": "npx",
"args": ["-y", "africa-api-mcp"],
"env": {
"AFRICA_API_KEY": "your-api-key-here"
}
}
}
}Any other MCP-compatible client works with the same npx -y africa-api-mcp command and the AFRICA_API_KEY environment variable.
What the tools cover
| Domain | Tools | What it covers |
|---|---|---|
| Countries | 4 | Country records, curated profiles, current signals for all 54 nations |
| Indicators & data | 4 | 127+ indicators, time-series queries, country rankings |
| Government | 6 | Heads of state, cabinets, leadership terms, current and historical |
| Elections | 5 | Results, upcoming elections, country election overviews |
| Markets | 7 | Stock exchanges, tickers, price history, FX rates |
| Trade | 4 | Bilateral flows, top partners, product breakdowns |
| Policies | 6 | Laws, regulations, policy timelines, lifecycle events |
| Sources | 2 | Data provenance: World Bank, UN, FAOSTAT, central banks |
| Geographies | 1 | Continent, region, subregion hierarchy |
Every tool is read-only and carries MCP safety annotations, so clients can run them without write-risk prompts.
What you can ask once connected
- "Compare GDP for Nigeria and South Africa over the last 10 years."
- "Show current FX rates for East African currencies."
- "Who is Kenya's head of state and when did they take office?"
- "Which African elections are coming up this year?"
- "Rank African countries by under-five mortality."
- "What are Nigeria's top export products?"
For agents reading this programmatically
- Condensed docs index: /llms.txt
- Full docs as plain text: /llms-full.txt
- OpenAPI schema:
https://api.africa-api.com/openapi.json - Base URL:
https://api.africa-api.com/v1withAuthorization: Bearerauth (authentication guide)