焼津市スマートシティ MCP サーバー
焼津市のオープンデータを活用したModel Context Protocol (MCP) サーバー。Claude Desktop および Claude Code から焼津市スマートシティAPIへのアクセスを提供します。
特徴
提供ツール
- search_api_docs: API仕様検索機能 - 47種類のAPI仕様書から検索
- get_api_details: API詳細情報取得
- generate_api_command: APIコマンド自動生成
- execute_yaizu_api: 焼津市API実行
- get_yaizu_api_catalog: APIカタログ取得
- get_yaizu_city_data: 焼津市基本データ取得
- search_yaizu_facilities: 施設検索
- login_yaizu_api_portal: APIポータルログイン
提供リソース
- yaizu://info: 焼津市情報
- yaizu://status: MCPサーバー状態
- yaizu://catalog-summary: APIカタログサマリー
- yaizu://catalog-detailed: APIカタログ詳細
インストール
必要要件
- Python 3.13.7 以上
- uv 0.8.13 以上
セットアップ
Claude Desktop 設定
- Claude Desktop の設定ファイルを開く:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
- 以下の設定を追加:
- パスを実際の環境に合わせて修正
使用方法
開発・デバッグ
Claude Desktop での使用
Claude Desktop を起動後、以下のようなコマンドが使用可能:
プロジェクト構成
API 仕様
焼津市API
- 基本URL:
https://api.smartcity-yaizu.jp/v2/entities
- 認証: APIキー(
apikey
ヘッダー) - 形式: FIWARE NGSIv2
対応エンティティ(一部)
- 防災情報: Aed, EvacuationShelter, DisasterMail
- 観光情報: Event, TouristAttraction, SightseeingMapStore
- 環境情報: PrecipitationGauge, WaterLevelGauge
- 公共施設: PublicFacility, HospitalAndClinic
技術スタック
- フレームワーク: FastMCP (MCP Python SDK)
- 非同期処理: asyncio
- HTTPクライアント: aiohttp, httpx
- PDF処理: PyMuPDF, PyPDF2
- 環境管理: python-dotenv
- パッケージ管理: uv
トラブルシューティング
エラー: "No API key found"
→ .env
ファイルにYAIZU_API_KEY
を設定してください
エラー: "Server disconnected"
→ Claude Desktop設定のパスを確認してください
エラー: "Module not found"
→ uv sync
で依存関係をインストールしてください
ライセンス
MIT License
貢献
Issues や Pull Request を歓迎します。
関連情報
サポート
問題が発生した場合は、Issuesで報告してください。
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables access to Yaizu City's open data and smart city APIs through Claude Desktop. Provides tools for searching facilities, retrieving city data, accessing disaster information, tourism data, and other municipal services.