AM

arjunprabhulal/mcp-llama3-client

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

9 stars 8 forks 质量 51 趋势 17MIT

A client for the MCP Flight Search service using Ollama and Llama 3.2 to provide a user-friendly flight search interface with Model Context Protocol tools

概览

A client for the MCP Flight Search service using Ollama and Llama 3.2 to provide a user-friendly flight search interface with Model Context Protocol tools. This client application provides a user-friendly interface to interact with the Model Context Protocol (MCP) flight search service. It allows users to search for flights between airports with specified dates. A client for the MCP Flight Search service using Ollama and Llama 3.2 to provide a user-friendly flight search interface with Model Context Protocol tools github.com/arjunprabhulal/mcp-llama3-client - mcp_flight_client.py: Main client implementation for interacting with the MCP Flight Search service - prompt_templates.py: Contains prompt templates for generating flight search queries Install the required packages for this client: Required packages: - llama-index - llama-index-llms-ollama - llama-index-tools-mcp - langchain-community This client uses Ollama to run Llama 3.2 locally. To install Ollama:

README

以下为原文 README 节选,完整内容请查看原文。

MCP Llama3 Flight Search Client

A client for the MCP Flight Search service using Ollama and Llama 3.2 to provide a user-friendly flight search interface with Model Context Protocol tools.

Description

This client application provides a user-friendly interface to interact with the Model Context Protocol (MCP) flight search service. It allows users to search for flights between airports with specified dates.

About

A client for the MCP Flight Search service using Ollama and Llama 3.2 to provide a user-friendly flight search interface with Model Context Protocol tools

github.com/arjunprabhulal/mcp-llama3-client

Files

  • mcp_flight_client.py: Main client implementation for interacting with the MCP Flight Search service
  • prompt_templates.py: Contains prompt templates for generating flight search queries

Installation

Install the required packages for this client:

pip install -r requirements.txt

Required packages:

  • llama-index
  • llama-index-llms-ollama
  • llama-index-tools-mcp
  • langchain-community

Installing Ollama

This client uses Ollama to run Llama 3.2 locally. To install Ollama:

  1. Download Ollama from the official website
  2. Install and start the Ollama application
  3. Pull the Llama 3.2 model:
ollama pull llama3.2

Prerequisites

You need to have the MCP Flight Search service running.

Installing the MCP Flight Search Package

# Install from PyPI
pip install mcp-flight-search

Starting the MCP Server

You can start the MCP server using one of the following methods:

# Using the command-line entry point
mcp-flight-search --connection_type http

# Or using the Python module approach
python -m mcp_flight_search.server --connection_type http

Usage

python mcp_flight_client.py

Architecture

+------------------------------+      HTTP      +------------------------------+
|                              |  |                              |
|  MCP Llama3 Flight Search    |                |  MCP Flight Search Server    |
|  Client (This Repository)    |                |  (Backend Service)           |
|                              |                |                              |
|  - mcp_flight_client.py      |                |  - search_flights_tool       |
|  - prompt_templates.py       |                |  - server_status             |
|                              |                |                              |
|  Uses:                       |                |  Uses:                       |
|  - llama-index               |                |  - Model Context Protocol    |
|  - llama-index-llms-ollama   |                |  - SerpAPI for Google        |
|    (with Llama 3.2)          |                |    Flights data              |
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →