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! 🌍✨
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。