# Africa API MCP Server
An MCP server that gives Claude direct access to the Africa API — comprehensive data on all 54 African nations including economic indicators, markets, trade, government, elections, and policies.
## Quick Start
### 1. Get an API key
Sign up at africa-api.com and create an API key from your dashboard.
### 2. Connect your client
The server runs on demand via `npx` — **nothing to install or host**. Pick your client:
**Claude Code** (one command):
```bash
claude mcp add africa-api -e AFRICA_API_KEY=your-api-key-here -- npx -y africa-api-mcp
```
**Claude Desktop** — add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows), then restart:
```json
{
"mcpServers": {
"africa-api": {
"command": "npx",
"args": ["-y", "africa-api-mcp"],
"env": { "AFRICA_API_KEY": "your-api-key-here" }
}
}
}
```
**Cursor** — add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per project) with the same `mcpServers` block as above.
**VS Code** (Copilot agent mode) — one command:
```bash
code --add-mcp '{"name":"africa-api","command":"npx","args":["-y","africa-api-mcp"],"env":{"AFRICA_API_KEY":"your-api-key-here"}}'
```
Any other MCP client works with the same `npx -y africa-api-mcp` command plus the `AFRICA_API_KEY` environment variable. The server is also listed in the MCP Registry as `io.github.africa-api/africa-api-mcp`.
## What You Can Ask Claude
Once connected, Claude can answer questions like:
- "What's the GDP of Nigeria vs South Africa over the last 10 years?"
- "Show me current FX rates for East African currencies"
- "Who is the head of state of Kenya and when did they take office?"
- "What elections are coming up in Africa this year?"
- "What are Nigeria's top 5 export products?"
- "Show me the policy timeline for Rwanda"
- "Rank African countries by life expectancy"
- "What stocks are listed on the Nigerian Exchange?"
- "Compare trade flows between Kenya and …