Generates ready-to-render Chart.js configurations for visualizing time-series forecasts, featuring historical data points, predicted trends, and confidence intervals.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Prophet MCP ServerForecast the next 7 days of sales based on this historical data."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Prophet MCP Server
An open-source Model Context Protocol (MCP) server engineered for Time-Series Forecasting.
Powered by Meta's Prophet, this server enables LLMs to generate accurate forecasts, trend analyses, and confidence intervals from historical data โ turning raw numbers into actionable insights within AI workflows.
Note: This project is a specialized fork of the sendgrid-mcp server, re-engineered to provide robust forecasting capabilities via the MCP protocol.
๐ Key Capabilities
1. Predictive Modeling
Leverages Meta's Prophet to predict future trends based on historical data. Handles seasonality, outliers, and trend changes automatically.
2. Growth Model Selection
Choose the right forecasting model for your scenario:
Linear (default): Unbounded straight-line trend โ ideal for metrics with no natural ceiling.
Logistic (S-curve): Saturating growth that respects a
cap(max) and optionalfloor(min) โ ideal for metrics like market share, adoption rates, or capacity-limited systems.
3. Multi-Frequency Forecasting
Supports daily, hourly, weekly, and monthly time series via the freq parameter โ use the frequency that matches your input data.
4. LLM-Friendly Output
Returns data in a format optimized for Large Language Models:
Plain-English Summaries: Instant context on trends (e.g., "Trending UPWARD by +51.7%").
Statistical Breakdowns: Historical vs. Forecasted means, min/max, standard deviations.
Chart.js Config: Ready-to-render visualization config for web deployment.
5. Interactive Visualization
Includes Chart.js configuration in every response with:
Red dots for actual historical data
Dashed blue line for forecast predictions
Shaded confidence interval band
Red/orange dashed lines for cap/floor (in logistic mode)
6. Robust Error Handling
Input validation with clear error messages for:
Empty or mismatched data arrays
Invalid growth model values
Missing
capfor logistic growthInvalid
floor >= capcombinations
๐ How It Works
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 1. LLM sends your historical data (dates + values) โ
โ 2. User selects growth model (linear or logistic) โ
โ 3. Prophet model learns the pattern and generates forecast โ
โ 4. Response includes: โ
โ โโโ Human-readable summary with trend analysis โ
โ โโโ Growth model info (cap/floor for logistic) โ
โ โโโ Forecast data table โ
โ โโโ Chart.js config for instant visualization โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ๐ Real-World Example
You tracked daily website conversions over 10 days and want to forecast the next 5 days. You know conversions can never exceed 25 (team capacity) or drop below 5 (baseline organic traffic), so you use logistic growth:
Input
{
"ds": ["2025-01-01", "2025-01-02", "2025-01-03", "2025-01-04", "2025-01-05",
"2025-01-06", "2025-01-07", "2025-01-08", "2025-01-09", "2025-01-10"],
"y": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19],
"periods": 5,
"growth": "logistic",
"cap": 25,
"floor": 5
}Output
### Prophet Forecast Data ###
Growth model used: LOGISTIC (cap=25, floor=5)
Summary of forecast metrics:
- Historical Period: 2025-01-01 to 2025-01-10
- Forecast Periods: 5
- Trend Direction: UPWARD (+51.7% vs historical mean)
Growth Model: LOGISTIC
- Saturating Maximum (cap): 25
- Saturating Minimum (floor): 5
- The forecast follows an S-curve that naturally flattens as it approaches the cap/floor.
Date | yhat | yhat_lower | yhat_upper
-------------------------------------
2025-01-11 | 20.00 | 19.50 | 20.50
...
2025-01-15 | 23.80 | 22.90 | 24.70
chartjs = { ... }The logistic model ensures the forecast naturally saturates near 25 instead of growing unbounded โ because Prophet's math respects the cap.
๐ ๏ธ Tool: forecast_time_series
Description
Ingests time-series data and returns a future forecast using either linear or logistic growth, with a detailed text summary and Chart.js visualization config.
Input Parameters
Parameter | Type | Required | Default | Description |
|
| โ Yes | โ | List of dates in ISO format (YYYY-MM-DD) |
|
| โ Yes | โ | List of numeric values aligned with |
|
| No |
| Number of future periods to forecast |
|
| No |
| Growth model: |
|
| When logistic | โ | Saturating maximum (forecast won't exceed this) |
|
| No | โ | Saturating minimum (forecast won't go below this) |
|
| No |
| Time series frequency: |
When to Use Each Growth Model
Scenario | Growth | Why |
Revenue, temperature, stock prices |
| No natural ceiling or floor |
Market share, adoption rate |
| Saturates at 100% |
Server capacity, team bandwidth |
| Physical limits exist |
Website conversion rate |
| Bounded between 0โ100% |
Output Columns
Column | Meaning |
| Date for the observed or predicted value |
| Predicted value (model's best estimate) |
| Lower bound of confidence interval |
| Upper bound of confidence interval |
๐ Project Structure
Prophet_mcp/
โโโ app.py # Flask server โ MCP endpoint, auth, JSON-RPC routing
โโโ mcp_helper.py # Core engine โ Prophet forecasting, summary, Chart.js config
โโโ requirements.txt # Python dependencies
โโโ Procfile # Cloud deployment (gunicorn)
โโโ README.md # This file
โโโ .gitignore # Git exclusions
โโโ examples/ # Local testing utilities (not required for deployment)
โโโ plot_forecast.py # Script to call API and generate a local HTML chart
โโโ forecast_chart.html # Auto-generated preview (gitignored)๐ฆ Installation & Setup
Prerequisites
Anaconda or Miniconda (recommended for Prophet dependencies)
Python 3.11+
1. Environment Setup
# Create environment
conda create -n prophet-mcp python=3.11
conda activate prophet-mcp
# Install dependencies
pip install -r requirements.txtWindows Users: Prophet requires
CmdStan. If you encounter issues, refer to the Prophet Installation Guide or install via conda:conda install -c conda-forge prophet.
2. Configuration
The server uses Bearer Token authentication. Set the MCP_TOKEN environment variable, or it defaults to the value in app.py:
# Set your token (recommended for production)
export MCP_TOKEN="your-secure-token-here"๐โโ๏ธ Running the Server
Local Development
python app.pyProduction (Cloud)
gunicorn app:appServer URL:
http://localhost:3000MCP Endpoint:
POST http://localhost:3000/mcpHealth Check:
GET /health
Environment Variables
Variable | Default | Description |
|
| Bearer token for authentication |
|
| Server port |
|
| Enable Flask debug mode |
Authentication
All /mcp requests must include the header:
Authorization: Bearer <your-token>Example API Call (cURL)
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer Pradeep123" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "forecast_time_series",
"arguments": {
"ds": ["2025-01-01","2025-01-02","2025-01-03","2025-01-04","2025-01-05",
"2025-01-06","2025-01-07","2025-01-08","2025-01-09","2025-01-10"],
"y": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19],
"periods": 5,
"growth": "logistic",
"cap": 25,
"floor": 5
}
},
"id": 1
}'๐งช Testing & Visualization
Local Testing Script
python examples/plot_forecast.pyThis script will:
Call your MCP server's API
Extract the Chart.js config from the response
Generate
forecast_chart.htmlwith an interactive chartOpen it in your default browser
The generated chart features a dark glassmorphism theme with:
๐ด Red dots โ Historical actuals
๐ต Dashed blue line โ Forecast predictions
๐ฆ Shaded blue band โ Confidence interval
๐ด Red dashed line โ Cap (logistic mode)
๐ Orange dashed line โ Floor (logistic mode)
โ๏ธ Cloud Deployment
For deploying to Google Cloud (or any cloud provider), you need:
app.py
mcp_helper.py
requirements.txt
ProcfileThe examples/ folder is for local testing only and is not required in production.
The server binds to 0.0.0.0 and reads the PORT environment variable automatically for cloud compatibility.
๐ Security
Bearer Token authentication on all
/mcpendpointsToken configurable via
MCP_TOKENenvironment variableDebug mode disabled by default (enable via
MCP_DEBUG=true)JSON-RPC error handling with proper error codes
Input validation on all tool parameters
๐ Dependencies
Package | Purpose |
| Web server framework |
| Data manipulation |
| Time-series forecasting engine |
| Production WSGI server |
| HTTP client (examples only) |
๐ License
MIT License
๐ฅ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Author: Pradeep Chandra Kalahasthi
Original Base: sendgrid-mcp
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.