Skip to main content
Glama

MCP 항공편 검색

모델 컨텍스트 프로토콜(MCP)을 기반으로 구축된 항공편 검색 서비스입니다. 이 서비스는 항공편 검색 기능을 위한 MCP 도구 구현 방법을 보여줍니다.

모델 컨텍스트 프로토콜이란 무엇인가요?

모델 컨텍스트 프로토콜(MCP)은 Anthropic에서 개발한 표준으로, 도구 설명, 호출 및 응답에 대한 구조화된 형식을 정의하여 AI 모델이 도구를 사용할 수 있도록 합니다. 이 프로젝트는 Claude 및 기타 MCP 호환 모델에서 사용할 수 있는 MCP 도구를 구현합니다.

Related MCP server: Google-Flights-MCP-Server

설치

지엑스피1

용법

MCP 서버를 시작합니다.

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

# Or run directly
python main.py --connection_type http

사용자 정의 포트를 지정할 수도 있습니다.

python main.py --connection_type http --port 5000

환경 변수

SerpAPI 키를 환경 변수로 설정합니다.

export SERP_API_KEY="your-api-key-here"

특징

  • 항공편 검색 기능을 위한 MCP 호환 도구

  • SerpAPI Google Flights와 통합

  • 편도 및 왕복 항공편 지원

  • 구조화된 출력을 통한 풍부한 로깅

  • 모듈식, 유지 관리 가능한 코드 구조

MCP 도구

이 패키지는 다음과 같은 모델 컨텍스트 프로토콜 도구를 제공합니다.

  • search_flights_tool : 다음 매개변수를 사용하여 공항 간 항공편을 검색합니다.

    • origin : 출발 공항 코드(예: ATL, JFK)

    • destination : 도착 공항 코드(예: LAX, ORD)

    • outbound_date : 출발 날짜(YYYY-MM-DD)

    • return_date : 왕복 여행의 경우 선택적인 복귀 날짜(YYYY-MM-DD)

  • server_status : MCP 서버가 실행 중인지 확인합니다.

프로젝트 구조

mcp-flight-search/
├── mcp_flight_search/
│   ├── __init__.py              # Package initialization and exports
│   ├── config.py                # Configuration variables (API keys)
│   ├── models/
│   │   ├── __init__.py          # Models package init
│   │   └── schemas.py           # Pydantic models (FlightInfo)
│   ├── services/
│   │   ├── __init__.py          # Services package init
│   │   ├── search_service.py    # Main flight search logic
│   │   └── serpapi_client.py    # SerpAPI client wrapper
│   ├── utils/
│   │   ├── __init__.py          # Utils package init
│   │   └── logging.py           # Logging configuration
│   └── server.py                # MCP server setup and tool registration
├── main.py                      # Main entry point
├── pyproject.toml               # Python packaging configuration
├── LICENSE                      # MIT License
└── README.md                    # Project documentation

작가

AI/ML 및 생성 AI에 대한 더 많은 기사를 보려면 Medium에서 저를 팔로우하세요: https://medium.com/@arjun-prabhulal

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

Available Tools

2 tools
search_flights_toolSearch flightsA
Read-only

Search Google Flights for one-way or round-trip flights between two airports.

NameRequiredDescriptionDefault
originYesIATA airport code, such as JFK or LAX
destinationYesIATA airport code, such as JFK or LAX
return_dateNoReturn date for a round trip, YYYY-MM-DD
outbound_dateYesDeparture date, YYYY-MM-DD

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile and external-service nature are covered. The description adds that it queries Google Flights and supports round trips, but says nothing about result volume, rate limits, caching, or failure modes for a live external search.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler, stating the action, provider, and trip types before any detail. Every clause earns its place for a tool of this simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need no explanation, and annotations cover safety and openness; the schema fully documents all four parameters. The only real gap is the absence of usage context, so the definition is nearly but not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, with each parameter fully documented (IATA codes with patterns, date formats, return_date defaulting to null). The description's 'one-way or round-trip' phrasing hints at how return_date is used but adds no format or syntax detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Search'), a specific resource ('Google Flights'), and the supported trip shapes ('one-way or round-trip flights between two airports'). It is far more specific than a tautology, though it does not explicitly distinguish itself from any alternative since the only sibling (server_status) is unrelated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: 'search flights' plus the required origin/destination/outbound_date schema makes the intent obvious, but the description never states when to use this tool, when not to, or any prerequisites. There is no competing sibling to route against, so the omission is low-impact.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

server_statusServer statusA
Read-only

Check that the flight search server is running.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered and the description only needs to add context. It adds that this probes the flight search server specifically, but says nothing about what a failed check looks like or how results should be interpreted beyond the output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler, perfectly sized for a no-argument probe. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description needn't explain return values, and a zero-param health check needs little more. The only mild gap is not indicating how to act on a negative result (retry, abort, report).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is nothing for the description to disambiguate; baseline 4 applies. The empty schema plus the sentence leaves no ambiguity about invocation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Check') and a precise resource ('the flight search server is running'), which is a health/liveness probe rather than a search — clearly distinct in kind from search_flights_tool. It doesn't explicitly name the sibling, but the action and object are unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

For a zero-parameter health check the intended usage is largely self-evident, so guidance is implied rather than stated. It never says when to call it (before a search? on error?) or that there are no alternatives, leaving the agent to infer context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updates
    • First observedsearch_flights_tool
    • First observedserver_status

TDQS

A3.6/5.0

Scored across 2 tools

Disambiguation5/5

The two tools serve entirely distinct purposes: one performs a flight search, the other reports server health. There is no plausible way to confuse them, and the descriptions make the boundary explicit.

Naming Consistency3/5

Both names are snake_case, but the convention is inconsistent: 'search_flights_tool' uses a redundant '_tool' suffix and a verb_verb_noun shape, while 'server_status' is a plain noun phrase. Readable, but the pattern isn't predictable.

Tool Count3/5

Two tools is thin for a flight search server; the health-check tool arguably doesn't earn a slot as a first-class tool. It's a borderline-surface rather than an extreme mismatch.

Completeness3/5

Flight search is covered, but obvious adjacent operations are absent: airport/location lookup, date-range or fare-calendar search, multi-city itineraries, and filtering/sorting of results. An agent can do the core task but will hit dead ends on common follow-ups.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that connects to Amadeus API, enabling AI assistants to search flights, analyze prices, find best travel deals, and plan multi-city trips.
    4 npm
    6
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables flight searching, booking, and payment processing. It also provides access to resources like user profiles, pricing rules, and company travel policies.
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    An interactive travel planning server that integrates flight searching, weather forecasting, and route calculation through external APIs like Amadeus and OpenWeather. It uses the Model Context Protocol to enable AI assistants to autonomously manage travel logistics and discover local services.
    -