@modelcontextprotocol/server-scenario-modeler 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # Example: SaaS Scenario Modeler
2
+
3
+ A React-based demo MCP App that lets users adjust SaaS business parameters and see real-time 12-month projections of revenue, costs, and profitability with comparison against pre-built scenario templates.
4
+
5
+ <table>
6
+ <tr>
7
+ <td><a href="https://modelcontextprotocol.github.io/ext-apps/screenshots/scenario-modeler-server/01-compare-to.png"><img src="https://modelcontextprotocol.github.io/ext-apps/screenshots/scenario-modeler-server/01-compare-to.png" alt="Compare to" width="100%"></a></td>
8
+ <td><a href="https://modelcontextprotocol.github.io/ext-apps/screenshots/scenario-modeler-server/02-bootstrapped-growth.png"><img src="https://modelcontextprotocol.github.io/ext-apps/screenshots/scenario-modeler-server/02-bootstrapped-growth.png" alt="Bootstrapped growth" width="100%"></a></td>
9
+ <td><a href="https://modelcontextprotocol.github.io/ext-apps/screenshots/scenario-modeler-server/03-vc-rocketship.png"><img src="https://modelcontextprotocol.github.io/ext-apps/screenshots/scenario-modeler-server/03-vc-rocketship.png" alt="VC rocketship" width="100%"></a></td>
10
+ </tr>
11
+ </table>
12
+
13
+ ## Features
14
+
15
+ - **Interactive Parameters**: 5 sliders for Starting MRR, Growth Rate, Churn Rate, Gross Margin, and Fixed Costs
16
+ - **12-Month Projections**: Line chart showing MRR, Gross Profit, and Net Profit over time
17
+ - **Scenario Templates**: 5 pre-built business strategies (Bootstrapped, VC Rocketship, Cash Cow, Turnaround, Efficient Growth)
18
+ - **Template Comparison**: Overlay dashed lines to compare your scenario against any template
19
+ - **Summary Metrics**: Key metrics including Ending MRR, Total Revenue, Total Profit, and break-even month
20
+ - **Theme Support**: Adapts to light/dark mode preferences
21
+
22
+ ## Running
23
+
24
+ 1. Install dependencies:
25
+
26
+ ```bash
27
+ npm install
28
+ ```
29
+
30
+ 2. Build and start the server:
31
+
32
+ ```bash
33
+ npm run start:http # for Streamable HTTP transport
34
+ # OR
35
+ npm run start:stdio # for stdio transport
36
+ ```
37
+
38
+ 3. View using the [`basic-host`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-host) example or another MCP Apps-compatible host.
39
+
40
+ ## Architecture
41
+
42
+ ### Server (`server.ts`)
43
+
44
+ Exposes a single `get-scenario-data` tool that returns:
45
+
46
+ - 5 pre-built scenario templates with parameters, projections, and summaries
47
+ - Default input values for the sliders
48
+ - Optionally computes custom projections when `customInputs` are provided
49
+
50
+ The tool is linked to a UI resource via `_meta.ui.resourceUri`.
51
+
52
+ ### App (`src/`)
53
+
54
+ - Built with React for reactive slider updates and derived state management
55
+ - Uses Chart.js for the line chart visualization
56
+ - All projection calculations run client-side for instant slider feedback
57
+ - Components: `SliderRow`, `MetricCard`, `ProjectionChart`
58
+ - Template comparison shown as dashed overlay lines on the chart