# JR Fare Zone Calculator AI Agent Connect

> Calculate exact Japanese JR train fares using distance-based zones and IC card discounts.

## Overview
- **Category:** finance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_4AWAQInBDcW7fLV2BkVWu1rxrLkCOm9giz3CgSrz/ai-agent-connect
- **Tags:** japan, jr-east, train, fare, transportation

## Description

This MCP server provides deterministic tools to calculate Japanese JR train fares. It maps station pairs to specific distance zones and applies hierarchical pricing rules, including express surcharges and Suica/Pasmo IC card discounts. Use `get_station_distance` to find the distance between stations, `calculate_base_fare` for standard ticket prices, and `calculate_total_fare` to compute the final amount including premium service fees and smart card savings.

## Tools

### calculate_total_fare
Compute the final amount a passenger must pay, including surcharges and IC card discounts

### get_station_distance
Find the exact distance in kilometers between two specific stations on a given JR line

### calculate_base_fare
Determine the standard ticket price based on the distance traveled

## Prompt Examples

**Prompt:** 
```
How much is the fare from Tokyo to Shinjuku on the Yamanote Line?
```

**Response:** 
```
The fare for the trip from Tokyo to Shinjuku is 170 JPY.
```

**Prompt:** 
```
What is the total fare for a 50km trip with a Shinkansen surcharge using a Suica card?
```

**Response:** 
```
The total fare for a 50km trip with the express surcharge and Suica discount is 2,450 JPY.
```

**Prompt:** 
```
Calculate the base fare for a 5km journey.
```

**Response:** 
```
The base fare for a 5km journey is 170 JPY.
```

## Frequently Asked Questions

**How are the fares calculated?**
Fares are calculated using JR East distance brackets. The `calculate_base_fare` tool determines the base price, and `calculate_total_fare` adds any express surcharges and applies the IC card discount if requested.

**Does this support Suica or Pasmo cards?**
Yes. When using `calculate_total_fare`, you can set the `useIcCard` parameter to true to apply the standard IC card discount.

**Can I find the distance between two specific stations?**
Yes, you can use the `get_station_distance` tool to retrieve the exact distance in kilometers for a specific JR line.
