Cox's Bazar AI Itinerary MCP Server
本番環境対応MCPボイラープレート
コックスバザールAI旅程MCPサーバー
バングラデシュのコックスバザール向けの旅行計画ツールと天気情報を提供するModel Context Protocol (MCP) サーバーです。FastMCPで構築され、uvで管理されています。
機能
天気リソース: 気温予報と詳細な天気情報
旅程ツール: AIを活用した旅行旅程の作成
旅行プロンプト: 旅行計画用の事前設定済みプロンプト
認証サポート: Clerkによるオプションの認証(環境変数で設定可能)
レート制限: 組み込みのレート制限ミドルウェア
Docker対応: 本番環境用Dockerfileを同梱
Linting & フォーマット: Ruff + pre-commitフック(
_docs/lint-formatting.mdを参照)
要件
Python 3.13以上
uv (パッケージマネージャー)
Node.js 20以上 (MCP Inspector用のみ)
はじめに
# Install dependencies
uv sync
# Copy environment variables and configure
cp .env.example .env
# (Optional) Install pre-commit git hooks
uv run pre-commit-installCLIコマンド
すべてのコマンドはpyproject.tomlに登録されており、uv run経由で利用可能です:
コマンド | 説明 |
| MCPサーバーを起動 |
| 開発モードでMCPサーバーを起動(自動リロード) |
| MCP Inspector UIを起動 (Node.js 20以上が必要) |
| すべてのファイルに対してpre-commitフックを実行 (lint + format) |
| gitリポジトリにpre-commitフックをインストール |
開発サーバー
watchdogを使用して自動リロード付きでMCPサーバーを起動します:
uv run mcp-server-dev
# or
./scripts/run-mcp-server.shMCP Inspector
対話型のMCP Inspector UIを起動して、ツール、リソース、プロンプトをテストします:
uv run mcp-inspector
# or
./scripts/run-inspector.shLinting & フォーマット
# Run lint + format via pre-commit
uv run lint
# Or run individually
./scripts/lint.sh # ruff check . --fix
./scripts/format.sh # ruff format .設定の詳細については_docs/lint-formatting.mdを参照してください。
テスト
./scripts/test.shテストの規約とフィクスチャについては_docs/testing.mdを参照してください。
Docker
docker build -t mcp-server .
docker run mcp-serverサーバーはコンテナ内でuv run mcp-serverを介して実行されます。トランスポートとポートは環境変数(TRANSPORT_NAME, SERVER_PORT, SERVER_HOST)を通じて設定可能です。
プロジェクト構造
.
├── src/mcp_server/
│ ├── server.py # Main server entry point
│ ├── mcp_instance.py # FastMCP instance & auth config
│ ├── cli.py # CLI command definitions
│ ├── config/
│ │ ├── auth_provider.py # Auth provider factory
│ │ └── custom_routes.py # Custom HTTP routes
│ ├── handlers/ # MCP handler registrations (auto-discovered)
│ │ ├── tools/
│ │ │ ├── auth_additional.py
│ │ │ └── itinerary.py
│ │ ├── resources/
│ │ │ └── weather.py
│ │ └── prompts/
│ │ └── travel_prompts.py
│ ├── models/
│ │ └── itinerary_models.py # Pydantic models & schemas
│ ├── services/
│ │ └── itenerary_service.py # Business logic
│ ├── lib/
│ │ ├── clerk_auth_provider.py # Clerk OAuth provider
│ │ └── httpx_client.py # Async HTTP client wrapper
│ ├── prompt_templates/
│ │ └── travel.py # Prompt text builders
│ └── utils/
│ ├── elicitation.py
│ ├── get_weather_forecast.py
│ ├── helpers.py
│ └── http.py
├── tests/
│ ├── conftest.py
│ ├── fixtures/
│ │ ├── context.py
│ │ └── weather.py
│ ├── unit/
│ │ ├── test_auth_additional_tools.py
│ │ ├── test_auth_provider.py
│ │ ├── test_elicitation.py
│ │ ├── test_helpers.py
│ │ ├── test_itinerary_service_extra.py
│ │ ├── test_itinerary_tool_handler.py
│ │ ├── test_models.py
│ │ ├── test_server.py
│ │ ├── test_travel_prompts.py
│ │ ├── test_travel_prompts_handler.py
│ │ ├── test_weather_forecast.py
│ │ └── test_weather_resource.py
│ └── integration/
│ ├── test_itinerary_tool.py
│ └── test_weather_api.py
├── scripts/
│ ├── run-mcp-server.sh # Dev server with auto-reload
│ ├── run-inspector.sh # MCP Inspector launcher
│ ├── test.sh # Test runner
│ ├── lint.sh # Ruff lint --fix
│ ├── format.sh # Ruff format
│ └── generate-secrets.sh # Secret key generator
├── _docs/ # Documentation & ADRs
│ ├── adr/
│ │ ├── 001-choose-fastmcp.md
│ │ ├── 002-choose-httpx.md
│ │ └── ADR-template.md
│ ├── auth-provider-auth0.md
│ ├── httpx-client.md
│ ├── lint-formatting.md
│ ├── remote-mcp-connect.md
│ └── testing.md
├── .env.example # Environment variables template
├── .pre-commit-config.yaml # Pre-commit hook config
├── Dockerfile # Production Docker image
├── pyproject.toml # Project config & dependencies
├── ruff.toml # Ruff linter/formatter config
├── pytest.ini # Pytest configuration
├── glama.json # Glama registry config
└── LICENSE # MIT Licenseドキュメント
ドキュメント | 説明 |
Ruff & pre-commitの設定 | |
テストのセットアップ、フィクスチャ、規約 | |
非同期HTTPクライアントの使用方法 | |
認証プロバイダーの統合 | |
リモートMCP接続ガイド | |
アーキテクチャ決定記録 |
ライセンス
MIT
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/code4mk/coxs-bazar-itinerary-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server