pipaber/price_mcp
If you are the rightful owner of price_mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Airbnb Price Predictor MCP Server is designed to forecast the nightly price of Airbnb listings using a trained scikit-learn pipeline.
Airbnb Price Predictor MCP Server
Overview
price_mcp.py exposes a Model Context Protocol (MCP) server that wraps a
scikit-learn pipeline trained to forecast the nightly price of Airbnb listings.
The predict_airbnb_price tool accepts the same 13 features used during
training and returns a currency-rounded prediction. A companion prompt,
price_prediction_prompt, helps clients craft consistent tool invocations.
Features
- MCP tool
predict_airbnb_pricethat validates input via Pydantic and returns structured output. - Compatibility layer for legacy
scikit-learnpickles (handles_RemainderColsListand missing installs). - Prompt
price_prediction_promptthat renders a ready-to-send user message with JSON payload. - Structured responses (
PricePrediction) for downstream automation. - Shared SVG icon (
price_icon.svg) applied to the server and tool for richer MCP client UIs.
Requirements
-
Python 3.11+
-
Dependencies:
pip install fastmcp pandas joblib scikit-learn==1.6.1Use the training version of
scikit-learnto avoid unpickling warnings.
Getting Started
-
Ensure
model_airbnb_price.pklsits next toprice_mcp.py. -
Install the dependencies inside a virtual environment.
-
Run the server locally:
python price_mcp.py -
Connect your MCP-compatible client to the process (
transport="stdio"by default).
Tools & Prompts
| Name | Type | Description |
|---|---|---|
predict_airbnb_price | Tool | Predicts the nightly price using the trained pipeline. |
price_prediction_prompt | Prompt | Generates a user message guiding the tool invocation. |
The prompt validates arguments with the same schema as the tool, so MCP clients know exactly how to format feature payloads.
Development Notes
- Reloading the server after installing a missing dependency or updating the model is enough; the loader retries on demand.
- Add unit tests or smoke scripts to
tests/(not included) if you want regression coverage. - Keep the README up to date when the tool schema or prompt contract changes.