Utilizes LangChain MCP adapters to integrate various tools and services within the agent workflow
Uses LangGraph for agent orchestration to create intelligent workflows that combine web search, image retrieval, and content generation for country profile creation
Integrates with OpenAI's GPT-4 language model to power the LangGraph agent for intelligent country exploration and content generation
Provides tools for searching and retrieving high-quality images from Unsplash's photo library, including support for orientation filters and photographer credits
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/andtests/folders
๐๏ธ Project Structure
๐ 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-demoInstall dependencies:
uv syncConfigure 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.pyRun the Country Explorer:
uv run python country_explorer.pyRun 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:
๐ง MCP Configuration
Add to your Cursor MCP settings:
๐ 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! ๐โจ
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.