Thanks to visit codestin.com
Credit goes to github.com

Skip to content

zacharyLYH/aitkl-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aitkl-mcp

A travel assistant MCP (Model Context Protocol) project that provides AI-powered travel services including currency conversion, weather data, public holidays, points of interest, and travel summaries through a client-server architecture.

Prerequisites for all OS'

  1. uv package - pip and conda don't have the MCP package we'll be needing

    • Non-Windows: curl -LsSf https://astral.sh/uv/install.sh | sh
    • Windows: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
  2. Python version > 3.9

MCP project setup

Client Setup

Non-Windows:

uv init client && cd client && uv venv && source .venv/bin/activate && uv add mcp anthropic python-dotenv && rm -rf main.py && touch client.py && cd ..

Windows:

uv init client && cd client && uv venv && .venv\Scripts\activate && uv add mcp anthropic python-dotenv && del main.py && touch client.py && cd ..

Server Setup

Non-Windows:

uv init server && cd server && uv venv && source .venv/bin/activate && uv add "mcp[cli]" httpx && rm -rf main.py && touch server.py && cd ..

Windows:

uv init server && cd server && uv venv && .venv\Scripts\activate && uv add "mcp[cli]" httpx && del main.py && touch server.py && cd ..

Running the Application

  1. Start the application:

    uv run --project client python client/client.py server/server.py
  2. Create a .env file with the following content:

    GEMINI_API_KEY=abc123
    GEMINI_MODEL_NAME=gemini-2.0-flash

    Note: Refer to Gemini API rate limits for the list of models and their limits.

  3. Get a Gemini API key from Google AI Studio and paste it in the .env file.

  4. Test the server with a sample query:

    curl --location 'http://localhost:8000/query' \
    --header 'Content-Type: application/json' \
    --data '{
        "query": "Create a travel summary for my trip to France!"
    }'

Troubleshooting

  1. Check if client has initialized:

    curl --location 'http://localhost:8000/health'
  2. Attempt to connect to the server:

    curl --location 'http://localhost:8000/connect'
  3. Check available MCP endpoints:

    curl --location 'http://localhost:8000/tools'

Development Guide

Suggested Order of Functions to Implement

  1. convert_currency()
  2. get_weather_by_location()
  3. get_public_holidays()
  4. get_country_code()
  5. search_poi()
  6. get_travel_summary_for_country()
  7. get_travel_summary_for_city()

Sample Questions to Test MCP

  1. What public holidays are there in US 2025?
  2. What's the weather like in Phoenix, Arizona?
  3. Tell me more about the USA!
  4. What restaurants are in Phoenix, Arizona?
  5. I'll need 4000 USD for my trip. How much is that in Malaysian Ringgit?
  6. Create a travel summary for my trip to USA!
  7. Create a travel summary for my trip to Frankfurt, Germany!

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages