Country Explorer MCP Server
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.
README
MCP Demo: Country Explorer with LangGraph
<p align="center"> <img src="https://github.com/AI-Maker-Space/LLM-Dev-101/assets/37101144/d1343317-fa2f-41e1-8af1-1dbb18399719" width="200px" height="auto"/> </p>
🌍 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/andtests/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
-
Clone the repository:
git clone https://github.com/anilsharmay/mcp-demo.git cd mcp-demo -
Install dependencies:
uv sync -
Configure environment variables: Create
.envfile 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
-
Start the MCP server:
uv run mcp dev server.py -
Run the Country Explorer:
uv run python country_explorer.py -
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 filtersweb_search: Search the web for country informationroll_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! 🌍✨
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.