Prophet MCP Server
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 structured, two-part format optimized for Large Language Models:
content[0]โ Text Summary: Plain-English analysis with trend direction (e.g., "UPWARD +26.1%"), statistical breakdowns, growth model details, and a full forecast data table.content[1]โ Chart.js Config: A proper JSON payload (chartjs_config:{...}) ready for visualization โ no regex parsing needed.
5. Premium Interactive Visualization
Every response includes a Chart.js configuration with:
๐ฃ Indigo gradient confidence band (shaded between upper/lower bounds)
๐ต Solid blue fitted line for historical model fit
๐ต Dashed blue forecast line with diamond markers for future predictions
๐ด Coral actuals with white-bordered circle markers
๐ Vertical "Forecast โ" annotation marking where predictions begin
๐ด Red/๐ orange dashed cap/floor lines for logistic growth
๐ Premium dark theme with glassmorphism styling
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 historical data (dates + values) via MCP โ
โ 2. User selects growth model (linear or logistic) โ
โ 3. Prophet model learns patterns and generates forecast โ
โ 4. Response contains two content items: โ
โ โโโ content[0]: Human-readable summary + data table โ
โ โโโ content[1]: Chart.js JSON config for visualization โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ๐ Response Format
The MCP tools/call response returns two content items:
content[0] โ Text Summary
### Prophet Forecast Data ###
Growth model used: LOGISTIC (cap=120, floor=30)
Summary of forecast metrics:
- Historical Period: 2025-02-01 to 2025-03-02
- Trend Direction: UPWARD (+26.1% vs historical mean)
Date | yhat | yhat_lower | yhat_upper
-------------------------------------
2025-03-03 | 79.56 | 76.93 | 81.98
...content[1] โ Chart.js JSON
chartjs_config:{"type":"line","data":{"labels":[...],"datasets":[...]},"options":{...}}This is valid JSON prefixed with chartjs_config: โ parse it as:
cfg_json = content[1]["text"][len("chartjs_config:"):]
config = json.loads(cfg_json)๐ ๏ธ Tool: forecast_time_series
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 # Basic forecast test with Chart.js visualization
โโโ test_gcp_marketing.py # Real-world marketing scenario (30-day conversions)๐ฆ 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:
# Set your token (required)
export MCP_TOKEN="your-secure-token-here"๐โโ๏ธ Running the Server
Local Development
MCP_TOKEN="your-token" 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 |
| (required) | 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 <your-token>" \
-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
Basic Test
MCP_TOKEN="your-token" python examples/plot_forecast.pyMarketing Forecast Test (30-day real-world scenario)
MCP_TOKEN="your-token" python examples/test_gcp_marketing.pyBoth scripts will:
Call your MCP server's API
Extract the Chart.js config from
content[1]Generate an interactive HTML chart with premium dark theme
Open it in your default browser
โ๏ธ Cloud Deployment
For deploying to Google Cloud Run (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 variable (no defaults โ must be explicitly set)Debug mode disabled by default (enable via
MCP_DEBUG=true)JSON-RPC error handling with proper error codes
Input validation on all tool parameters
No sensitive data stored in source code
๐ 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.
Appeared in Searches
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ipradeep99/Prophet_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server