tokyo-transit-mcp: Instructions file for Claude Code

CLAUDE.md

tokyo-transit-mcp CLAUDE.md is an instructions file for Claude Code from loosephoto/tokyo-transit-mcp. It costs 1,540 tokens per session, scanned A, original, MIT.

Project instructions for a server that combines public transport information in the Tokyo region, including trains, buses, ferries, flights, and shared bicycles. It also uses weather and service-status data to provide travel advice in Japanese, English, and Chinese.

In plain words
What is it for?
Use it to search Tokyo-area transport options, check disruptions and weather, consider flights or shared bikes, and set up the project’s MCP server with its required data-service keys.
Why use it?
It brings several transport and weather sources together, so an agent does not need to check each service separately. The instructions also explain how to store required API keys safely and connect the server to Claude Code.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions Claude Code.

This is loosephoto/tokyo-transit-mcp's own configuration. It tells Claude Code how to work on tokyo-transit-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tokyo-transit-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to loosephoto/tokyo-transit-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/loosephoto/tokyo-transit-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/loosephoto/tokyo-transit-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tokyo-transit-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/loosephoto/tokyo-transit-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/loosephoto/tokyo-transit-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/loosephoto/tokyo-transit-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/loosephoto/tokyo-transit-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tokyo-transit-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/loosephoto/tokyo-transit-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/loosephoto/tokyo-transit-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,540 This file is loaded in full into every session.
When invoked 1,540 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01540 $0.01540
Opus 5 $0.00770 $0.00770
Sonnet 5 $0.00308 $0.00308
Haiku 4.5 $0.00154 $0.00154

Measured 10d ago against content hash 7ff9399f3797, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

tokyo-transit-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Tokyo Transit MCP Server — Claude Code 用プロジェクトガイド

東京圏の公共交通情報(鉄道・バス・水上バス・フェリー・空港フライト・コミュニティバス・シェアサイクル)を1つのMCPサーバーで横断検索するサーバーです。ODPT・気象庁(JMA)・GBFS・GTFS を統合し、天候・運行情報を加味したAIインテリジェントアドバイスを日本語・英語・中国語で自動生成します。

並行作業・開発規約は分割ルールにあります: .claude/rules/(所有権・並行worktree・検証ゲート・コーディング規約)と .claude/agents/(ドメイン別サブエージェント)を参照してください。


前提条件

  • Node.js 18+(ESM・import 構文。"type": "module"
  • リポジトリ直下で npm install 済み(依存: @modelcontextprotocol/sdkaxiosadm-zipdotenv

セットアップ(Claude Code から利用する場合)

1. APIキーは .env にのみ保存

重要: このサーバーのAPIキーは MCPクライアントの env や設定ファイルには一切入れません。リポジトリルートの .env のみから読み込みます。src/config.mjssrc/ を基準に .env を解決するため、MCPサーバーの起動時カレントディレクトリには依存しません

# ODPT APIキー(必須: https://developer.odpt.org/ で取得)
echo 'ODPT_API_KEY=your_api_key_here' > .env

# AviationStack APIキー(任意・フライト時刻用: https://aviationstack.com/)
echo 'FLIGHT_API_KEY=your_flight_api_key_here' >> .env

.env は秘密情報を含むため絶対にコミット・共有しないでください(.gitignore で除外済み)。

2. Claude Code に MCP サーバーを登録

リポジトリ直下で以下を実行します(プロジェクトスコープ推奨)。

claude mcp add -s project tokyo-transit -- node src/index.mjs
claude mcp list   # 確認
  • src/index.mjs の相対パスは Claude Code が MCP を起動する際の cwd に依存。cwd が不明な場合は絶対パス(node /path/to/tokyo-transit-mcp/src/index.mjs)を使用。
  • .env の読み込みはカレントディレクトリ非依存なので、パスが通ればAPIキーは自動で読み込まれます。
  • 別ディレクトリにクローンした場合はパスをクローン先に合わせてください。

3. 動作確認

東京の今日の天気と運行影響アドバイスを教えて

(→ mcp__tokyo-transit__get_weather が呼ばれる)


利用可能なツール(13種)

ツール 機能
search_route 乗換ルート検索(天気・AIアドバイス・多言語・コミュニティバス駅接続・到着地周辺レンタサイクル案内)
get_station_info 駅の基本情報(乗り入れ路線・事業者)
get_weather 天気・気温・運行影響AIアドバイス
search_fare 2駅間の運賃検索(東京メトロ・都営・横浜市営・TX・りんかい・ゆりかもめ・多摩モノレールのみ)
get_timetable 指定駅の時刻表検索
search_bus バス停/系統検索・乗り継ぎ・横断乗り継ぎ
search_flight 空港フライト時刻・空港アクセス経路(AviationStack・任意)
list_transit_operators 交通事業者一覧(種別フィルタ付き)
get_operator_routes 事業者別の路線・駅一覧
list_ferry_ports フェリー/水上バス港一覧
search_ferry 港間の航路・時刻表検索
list_community_buses 東京都コミュニティバス一覧(41自治体)
get_running_status 交通事業者別のリアルタイム運行状況

Read the full file on GitHub · 96 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 96 lines · 1,540 tokens per session scan A 7ff9399f3797

Subscribe to this mod's changes

tokyo-transit-mcp CLAUDE.md is an instructions file published in the GitHub repository loosephoto/tokyo-transit-mcp (1 stars, last pushed 3d ago), licensed MIT. It adds 1,540 tokens to every session, about $0.0077 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens