{"id":15099086,"url":"https://github.com/pitang1965/tns-web","last_synced_at":"2026-02-20T22:03:40.200Z","repository":{"id":237673912,"uuid":"795015203","full_name":"pitang1965/tns-web","owner":"pitang1965","description":"車旅のしおり。旅程と車中泊マップ","archived":false,"fork":false,"pushed_at":"2026-02-14T09:14:35.000Z","size":3558,"stargazers_count":0,"open_issues_count":11,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-14T17:45:20.462Z","etag":null,"topics":["approuter","auth0","nextjs","shadcn-ui","typescript"],"latest_commit_sha":null,"homepage":"https://tabi.over40web.club/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pitang1965.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-02T12:19:33.000Z","updated_at":"2026-02-14T09:12:44.000Z","dependencies_parsed_at":"2024-05-03T00:20:28.658Z","dependency_job_id":"b61b6568-3a83-4649-b3f2-5f121bc6b703","html_url":"https://github.com/pitang1965/tns-web","commit_stats":{"total_commits":87,"total_committers":1,"mean_commits":87.0,"dds":0.0,"last_synced_commit":"9fbfaac21668ca31d283bef7f9275a0bb6a3cf1f"},"previous_names":["pitang1965/next-auth-app","pitang1965/tns-web"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pitang1965/tns-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pitang1965%2Ftns-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pitang1965%2Ftns-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pitang1965%2Ftns-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pitang1965%2Ftns-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pitang1965","download_url":"https://codeload.github.com/pitang1965/tns-web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pitang1965%2Ftns-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29666462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T19:49:36.704Z","status":"ssl_error","status_checked_at":"2026-02-20T19:44:05.372Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["approuter","auth0","nextjs","shadcn-ui","typescript"],"created_at":"2024-09-25T17:05:10.174Z","updated_at":"2026-02-20T22:03:40.192Z","avatar_url":"https://github.com/pitang1965.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).\n\n# 旅程管理ウェブアプリケーション「車旅のしおり」\n\n## 概要\n\n旅行計画の作成から実施までをサポートするウェブアプリケーションで、Google Maps 連携により効率的な旅程管理を実現します。カーナビゲーション（Android Auto・Apple CarPlay）との連携を前提に設計されており、旅行中の移動をスムーズにサポートします。\n\n全国の車中泊スポット情報（トイレ・入浴施設、安全性、静けさなど）を地図で検索でき、気になるスポットは旅程に直接追加可能。ユーザー投稿機能により、コミュニティで情報を共有できます。\n\n![車旅のしおりアプリ画面1](./docs/images/fig1.jpg)\n\n![車旅のしおりアプリ画面2](./docs/images/fig2.jpg)\n\n## 主な機能\n\n- **旅程作成・共有**: 複数日にわたる旅行計画を簡単に作成。公開設定で他のユーザーと共有も可能です。車中泊スポットも簡単追加。\n- **車中泊スポット情報**: トイレ・入浴施設、コンビニまでの距離、安全性・静けさの情報を提供。あなたのおすすめスポットも募集中！\n- **地図連携**: 各アクティビティに地図情報を紐づけて視覚的に管理。Google Maps から座標データ（例: 座標が埋め込まれた URL や、`34.1560076,132.3973073`）をクリップボード経由で簡単インポート。\n- **カーナビ連携**: Android Auto・Apple CarPlay 対応。保存した位置情報から Google Maps を起動してルート検索。\n- **簡単共有**: 旅程を SNS（X・LINE・Facebook 等）やメールで簡単に共有できます。\n- **スポット投稿**: あなたが見つけた車中泊スポットを投稿して、他の旅行者と情報を共有しましょう。\n\n## 使用例\n\n1. 旅行前: 複数日程の旅程を作成し、各スポットの位置情報を登録\n2. 旅行中: 登録したスポットへのナビゲーションをワンタップで起動\n3. 旅行後: 思い出の旅程を SNS で共有\n\nGoogle Maps とシームレスに連携することで、旅行計画から実際の移動までをスムーズにサポートします。\n\n## 主要技術\n\n### フレームワーク\n\n- [Next.js](https://nextjs.org/) - React ベースのフルスタックフレームワーク\n\n### UI/UX ライブラリ\n\n- [React](https://react.dev/) - ユーザーインターフェース構築用ライブラリ\n- [Radix UI](https://www.radix-ui.com/) - アクセシビリティに優れたヘッドレス UI コンポーネント\n- [Tailwind CSS](https://tailwindcss.com/) - ユーティリティファーストの CSS フレームワーク\n- [Lucide React](https://lucide.dev/) - アイコンライブラリ\n\n### 地図関連\n\n- [Mapbox GL](https://docs.mapbox.com/mapbox-gl-js/) - インタラクティブな地図実装\n- [React Leaflet](https://react-leaflet.js.org/) - React 用地図コンポーネント\n\n### データ処理\n\n- [MongoDB](https://www.mongodb.com/) - NoSQL データベース\n- [Mongoose](https://mongoosejs.com/) - MongoDB のオブジェクトモデリングツール\n\n### 状態管理\n\n- [Jotai](https://jotai.org/) - プリミティブで柔軟な React 向け状態管理ライブラリ\n\n### フォーム処理/バリデーション\n\n- [React Hook Form](https://react-hook-form.com/) - フォーム状態管理\n- [Zod](https://github.com/colinhacks/zod) - TypeScript ファーストのスキーマバリデーション\n\n### 認証\n\n- [@auth0/nextjs-auth0](https://github.com/auth0/nextjs-auth0) - Auth0 による認証機能\n\n### メール送信\n\n- [MailerSend](https://www.mailersend.com/) - トランザクショナルメール送信サービス\n\n### モニタリング\n\n- [Sentry](https://sentry.io/) - エラー追跡と監視\n\n## 開発ツール\n\n- **言語**: [TypeScript](https://www.typescriptlang.org/)\n- **リンター**: [ESLint](https://eslint.org/)\n- **環境変数**: [dotenv](https://github.com/motdotla/dotenv)\n\n## .env.local の設定\n\n### Auth0\n\n- `AUTH0_SECRET`:\n  - Auth0 SDK が使用する秘密鍵。セッションの暗号化などに使用される。\n- `AUTH0_BASE_URL`:\n  - アプリケーションのベース URL。ログイン後のリダイレクト先として使用される。\n- `AUTH0_ISSUER_BASE_URL`:\n  - Auth0 テナントの URL。認証リクエストの送信先となる。\n- `AUTH0_CLIENT_ID`:\n  - Auth0 アプリケーションの識別子。認証リクエストに使用される。\n- `AUTH0_CLIENT_SECRET`:\n  - Auth0 アプリケーションの秘密鍵。トークン取得時などに使用される。\n- `AUTH0_AUDIENCE`:\n  - API の識別子。アクセストークンの発行対象となる API を指定する。\n  - 例: `https://api.tabi-no-shiori.com`\n- `AUTH0_DOMAIN`:\n  - Auth0 テナントのドメイン。認証エンドポイントの構築に使用される。\n  - 例: `your-tenant.auth0.com`\n- `AUTH0_SCOPE'`:\n  - アプリケーションが要求する権限（スコープ）を指定する。複数のスコープはスペースで区切る。\n  - 例：`openid profile email read:shows`\n- `AUTH0_M2M_CLIENT_ID`:\n  - Auth0 Management API にアクセスするための Machine to Machine Application のクライアント ID。\n  - ユーザー統計取得などの管理機能で使用される。\n- `AUTH0_M2M_CLIENT_SECRET`:\n  - Auth0 Management API にアクセスするための Machine to Machine Application のクライアント秘密鍵。\n  - ユーザー統計取得などの管理機能で使用される。\n\n### 地図\n\n- `NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN`:\n  - Mapbox API にアクセスするためのトークン。地図の表示や機能の利用に必要。\n\n### データベース\n\n- `MONGODB_URI`:\n  - MongoDB データベースに接続するための接続文字列。\n  - **重要**: データベース名を必ず含めてください（`/データベース名?`の形式）\n  - 開発環境の例: `mongodb+srv://username:password@cluster0.xxxxx.mongodb.net/itinerary_db_dev?retryWrites=true\u0026w=majority`\n  - 本番環境の例: `mongodb+srv://username:password@cluster0.xxxxx.mongodb.net/itinerary_db?retryWrites=true\u0026w=majority`\n- `APP_MONGODB_URI`（開発環境のみ）:\n  - **開発環境専用**。Claude Code の MCP サーバー（mongodb-readonly）が `MONGODB_URI` を上書きする場合の回避策。\n  - 設定されている場合、`MONGODB_URI` より優先して使用されます。\n  - 本番環境（Vercel 等）では設定不要です。\n\n**環境別のデータベース設定:**\n\n- **開発環境** (`.env.local`): `itinerary_db_dev` を使用。MCP サーバーとの競合を避けるため `APP_MONGODB_URI` も設定を推奨。\n- **本番環境** (Vercel 等の環境変数): `itinerary_db` を使用。`MONGODB_URI` のみで OK。\n- 詳細は `ENVIRONMENT_SETUP.md` を参照してください。\n\n### モニタリング・分析\n\n- `SENTRY_AUTH_TOKEN`:\n  - Sentry のビルド時認証トークン。ソースマップのアップロードなどに使用される。\n- `NEXT_PUBLIC_GA_ID`:\n  - Google Analytics の測定 ID。ウェブサイトのトラフィック分析に使用される。\n  - 例: `G-XXXXXXXXXX`\n\n### 広告\n\n- `NEXT_PUBLIC_ADSENSE_CLIENT_ID`:\n  - Google AdSense のクライアント ID。広告の表示に使用される。\n  - 例: `ca-pub-XXXXXXXXXXXXXXXX`\n\n### 管理者\n\n- `ADMIN_EMAIL`:\n  - お問い合わせフォームの送信先となる管理者のメールアドレス。\n  - 例: `admin@example.com`\n- `ADMIN_EMAILS`:\n  - 管理者のメールアドレス一覧（サーバーサイド用）。カンマ区切りで複数指定可能。\n  - 例: `admin@example.com,admin2@example.com`\n- `NEXT_PUBLIC_ADMIN_EMAILS`:\n  - 管理者のメールアドレス一覧（クライアントサイド用）。カンマ区切りで複数指定可能。\n  - 例: `admin@example.com,admin2@example.com`\n\n### メール送信（MailerSend）\n\n- `MAILERSEND_API_TOKEN`:\n  - MailerSend の API トークン。お問い合わせフォームやシステム通知メールの送信に使用。\n  - 例: `mlsn.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`\n- `MAILERSEND_FROM_EMAIL`:\n  - メール送信時の送信者メールアドレス。認証済みドメインのメールアドレスを指定。\n  - 例: `tabi-support@over40web.club`\n- `MAILERSEND_FROM_NAME`:\n  - メール送信時の送信者名。\n  - 例: `車旅のしおり`\n\n#### お問い合わせメールの転送フロー\n\nお問い合わせフォームから送信されたメールは以下の流れで処理されます：\n\n1. **ユーザー送信** → お問い合わせフォーム入力・送信\n2. **MailerSend 経由** → `tabi-support@over40web.club` から送信\n3. **ドメイン転送** → Squarespace で設定されたメール転送（`over40web.club`ドメイン）\n4. **管理者受信** → `tabi-over40webclub-support@googlegroups.com` に転送\n\n**メール転送設定の管理:**\n\n- ドメインのメール転送は [Squarespace Domains](https://account.squarespace.com/domains/managed/over40web.club/email) で設定・管理\n- `tabi-support@over40web.club` → `tabi-over40webclub-support@googlegroups.com` の転送設定\n\nこの設定により、お問い合わせ内容が確実に管理者チームに届きます。\n\n## Docker で動かす場合\n\n```bash\n$ docker-compose up --build\n```\n\n## Getting Started\n\nFirst, run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n# or\npnpm dev\n# or\nbun dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\nYou can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.\n\nThis project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.\n\n## Learn More\n\nTo learn more about Next.js, take a look at the following resources:\n\n- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.\n- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.\n\nYou can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!\n\n## Deploy on Vercel\n\nThe easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template\u0026filter=next.js\u0026utm_source=create-next-app\u0026utm_campaign=create-next-app-readme) from the creators of Next.js.\n\nCheck out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.\n\n# ファイルの解説\n\n- components.json\n  - shadcn/ui ライブラリを使用する Next.js プロジェクトの設定ファイル\n- sentry.\\*.ts\n  - Sentry を Next.js アプリケーションに統合するための設定ファイル\n    - sentry.client.config.ts:このファイルはクライアントサイド（ブラウザ）での Sentry の設定を行う。\n    - ユーザーのブラウザで発生したエラーやパフォーマンスの問題を捕捉する。\n    - sentry.edge.config.ts\n      - このファイルは Edge 環境（例：Vercel Edge Functions）での Sentry の設定を行う。\n      - サーバーレス関数やエッジコンピューティング環境で発生したエラーを追跡する。\n    - sentry.server.config.ts:\n      - このファイルはサーバーサイドでの Sentry の設定を行う。\n      - Node.js 環境で実行されるサーバーサイドのコードで発生したエラーを捕捉する。\n\n# MongoDB MCP Server セットアップガイド\n\nClaude Code で MongoDB Atlas データベースを安全に探索・分析するためのセットアップ手順\n\n## 概要\n\nModel Context Protocol (MCP) を使用して、Claude Code から MongoDB Atlas データベースに読み取り専用でアクセスできるようにする設定方法です。これにより、自然言語でデータベースの探索、スキーマ分析、データ分析が可能になります。\n\n## 前提条件\n\n- **MongoDB Atlas** アカウントとクラスター\n- **Node.js** バージョン 20.19.0 以降\n- **Claude Code** がインストール済み\n\n## セットアップ手順\n\n### 1. MongoDB Atlas での読み取り専用ユーザー作成\n\n1. **MongoDB Atlas 管理画面**にログイン\n2. **Security** → **Database Access** に移動\n3. **Add New Database User** をクリック\n4. 以下の設定でユーザーを作成：\n   ```\n   Authentication Method: Password\n   Username: claude_readonly\n   Password: 強力なパスワード（保存しておく）\n   Database User Privileges: Only read any database\n   ```\n\n### 2. ネットワークアクセスの設定\n\n1. **Security** → **Network Access** に移動\n2. 現在の IP アドレスまたは`0.0.0.0/0`（開発用）を追加\n\n### 3. 接続文字列の確認\n\n1. **Database** → **Connect** → **Connect your application**\n2. 接続文字列をコピー：\n   ```\n   mongodb+srv://claude_readonly:password@cluster0.xxxxx.mongodb.net/?retryWrites=true\u0026w=majority\u0026appName=ClaudeMCP\n   ```\n\n### 4. 環境変数の設定\n\n機密情報を安全に管理するため、接続文字列を環境変数で設定します。\n\n#### .env.mcp ファイルの作成\n\n```bash\n# プロジェクトルートに .env.mcp ファイルを作成\necho \"MONGODB_URI_READONLY=mongodb+srv://claude_readonly:your_password@cluster0.xxxxx.mongodb.net/?appName=ClaudeMCP\" \u003e .env.mcp\n```\n\n#### .gitignore への追加\n\n```bash\n# .gitignore に機密情報ファイルを追加\necho \".env.mcp\" \u003e\u003e .gitignore\necho \"setting.local.json\" \u003e\u003e .gitignore\n```\n\n### 5. Claude Code MCP サーバーの追加\n\n#### 方法 A: 環境変数ファイルを使用（推奨）\n\n```bash\n# プロジェクトルートディレクトリで実行\nclaude mcp add -s project mongodb-readonly \\\n  --env-file .env.mcp \\\n  -e MDB_MCP_READ_ONLY=\"true\" \\\n  -- npx -y @mongodb-js/mongodb-mcp-server --readOnly\n```\n\n#### 方法 B: 直接指定（開発時のみ）\n\n```bash\n# 機密情報を直接指定（本番環境では非推奨）\nclaude mcp add -s project mongodb-readonly \\\n  -e MDB_MCP_CONNECTION_STRING=\"mongodb+srv://claude_readonly:your_password@cluster0.xxxxx.mongodb.net/?appName=ClaudeMCP\" \\\n  -e MDB_MCP_READ_ONLY=\"true\" \\\n  -- npx -y @mongodb-js/mongodb-mcp-server --readOnly\n```\n\n### 6. 接続確認\n\n```bash\n# MCP サーバー一覧を確認\nclaude mcp list\n\n# 出力例：\n# mongodb-readonly: npx -y @mongodb-js/mongodb-mcp-server - ✓ Connected\n```\n\n## 使用方法\n\n### Claude Code の起動\n\n```bash\nclaude\n```\n\n### MCP 接続状況の確認\n\n```\n/mcp\n```\n\n### 基本的なデータベース操作\n\n#### データベース一覧の表示\n\n```\nデータベース一覧を表示して\n```\n\n#### コレクション一覧の表示\n\n```\nitinerary_dbデータベースのコレクション一覧を教えて\n```\n\n#### スキーマ分析\n\n```\nitinerariesコレクションのフィールド一覧と各フィールドのデータ型を教えて\n```\n\n#### データ統計\n\n```\nitinerariesコレクションに何件のドキュメントがありますか？\n```\n\n#### サンプルデータの確認\n\n```\nitinerariesコレクションのサンプルデータを3件表示して\n```\n\n## プロジェクト例：旅行計画アプリ\n\n### データベース構造\n\n- **データベース**: `itinerary_db`\n- **コレクション**: `itineraries` (4 件のドキュメント)\n\n### スキーマ詳細\n\n| フィールド     | データ型    | 説明            |\n| -------------- | ----------- | --------------- |\n| `_id`          | ObjectId    | MongoDB 標準 ID |\n| `createdAt`    | String/Date | 作成日時        |\n| `dayPlans`     | Array       | 日別プラン      |\n| `description`  | String      | 旅行の説明      |\n| `isPublic`     | Boolean     | 公開設定        |\n| `numberOfDays` | Number      | 旅行日数        |\n| `owner`        | Document    | 作成者情報      |\n| `sharedWith`   | Array       | 共有ユーザー    |\n| `startDate`    | String      | 開始日          |\n| `title`        | String      | 旅行タイトル    |\n| `updatedAt`    | Date        | 更新日時        |\n\n## 高度な活用例\n\n### データ分析クエリ\n\n```\n「最も人気のある旅行先を分析して」\n「過去1ヶ月の新規作成された旅行プラン数は？」\n「平均的な旅行日数を教えて」\n```\n\n### 開発支援\n\n```\n「このスキーマに基づいてTypeScript型定義を生成して」\n「Next.jsでitinerariesを取得するAPIルートのコードを書いて」\n「MongoDB Aggregationパイプラインで人気の旅行先TOP5を取得するクエリを作成して」\n```\n\n### コード生成\n\n```\n「MongooseスキーマでItineraryモデルを定義して」\n「React コンポーネントでitinerary一覧を表示するコードを書いて」\n```\n\n## トラブルシューティング\n\n### 接続エラーの場合\n\n1. **ユーザー権限の確認**\n\n   - MongoDB Atlas で読み取り権限が設定されているか確認\n\n2. **ネットワークアクセス**\n\n   - IP アドレスが Atlas のアクセスリストに含まれているか確認\n\n3. **接続文字列**\n   - パスワードに特殊文字が含まれる場合は URL エンコードが必要\n\n### MCP サーバーのリセット\n\n```bash\n# サーバーを削除\nclaude mcp remove mongodb-readonly\n\n# 再度追加\nclaude mcp add -s project mongodb-readonly \\\n  -e MDB_MCP_CONNECTION_STRING=\"your-connection-string\" \\\n  -e MDB_MCP_READ_ONLY=\"true\" \\\n  -- npx -y @mongodb-js/mongodb-mcp-server --readOnly\n```\n\n## セキュリティとファイル管理\n\n### Git 管理の設定\n\n#### コミットするファイル\n\n- ✅ `.mcp.json` - チーム共有の MCP 設定（機密情報なし）\n- ✅ `README.md` - セットアップ手順\n\n#### コミットしないファイル (.gitignore)\n\n```gitignore\n# MCP関連の機密情報\n.env.mcp\nsetting.local.json\n\n# Next.js環境変数\n.env.local\n.env.*.local\n\n# その他\nnode_modules/\n.next/\n```\n\n### 環境変数の管理\n\n#### Next.js アプリ用\n\n```bash\n# .env.local（開発環境）\n# APP_MONGODB_URI: MCP サーバーとの競合回避のため設定（開発環境のみ）\nAPP_MONGODB_URI=mongodb+srv://app_user:password@cluster0.xxxxx.mongodb.net/itinerary_db_dev\nMONGODB_URI=mongodb+srv://app_user:password@cluster0.xxxxx.mongodb.net/itinerary_db_dev\n\n# 本番環境（Vercel等）では MONGODB_URI のみ設定すれば OK\n# MONGODB_URI=mongodb+srv://app_user:password@cluster0.xxxxx.mongodb.net/itinerary_db\n```\n\n#### Claude MCP 用\n\n```bash\n# .env.mcp\nMONGODB_URI_READONLY=mongodb+srv://claude_readonly:password@cluster0.xxxxx.mongodb.net/?appName=ClaudeMCP\n```\n\n### セキュアな.mcp.json 設定\n\nチーム共有用の設定（機密情報を環境変数で参照）：\n\n```json\n{\n  \"mcpServers\": {\n    \"auth0\": {\n      \"type\": \"stdio\",\n      \"command\": \"cmd\",\n      \"args\": [\"/c\", \"npx\", \"-y\", \"@auth0/auth0-mcp-server\", \"run\"],\n      \"env\": {\n        \"DEBUG\": \"auth0-mcp\"\n      }\n    },\n    \"Sentry\": {\n      \"type\": \"http\",\n      \"url\": \"https://mcp.sentry.dev/mcp\"\n    },\n    \"mongodb-readonly\": {\n      \"type\": \"stdio\",\n      \"command\": \"cmd\",\n      \"args\": [\"/c\", \"npx\", \"-y\", \"@mongodb-js/mongodb-mcp-server\"],\n      \"env\": {\n        \"MDB_MCP_CONNECTION_STRING\": \"${MONGODB_URI}\",\n        \"MDB_MCP_READ_ONLY\": \"true\"\n      }\n    }\n  }\n}\n```\n\n**注意**: 上記は Windows 環境用の設定です。\n\n## セキュリティ注意事項\n\n- ✅ **読み取り専用ユーザー**を使用\n- ✅ **専用パスワード**を設定\n- ✅ **IP アクセス制限**を適用（本番環境）\n- ✅ **環境変数**で機密情報を管理\n- ✅ **機密情報は Git コミットしない**\n- ❌ **本番データベースでの書き込み権限は付与しない**\n\n## 設定ファイル\n\n### .mcp.json（コミットする）\n\n```json\n{\n  \"mcpServers\": {\n    \"auth0\": {\n      \"type\": \"stdio\",\n      \"command\": \"cmd\",\n      \"args\": [\"/c\", \"npx\", \"-y\", \"@auth0/auth0-mcp-server\", \"run\"],\n      \"env\": {\n        \"DEBUG\": \"auth0-mcp\"\n      }\n    },\n    \"Sentry\": {\n      \"type\": \"http\",\n      \"url\": \"https://mcp.sentry.dev/mcp\"\n    },\n    \"mongodb-readonly\": {\n      \"type\": \"stdio\",\n      \"command\": \"cmd\",\n      \"args\": [\"/c\", \"npx\", \"-y\", \"@mongodb-js/mongodb-mcp-server\"],\n      \"env\": {\n        \"MDB_MCP_CONNECTION_STRING\": \"${MONGODB_URI}\",\n        \"MDB_MCP_READ_ONLY\": \"true\"\n      }\n    },\n    \"context7-project\": {\n      \"type\": \"http\",\n      \"url\": \"https://mcp.context7.com/mcp\",\n      \"headers\": {\n        \"CONTEXT7_API_KEY\": \"${CONTEXT7_API_KEY}\",\n        \"X-Project-Context\": \"travel-itinerary-nextjs\"\n      }\n    }\n  }\n}\n```\n\n**注意**: Windows 環境では `cmd /c npx` の形式でコマンドを実行する必要があります。macOS/Linux では `\"command\": \"npx\"` と `\"args\": [\"-y\", \"@mongodb-js/mongodb-mcp-server\"]` の形式で設定してください。\n\n### .env.mcp（.gitignore に追加）\n\n```bash\n# Claude Code MCP用の読み取り専用接続文字列\nMONGODB_URI_READONLY=mongodb+srv://claude_readonly:your_password@cluster0.xxxxx.mongodb.net/?appName=ClaudeMCP\n```\n\n## MCP サーバー連携\n\n### Sentry\n\nSentry MCP サーバーを使用すると、Claude Code から Sentry のエラー監視データに直接アクセスできます。\n\n#### 機能\n\n- **エラー検索**: 自然言語でエラーを検索\n- **問題詳細の取得**: Issue ID から詳細情報とスタックトレースを取得\n- **Root Cause 分析**: Seer AI によるエラーの根本原因分析\n- **問題の更新**: Issue のステータス変更やアサイン\n\n#### 設定\n\n`.mcp.json` に以下の設定が含まれています：\n\n```json\n{\n  \"mcpServers\": {\n    \"Sentry\": {\n      \"type\": \"http\",\n      \"url\": \"https://mcp.sentry.dev/mcp\"\n    }\n  }\n}\n```\n\n#### 認証\n\n初回使用時に Sentry アカウントでの認証が必要です：\n\n```bash\n# Claude Code を起動\nclaude\n\n# MCP 接続状況を確認\n/mcp\n# → \"Authentication successful. Connected to Sentry.\" と表示されれば OK\n```\n\n#### 使用例\n\n```\n# 本日のエラーを検索\n「本日発生したエラーを表示して」\n\n# 特定の Issue の詳細を取得\n「TABI-NO-SHIORI-56 の詳細を教えて」\n\n# 根本原因の分析\n「この Issue の Root Cause 分析をして」\n```\n\n### Auth0\n\nAuth0 MCP サーバーを使用すると、Claude Code から Auth0 テナントの管理操作を直接実行できます。\n\n#### 機能\n\n- **アプリケーション管理**: アプリケーションの作成、一覧取得、設定変更\n- **アクション管理**: Auth0 Actions の作成、デプロイ、管理\n- **ログ確認**: 認証ログ、エラーログの参照\n- **テナント設定**: 各種設定の確認・変更\n\n#### 設定\n\n`.mcp.json` に以下の設定が含まれています：\n\n```json\n{\n  \"mcpServers\": {\n    \"auth0\": {\n      \"type\": \"stdio\",\n      \"command\": \"cmd\",\n      \"args\": [\"/c\", \"npx\", \"-y\", \"@auth0/auth0-mcp-server\", \"run\"],\n      \"env\": {\n        \"DEBUG\": \"auth0-mcp\"\n      }\n    }\n  }\n}\n```\n\n**注意**: 上記は Windows 環境用の設定です。macOS/Linux では `\"command\": \"npx\"` と `\"args\": [\"-y\", \"@auth0/auth0-mcp-server\", \"run\"]` の形式で設定してください。\n\n#### 認証\n\n初回使用時に Auth0 アカウントでの OAuth 2.0 デバイス認証が必要です：\n\n1. Claude Code を起動\n2. Auth0 関連の操作を実行すると、ブラウザが自動的に開く\n3. Auth0 アカウントにログインし、必要な権限を許可\n4. 認証情報はシステムのキーチェーンに安全に保存される\n\n```bash\n# MCP 接続状況を確認\n/mcp\n# → \"auth0: Connected\" と表示されれば OK\n```\n\n#### 使用例\n\n```\n# アプリケーション一覧を取得\n「Auth0 のアプリケーション一覧を表示して」\n\n# 新しいアプリケーションを作成\n「新しい SPA アプリケーションを作成して」\n\n# 最近のログを確認\n「Auth0 の最近の認証ログを表示して」\n\n# アクションの作成とデプロイ\n「ログイン後にユーザーロールを追加する Auth0 Action を作成してデプロイして」\n```\n\n#### 参考リンク\n\n- [Auth0 MCP Server - Getting Started](https://auth0.com/docs/get-started/auth0-mcp-server/getting-started-with-auth0-mcp-server)\n- [GitHub - auth0/auth0-mcp-server](https://github.com/auth0/auth0-mcp-server)\n\n### Context7\n\nContext7 は AI アシスタント向けのコンテキスト管理サービスです。Claude Code との統合により、プロジェクトの履歴管理や高度なコンテキスト検索機能を提供します。\n\nこのプロジェクトでは、使用している技術スタック（Next.js 14、React 19、Tailwind CSS、Jotai、MongoDB、Auth0 など）の最新ドキュメントを参照できるよう、プロジェクト固有の Context7 設定を行っています。\n\n#### プロジェクト固有の設定\n\n1. **環境変数の設定**\n\n   ```bash\n   # .env.mcp.exampleを.env.mcpにコピー\n   cp .env.mcp.example .env.mcp\n\n   # 実際のAPIキーを設定\n   # CONTEXT7_API_KEY=your-actual-api-key\n   ```\n\n2. **MCP 設定ファイル**\n   `.mcp.json`にプロジェクト専用の Context7 設定が含まれています：\n\n   ```json\n   {\n     \"mcpServers\": {\n       \"context7-project\": {\n         \"type\": \"http\",\n         \"url\": \"https://mcp.context7.com/mcp\",\n         \"headers\": {\n           \"CONTEXT7_API_KEY\": \"${CONTEXT7_API_KEY}\",\n           \"X-Project-Context\": \"travel-itinerary-nextjs\"\n         }\n       }\n     }\n   }\n   ```\n\n3. **接続確認**\n\n   ```bash\n   # MCPサーバー一覧を確認\n   claude mcp list\n   ```\n\n   正常に接続されている場合：\n\n   ```\n   mongodb-readonly: npx -y @mongodb-js/mongodb-mcp-server - ✓ Connected\n   context7-project: https://mcp.context7.com/mcp (HTTP) - ✓ Connected\n   ```\n\n#### 対応技術スタック\n\nContext7 から最新ドキュメントを取得可能な技術：\n\n- Next.js 14 (App Router、Server Components)\n- React 19 (最新 Hooks、パフォーマンス改善)\n- Tailwind CSS 4.x (新機能、ユーティリティ)\n- Jotai (状態管理パターン)\n- MongoDB \u0026 Mongoose (ベストプラクティス)\n- Auth0 (認証実装パターン)\n- React Hook Form \u0026 Zod (フォーム設計)\n- TypeScript (型定義、エラーハンドリング)\n\n## 参考リンク\n\n- [MongoDB MCP Server 公式ドキュメント](https://www.mongodb.com/docs/mcp-server/)\n- [Sentry MCP Server](https://docs.sentry.io/product/sentry-mcp/) - Sentry エラー監視との連携\n- [Auth0 MCP Server](https://auth0.com/docs/get-started/auth0-mcp-server/getting-started-with-auth0-mcp-server) - Auth0 テナント管理との連携\n- [Claude Code MCP ガイド](https://docs.anthropic.com/ja/docs/claude-code/mcp)\n- [Model Context Protocol](https://modelcontextprotocol.io/)\n- [Context7](https://context7.com/) - AI コンテキスト管理サービス\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpitang1965%2Ftns-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpitang1965%2Ftns-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpitang1965%2Ftns-web/lists"}