AM

apappascs/mcp-flight-search

开发工具

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

11 stars 3 forks 质量 49 趋势 18

Full-stack flight search application demonstrating Model Context Protocol (MCP) with Next.js and Spring Boot. Real-time Google Flights data via SerpAPI.

概览

Full-stack flight search application demonstrating the Model Context Protocol (MCP) with real-time Google Flights data. This is a monorepo featuring a Next.js frontend and Spring Boot MCP server that provides live flight search capabilities using SerpAPI's Google Flights API. - : Next.js 16 + React 19 + TypeScript + Tailwind CSS - : Spring Boot 3.4.5 + Spring AI 1.1.0 + Java 17 - MCP Flight Server (port 8080) - Flight search tools - MCP Client Service (port 8081) - AI chat integration - : Model Context Protocol (MCP) over HTTP Streaming - : Anthropic Claude Sonnet 4.5 - : SerpAPI Google Flights - : Node.js 18+ and npm - : Java 17+ and Maven 3.6+ - : - SerpAPI key (get one at serpapi.com) - Anthropic API key (get one at console.anthropic.

README

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

Flight Search MCP

Full-stack flight search application demonstrating the Model Context Protocol (MCP) with real-time Google Flights data.

Overview

This is a monorepo featuring a Next.js frontend and Spring Boot MCP server that provides live flight search capabilities using SerpAPI’s Google Flights API.

Tech Stack:

  • Frontend: Next.js 16 + React 19 + TypeScript + Tailwind CSS
  • Backend: Spring Boot 3.4.5 + Spring AI 1.1.0 + Java 17
    • MCP Flight Server (port 8080) - Flight search tools
    • MCP Client Service (port 8081) - AI chat integration
  • Protocol: Model Context Protocol (MCP) over HTTP Streaming
  • AI: Anthropic Claude Sonnet 4.5
  • API: SerpAPI Google Flights

Quick Start

Prerequisites

  • Frontend: Node.js 18+ and npm
  • Backend: Java 17+ and Maven 3.6+
  • API Keys:

Setup

  1. Clone the repository:

    git clone https://github.com/apappascs/mcp-flight-search.git
    cd flight-search-mcp
    
  2. Set environment variables:

    export SERP_GOOGLE_FLIGHTS_API_KEY=your_serpapi_key_here
    export ANTHROPIC_API_KEY=your_anthropic_key_here
    
  3. Start everything (recommended):

    ./start-all.sh
    

    This script will:

    • Verify both API keys
    • Start MCP Flight Server on port 8080
    • Start MCP Client Service on port 8081
    • Start frontend on port 3000
    • Open browser automatically
    • Display logs in real-time

Manual Start

Terminal 1 - MCP Flight Server:

cd backend/mcp-flight-server
./mvnw spring-boot:run

Terminal 2 - MCP Client Service:

cd backend/mcp-client-service
./mvnw spring-boot:run

Terminal 3 - Frontend:

cd frontend
npm install  # First time only
npm run dev

Browser:

open http://localhost:3000

Project Structure

flight-search-mcp/
├── frontend/                        # Next.js application (port 3000)
│   ├── app/                        # App router pages
│   ├── components/                 # React components
│   ├── lib/                        # MCP & AI chat clients
│   ├── types/                      # TypeScript types
│   └── README.md                   # Frontend documentation
│
├── backend/
│   ├── mcp-flight-server/          # MCP Flight Server (port 8080)
│   │   ├── src/main/java/          # Flight search service
│   │   ├── src/main/resources/     # Configuration
│   │   └── README.md               # Server documentation
│   │
│   └── mcp-client-service/         # MCP Client Service (port 8081)
│       ├── src/main/java/          # AI chat integration
│       ├── src/main/resources/     # Configuration
│       └── README.md               # Client documentation
│
├── start-all.sh                    # One-command launcher
在 GitHub 查看完整 README

安装

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

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