Tripadvisor Mcp サーバー
TripadvisorコンテンツAPIのためのモデルコンテキストプロトコル(MCP)サーバー。これにより、標準化されたMCPインターフェースを通じてTripadvisorのロケーションデータ、レビュー、写真にアクセスでき、AIアシスタントが旅行先や体験を検索できるようになります。
概要
Tripadvisor MCPとは何ですか?
Tripadvisor MCP(モデルコンテキストプロトコル)は、TripadvisorコンテンツAPIへのアクセスを提供するために設計されたサーバーです。この革新的なプラットフォームは、開発者やAIアシスタントが標準化されたMCPインターフェースを通じてTripadvisorから位置データ、レビュー、写真を取得できるようにします。Tripadvisor MCPを利用することで、ユーザーは旅行先や体験を効率的に検索でき、旅行関連アプリケーションにとって不可欠なツールとなります。
Tripadvisor MCPの特徴
- 豊富なコンテンツへのアクセス:ユーザーは、Tripadvisorからの位置データ、ユーザーレビュー、高品質の写真など、豊富な情報にアクセスできます。
- 標準化されたインターフェース:MCPインターフェースは、Tripadvisorデータとやり取りするための一貫した方法を提供し、開発者の統合プロセスを簡素化します。
- AI互換性:AIアシスタントを考慮して設計されたTripadvisor MCPは、さまざまなアプリケーションへのシームレスな統合を可能にし、旅行計画におけるユーザー体験を向上させます。
- 公開リポジトリ:このプロジェクトは公開されており、世界中の開発者とのコラボレーションや貢献を促進します。
Tripadvisor MCPの使い方
- 環境を設定する:TripadvisorコンテンツAPIとやり取りするために必要なツールとライブラリを用意します。
- APIにアクセスする:標準化されたMCPインターフェースを利用してTripadvisorデータに接続します。これには認証やAPIキーの設定が含まれる場合があります。
- データをクエリする:提供されたエンドポイントを使用して旅行先を検索し、レビューを取得し、写真にアクセスします。
- アプリケーションに統合する:取得したデータを旅行計画ツール、チャットボット、またはその他のAI駆動サービスに組み込みます。
よくある質問
Q: Tripadvisor MCPを通じてどのようなデータにアクセスできますか?
A: さまざまな旅行先に関連する位置データ、ユーザーレビュー、写真にアクセスできます。
Q: Tripadvisor MCPは無料で使用できますか?
A: はい、Tripadvisor MCPは公開リポジトリであり、開発者は無償で使用できます。
Q: Tripadvisor MCPプロジェクトに貢献できますか?
A: もちろんです!貢献は歓迎されており、他の開発者と協力してプロジェクトを強化できます。
Q: 問題を報告したり、機能をリクエストしたりするにはどうすればよいですか?
A: プロジェクトのGitHubリポジトリで問題を報告したり、新しい機能をリクエストしたりできます。
Q: Tripadvisor MCPのドキュメントはありますか?
A: はい、APIの使用方法やその機能について詳細に説明した包括的なドキュメントが通常リポジトリ内に提供されています。
詳細
Tripadvisor MCP Server
A Model Context Protocol (MCP) server for Tripadvisor Content API.
This provides access to Tripadvisor location data, reviews, and photos through standardized MCP interfaces, allowing AI assistants to search for travel destinations and experiences.
Features
-
Search for locations (hotels, restaurants, attractions) on Tripadvisor
-
Get detailed information about specific locations
-
Retrieve reviews and photos for locations
-
Search for nearby locations based on coordinates
-
API Key authentication
-
Docker containerization support
-
Provide interactive tools for AI assistants
The list of tools is configurable, so you can choose which tools you want to make available to the MCP client.
Usage
-
Get your Tripadvisor Content API key from the Tripadvisor Developer Portal.
-
Configure the environment variables for your Tripadvisor Content API, either through a
.env
file or system environment variables:
### Required: Tripadvisor Content API configuration
TRIPADVISOR_API_KEY=your_api_key_here
- Add the server configuration to your client configuration file. For example, for Claude Desktop:
{
"mcpServers": {
"tripadvisor": {
"command": "uv",
"args": [
"--directory",
"<full path to tripadvisor-mcp directory>",
"run",
"src/tripadvisor_mcp/main.py"
],
"env": {
"TRIPADVISOR_API_KEY": "your_api_key_here"
}
}
}
}
Note: if you see
Error: spawn uv ENOENT
in Claude Desktop, you may need to specify the full path touv
or set the environment variableNO_UV=1
in the configuration.
Docker Usage
This project includes Docker support for easy deployment and isolation.
Building the Docker Image
Build the Docker image using:
docker build -t tripadvisor-mcp-server .
Running with Docker
You can run the server using Docker in several ways:
Using docker run directly:
docker run -it --rm \
-e TRIPADVISOR_API_KEY=your_api_key_here \
tripadvisor-mcp-server
Using docker-compose:
Create a .env
file with your Tripadvisor API key and then run:
docker-compose up
Running with Docker in Claude Desktop
To use the containerized server with Claude Desktop, update the configuration to use Docker with the environment variables:
{
"mcpServers": {
"tripadvisor": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e", "TRIPADVISOR_API_KEY",
"tripadvisor-mcp-server"
],
"env": {
"TRIPADVISOR_API_KEY": "your_api_key_here"
}
}
}
}
This configuration passes the environment variables from Claude Desktop to the Docker container by using the -e
flag with just the variable name, and providing the actual values in the env
object.
Development
Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.
This project uses uv
to manage dependencies. Install uv
following the instructions for your platform:
curl -LsSf https://astral.sh/uv/install.sh | sh
You can then create a virtual environment and install the dependencies with:
uv venv
source .venv/bin/activate # On Unix/macOS
.venv\Scripts\activate # On Windows
uv pip install -e .
Project Structure
The project has been organized with a src
directory structure:
tripadvisor-mcp/
├── src/
│ └── tripadvisor_mcp/
│ ├── __init__.py # Package initialization
│ ├── server.py # MCP server implementation
│ ├── main.py # Main application logic
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose configuration
├── .dockerignore # Docker ignore file
├── pyproject.toml # Project configuration
└── README.md # This file
Testing
The project includes a test suite that ensures functionality and helps prevent regressions.
Run the tests with pytest:
### Install development dependencies
uv pip install -e ".[dev]"
### Run the tests
pytest
### Run with coverage report
pytest --cov=src --cov-report=term-missing
Tools
| Tool | Category | Description |
| | | |
| search_locations
| Search | Search for locations by query text, category, and other filters |
| search_nearby_locations
| Search | Find locations near specific coordinates |
| get_location_details
| Retrieval | Get detailed information about a location |
| get_location_reviews
| Retrieval | Retrieve reviews for a location |
| get_location_photos
| Retrieval | Get photos for a location |
License
MIT
サーバー設定
{
"mcpServers": {
"tripadvisor-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--pab1it0--tripadvisor-mcp--tripadvisor-mcp",
"tripadvisor-mcp"
],
"env": {
"TRIPADVISOR_API_KEY": "tripadvisor-api-key"
}
}
}
}