Skip to main content
Glama

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

๐Ÿงช 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! ๐ŸŒโœจ

Deploy Server
-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables users to create rich country profiles by searching for high-quality images through Unsplash API and gathering country information through web search. Generates beautiful markdown profiles with embedded images and photographer credits.

  1. ๐ŸŒ Country Explorer: MCP + LangGraph Integration
    1. โœจ Features
      1. ๐Ÿ—๏ธ Project Structure
        1. ๐Ÿš€ Quick Start
          1. Prerequisites
          2. Installation
          3. Running the Country Explorer
        2. ๐ŸŽฏ MCP Server Tools
          1. ๐Ÿค– LangGraph Agent
            1. ๐Ÿ“ธ Sample Output
              1. ๐Ÿงช Testing
                1. ๐Ÿ”ง MCP Configuration
                  1. ๐Ÿ“š Technologies Used
                    1. ๐ŸŽ‰ Showcase

                      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