mcp-goodpass-api
Enables AI assistants to interact with the GoodPass API for searching products, retrieving details, checking availability, pricing, and managing orders.
README
MCP GoodPass API Server
A Model Context Protocol (MCP) server that provides access to the GoodPass API, allowing AI assistants to search for products, retrieve product details, check availability, get pricing, and manage orders.
Overview
This MCP server exposes the GoodPass API through a standardized interface, enabling AI assistants like Claude Desktop to interact with GoodPass services. The server provides tools for:
- Searching products with filters
- Retrieving product details
- Checking available dates
- Getting pricing information
- Creating temporary orders
- Retrieving order forms
Prerequisites
- Python 3.12 or higher
uvpackage manager (recommended) orpip- A GoodPass API key
Installation
Using uv (Recommended)
-
Clone or navigate to this repository:
cd mcp-goodpass-api -
Install dependencies using
uv:uv sync
Using pip
-
Install dependencies:
pip install -e .Or install directly:
pip install httpx mcp[cli] python-dotenv requests
Configuration
Environment Variables
Create a .env file in the project root directory with the following variables:
GOODPASS_API_KEY=your_api_key_here
GOODPASS_BASE_URL=https://partner-api.goodpass.club/v1
Required:
GOODPASS_API_KEY: Your GoodPass API key (required)
Optional:
GOODPASS_BASE_URL: The base URL for the GoodPass API (defaults tohttps://partner-api.goodpass.club/v1)
Creating the .env file
-
Create a
.envfile in the project root:touch .env -
Add your configuration:
echo "GOODPASS_API_KEY=your_actual_api_key" >> .env echo "GOODPASS_BASE_URL=https://partner-api.goodpass.club/v1" >> .env
Running the Server
Direct Execution
Run the server directly:
python goodpass_server.py
Or using uv:
uv run goodpass_server.py
The server runs over stdio (standard input/output), which is the standard transport for MCP servers.
Testing with MCP Inspector
You can test the server using the MCP Inspector. Open MCP Inspector.html in your browser to interact with the server.
Configuring in Claude Desktop
To use this MCP server with Claude Desktop:
-
Locate Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
Edit the configuration file and add the MCP server:
{ "mcpServers": { "mcp-goodpass-api": { "command": "python", "args": [ "/absolute/path/to/mcp-goodpass-api/goodpass_server.py" ], "env": { "GOODPASS_API_KEY": "your_api_key_here", "GOODPASS_BASE_URL": "https://partner-api.goodpass.club/v1" } } } }Note: Replace
/absolute/path/to/mcp-goodpass-api/goodpass_server.pywith the actual absolute path to yourgoodpass_server.pyfile. -
Alternative using
uv: If you're usinguv, you can configure it like this:{ "mcpServers": { "mcp-goodpass-api": { "command": "uv", "args": [ "run", "/absolute/path/to/mcp-goodpass-api/goodpass_server.py" ], "env": { "GOODPASS_API_KEY": "your_api_key_here" } } } } -
Restart Claude Desktop for the changes to take effect.
Available Tools
The MCP server provides the following tools:
find_products
Search products with filters.
Parameters:
page(int, default: 1): Page numberlimit(int, default: 10): Results per pagecategories(List[str], optional): Filter by categoriesthemes(List[str], optional): Filter by themesdestination(str, optional): Filter by destinationsearch(str, optional): Search queryminPrice(float, optional): Minimum price filtermaxPrice(float, optional): Maximum price filterproductType(str, optional): Filter by product typecurrency(str, optional): Currency code
retrieve_product
Retrieve a single product by ID.
Parameters:
id(str, required): Product ID
get_available_dates
List available dates for a product.
Parameters:
id(str, required): Product ID
get_prices_for_date
Get pricing for a product on a specific date.
Parameters:
id(str, required): Product IDdate(str, required): Date in YYYY-MM-DD format
create_temp_order
Create a temporary order.
Parameters:
productId(str, required): Product IDdate(str, required): Date in YYYY-MM-DD formatticketSelections(Dict[str, int], required): Ticket selections mappingusercode(str, required): User code
get_order_forms
Retrieve required form fields for an order.
Parameters:
orderId(str, required): Order ID
Troubleshooting
Server won't start
-
Check Python version:
python --versionEnsure you have Python 3.12 or higher.
-
Verify API key: Make sure
GOODPASS_API_KEYis set in your.envfile or environment variables. -
Check dependencies:
pip list | grep -E "httpx|mcp|dotenv"Or with
uv:uv pip list
Claude Desktop can't connect
-
Verify the path: Ensure the absolute path in
claude_desktop_config.jsonis correct. -
Check permissions: Make sure the script is executable:
chmod +x goodpass_server.py -
Test manually: Run the server directly to check for errors:
python goodpass_server.py -
Check logs: Claude Desktop logs may contain error messages. Check the console or log files.
API errors
- Verify your API key is valid and has the necessary permissions
- Check the
GOODPASS_BASE_URLis correct - Ensure your network connection is working
- Review the API response for specific error messages
Development
Project Structure
mcp-goodpass-api/
├── goodpass_server.py # Main MCP server implementation
├── main.py # Entry point (optional)
├── pyproject.toml # Project dependencies
├── README.md # This file
└── .env # Environment variables (create this)
Adding New Tools
To add new tools to the MCP server:
- Add a new function decorated with
@mcp.tool()ingoodpass_server.py - Use the
_get()or_post()helper functions for API calls - Document the function with a docstring
- Restart the server to load the new tool
License
[Add your license information here]
Support
For issues related to:
- MCP Server: Open an issue in this repository
- GoodPass API: Contact GoodPass support
- Claude Desktop: Check Claude Desktop documentation
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。