Zing Forum

Reading

JourneyAgent: An Intelligent Travel Planning System Based on Local Large Models and MCP Protocol

JourneyAgent demonstrates an agent architecture based on local large language models and the Model Context Protocol (MCP). It decouples AI from external APIs via standardized tool protocols, providing a feasible solution for building privacy-first, low-latency intelligent applications.

大语言模型智能体MCP协议本地AI工具调用开源模型隐私保护TypeScript
Published 2026-05-13 07:06Recent activity 2026-05-13 07:19Estimated read 7 min
JourneyAgent: An Intelligent Travel Planning System Based on Local Large Models and MCP Protocol
1

Section 01

Introduction to JourneyAgent: An Intelligent Travel Planning System Based on Local Large Models and MCP Protocol

This article introduces the JourneyAgent intelligent travel planning system, which builds an agent architecture based on local large language models and the Model Context Protocol (MCP). It decouples AI from external APIs via standardized tool protocols, aiming to provide a privacy-first, low-latency intelligent application solution. Key features include local open-source model deployment, architecture design with separation of concerns, and standardized tool invocation via the MCP protocol.

2

Section 02

Project Background and Architectural Philosophy

Most current AI applications rely on cloud APIs of proprietary large language models, which have issues like data privacy, network latency, and vendor lock-in. JourneyAgent explores a path of fully local-deployed open-source models while maintaining functional integrity. Its core architectural philosophy is "separation of concerns": AI is responsible for understanding intent, planning steps, and integrating results; the tool layer focuses on external API interactions and provides standardized interfaces, allowing each part to evolve independently.

3

Section 03

Value of MCP Protocol and Detailed System Architecture

JourneyAgent uses Anthropic's MCP protocol as the communication standard between AI and tools, defining a unified interface specification to solve the flexibility problem of hard-coded tool adaptation in traditional architectures. The system architecture is divided into four layers: User Interface Layer (built with Next.js, lightweight interaction), Orchestrator Layer (the system's brain, coordinates workflows, communicates with the Qwen 2.5 model from Ollama service), MCP Tool Layer (encapsulates external APIs into standardized interfaces, uses Zod to validate inputs and outputs), and Data Source Layer (connects to real data sources, handles underlying details).

4

Section 04

Technical Implementation of Local AI Runtime

JourneyAgent uses Ollama as the local large model service, paired with Alibaba's open-source Qwen 2.5 model. Advantages of local deployment: privacy protection (data never leaves the local device), low latency, and controllable costs. To address the limitations of open-source models, gaps are filled via prompt engineering optimization (detailed tool descriptions and example dialogues) and structured output guidance (specific JSON format output + error handling).

5

Section 05

Practical Application Example

Take the user query "What trains arrive at Manchester Piccadilly Station before 10 AM tomorrow?" as an example: The orchestrator identifies key information → calls the MCP tool getTrainSchedule → the MCP server validates parameters and requests the underlying railway API → returns data → the orchestrator integrates results to generate a natural language response.

6

Section 06

Limitations and Improvement Directions

Current limitations: Simple railway API integration (only basic queries, no fare comparison or seat booking); the model's ability to handle complex multi-turn dialogues and ambiguous queries needs improvement; the system is for single machines, lacking multi-user support and persistent storage. Improvement directions: Expand API functions, support model hot-swapping, add production-level features like user authentication and dialogue history management.

7

Section 07

Insights for AI Application Development

Insights from JourneyAgent: 1. Local open-source models can build practical AI applications, and good experiences can be provided through architectural design and prompt engineering; 2. Standardized protocols (like MCP) reduce tool integration costs and facilitate leveraging the community ecosystem; 3. The separation of concerns principle improves code maintainability and supports system evolution.

8

Section 08

Conclusion

JourneyAgent successfully demonstrates the feasibility of building intelligent applications based on local large models and standardized tool protocols. Although there is room for improvement in functional completeness and robustness, its architectural design and technical selection provide references for similar projects. As open-source model capabilities improve and the tool ecosystem matures, local-first AI architectures are expected to be more widely used in production environments.