Skip to main content
Glama
anilsharmay

Country Explorer MCP Server

by anilsharmay

MCP Demo: Country Explorer with LangGraph

🌍 Country Explorer: MCP + LangGraph Integration

This project demonstrates a complete MCP (Model Context Protocol) server integrated with LangGraph to create beautiful country profiles with embedded images.

✨ Features

  • πŸ” MCP Server with Unsplash Search API integration

  • πŸ€– LangGraph Agent for intelligent country exploration

  • πŸ–ΌοΈ 10 Images per Country with photographer credits

  • πŸ“„ Beautiful Markdown Profiles with embedded images

  • πŸ§ͺ Comprehensive Test Suite for validation

  • πŸ“ Organized Project Structure with profiles/ and tests/ folders

πŸ—οΈ Project Structure

mcp-demo/
β”œβ”€β”€ country_explorer.py          # Main LangGraph app (10 images)
β”œβ”€β”€ server.py                   # MCP server with Unsplash API
β”œβ”€β”€ profiles/                   # πŸ“ Generated country profiles
β”‚   β”œβ”€β”€ india_profile.md
β”‚   β”œβ”€β”€ japan_profile.md
β”‚   β”œβ”€β”€ uganda_profile.md
β”‚   └── usa_profile.md
β”œβ”€β”€ tests/                      # πŸ“ Test files
β”‚   β”œβ”€β”€ test_country_explorer.py
β”‚   β”œβ”€β”€ test_unsplash.py
β”‚   └── search_5_mountains.py
└── .env                        # API keys

πŸš€ Quick Start

Prerequisites

  • Python 3.13+

  • Unsplash API key

  • OpenAI API key

Installation

  1. Clone the repository:

    git clone https://github.com/anilsharmay/mcp-demo.git
    cd mcp-demo
  2. Install dependencies:

    uv sync
  3. Configure environment variables: Create .env file with your API keys:

    UNSPLASH_API_KEY=your_unsplash_api_key_here
    OPENAI_API_KEY=your_openai_api_key_here
    TAVILY_API_KEY=your_tavily_api_key_here

Running the Country Explorer

  1. Start the MCP server:

    uv run mcp dev server.py
  2. Run the Country Explorer:

    uv run python country_explorer.py
  3. Run tests:

    cd tests && uv run python test_country_explorer.py

🎯 MCP Server Tools

The MCP server provides these tools:

  • unsplash_search: Search for beautiful images with orientation filters

  • web_search: Search the web for country information

  • roll_dice: Roll dice with custom notation

πŸ€– LangGraph Agent

The Country Explorer agent:

  • Researches countries using web search

  • Finds 10 beautiful images via Unsplash

  • Creates rich markdown profiles with embedded images

  • Includes photographer credits and links

πŸ“Έ Sample Output

Each country profile includes:

  • Cultural information and history

  • Geographic details and landmarks

  • 10 high-quality images with credits

  • Clean markdown formatting for easy viewing

🎬 Demo GIFs

India Profile:

India Profile Demo

Switzerland Profile:

Switzerland Profile Demo

USA Profile:

USA Profile Demo

πŸ§ͺ Testing

Run the comprehensive test suite:

# Test MCP server
uv run python tests/test_unsplash.py

# Test Country Explorer
cd tests && uv run python test_country_explorer.py

# Test mountain search
uv run python tests/search_5_mountains.py

πŸ”§ MCP Configuration

Add to your Cursor MCP settings:

{
  "mcpServers": {
    "unsplash-mcp-server": {
      "command": "uv",
      "args": ["--directory", ".", "run", "server.py"]
    }
  }
}

πŸ“š Technologies Used

  • MCP (Model Context Protocol) - Server framework

  • LangGraph - Agent orchestration

  • LangChain MCP Adapters - Tool integration

  • Unsplash API - Image search

  • OpenAI GPT-4 - Language model

  • Python 3.13 - Runtime environment

πŸŽ‰ Showcase

This project demonstrates:

  • βœ… MCP Server Development with custom API integration

  • βœ… LangGraph Agent Creation with tool orchestration

  • βœ… Beautiful Output Generation with embedded images

  • βœ… Clean Project Organization and testing

  • βœ… Real-world Application of AI agent frameworks

Perfect for showcasing MCP + LangGraph integration! 🌍✨

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Resources

Looking for Admin?

Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.

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/anilsharmay/mcp-demo'

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