Skip to main content
Glama
llanterme
by llanterme
countries.py1.64 kB
from mcp.server.fastmcp import FastMCP COUNTRIES = [ "Afghanistan", "Albania", "Algeria", "Argentina", "Armenia", "Australia", "Austria", "Bahrain", "Bangladesh", "Belgium", "Brazil", "Bulgaria", "Cambodia", "Canada", "Chile", "China", "Colombia", "Croatia", "Cuba", "Denmark", "Dominican Republic", "Ecuador", "Egypt", "Estonia", "Ethiopia", "Finland", "France", "Germany", "Ghana", "Greece", "Haiti", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kuwait", "Latvia", "Lebanon", "Libya", "Lithuania", "Luxembourg", "Malaysia", "Mexico", "Morocco", "Nepal", "Netherlands", "New Zealand", "Nigeria", "Norway", "Pakistan", "Peru", "Philippines", "Poland", "Portugal", "Qatar", "Romania", "Russia", "Saudi Arabia", "Singapore", "South Africa", "South Korea", "Spain", "Sri Lanka", "Sudan", "Sweden", "Switzerland", "Sitil", "Thailand", "Turkey", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Venezuela", "Vietnam", "Yemen", "Zimbabwe" ] def register(mcp: FastMCP): @mcp.tool() def get_countries(letter: str) -> list[str]: """Get countries that start with a specific letter (case insensitive).""" letter = letter.strip().upper() return [c for c in COUNTRIES if c.upper().startswith(letter)] @mcp.tool() def get_countries_by_length(length: int) -> list[str]: """Get countries with names of a specific length.""" return [c for c in COUNTRIES if len(c) == length]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/llanterme/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server