Project · Intermediate · about 14 hours
An MCP server for World Bank development data
Expose the World Bank Indicators API to AI assistants through a small, well-described MCP server with tests, limits and clear errors.
Skills:AI agents and tool use, Python, Model Context Protocol (MCP), REST APIs and HTTP
Part of: AI/ML Engineer, Forward Deployed Engineer
Data and licences
Brief
The World Bank Indicators API at api.worldbank.org/v2 is free, needs no key and holds thousands of series such as SP.POP.TOTL (population) and NY.GDP.PCAP.CD (GDP per person). Assistants answer questions like "how has India's literacy rate changed since 2000?" badly from memory. Give them a reliable tool instead.
What to build
Write a thin client for the API with timeouts, retries and a small on-disk cache.
Build an MCP server with the official Python SDK. Tools:
search_indicators(query),get_series(indicator, country, start_year, end_year)andcompare_countries(indicator, countries, year).Validate inputs (ISO3 codes, year ranges, at most 10 countries). Return compact tables with units and the source line.
Return clear errors for unknown indicators, missing years and API failures.
Test each tool with recorded API responses, and add one end-to-end test that starts the server over stdio and calls a tool.
Connect it to an MCP client and record five real questions and answers in the README.
Deliverables
Repository with
server.py,client.py,tests/, a pinned dependency file andREADME.md
How it is graded
Reviewers install the server in their own client and ask five questions you have not seen. They check the answers against the World Bank website.
Stretch
Add a resource that lists popular indicators, and a prompt template for "country profile" requests.
Deliverables
- An MCP server with at least three tools (search indicators, get a series, compare countries)
- Input validation, timeouts, result size limits and cached responses
- Unit tests for each tool and a test that runs the server over stdio
- A README with install steps for an MCP client, example prompts and attribution
How a reviewer grades it
| Criterion | Weight | What good looks like |
|---|---|---|
| Tool names, descriptions and schemas are precise enough that a model picks the right tool | 25% | |
| Errors are returned as useful messages, never as stack traces or silent empty results | 20% | |
| Limits (time range, countries per call, response size) protect the model's context | 25% | |
| Tests cover the tools and the protocol round trip | 30% |