breakscale-mcp 0.1.0
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/LICENSE +21 -0
- package/README.md +189 -0
- package/dist/index.js +68839 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Breakscale contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Breakscale MCP server
|
|
2
|
+
|
|
3
|
+
This lets an AI assistant work with Breakscale for you. Ask it to draw a rate limiter, or to read your code and turn the architecture into a design, and it builds the design, runs it through the same simulation engine as breakscale.tech, and comes back with real numbers: where the latency goes, what saturates first, what fails and why. It also gives you a breakscale.tech link that opens the design straight in your browser.
|
|
4
|
+
|
|
5
|
+
In assistants that support [MCP Apps](https://modelcontextprotocol.io/docs/extensions/apps) the design also opens as a live Breakscale canvas right in the chat. You can press play, drag the traffic up, move things around, and whatever you change goes back to the assistant, so its next edit starts from what you are looking at.
|
|
6
|
+
|
|
7
|
+
| Tool | What it does |
|
|
8
|
+
| --------------- | -------------------------------------------------------------------------------------------- |
|
|
9
|
+
| `read_me` | The design format, every component and setting, and how real code maps onto components |
|
|
10
|
+
| `create_view` | Validates a design, simulates 30 seconds of it, and shows it on the canvas |
|
|
11
|
+
| `export_design` | Returns the design as a `.breakscale` file, which the app and the VS Code extension can open |
|
|
12
|
+
| `open_design` | Reads a breakscale.tech share link back into a design, so you can ask for changes to it |
|
|
13
|
+
|
|
14
|
+
## Connect your assistant
|
|
15
|
+
|
|
16
|
+
All you need is [Node](https://nodejs.org) 20 or newer. Every assistant starts the server the same way, and there is nothing to clone or build:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
npx -y breakscale-mcp --stdio
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Which assistants draw the canvas in the chat, according to the [MCP client matrix](https://modelcontextprotocol.io/extensions/client-matrix):
|
|
23
|
+
|
|
24
|
+
| Canvas in the chat | Numbers and a link only |
|
|
25
|
+
| --------------------------------------------------- | ----------------------------------------------------- |
|
|
26
|
+
| VS Code with Copilot, Cursor, Claude Desktop, Goose | Claude Code, Codex, Gemini CLI, Windsurf / Devin, Zed |
|
|
27
|
+
|
|
28
|
+
### Claude Code
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
claude mcp add --scope user breakscale -- npx -y breakscale-mcp --stdio
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`--scope user` makes it available in every project, which is what you want for "read my code and turn it into a design". Without it the server is only added for the folder you ran the command in. Run `/mcp` inside Claude Code to check it connected, and `claude mcp remove breakscale --scope user` to take it out again.
|
|
35
|
+
|
|
36
|
+
To share it with everyone working in one repo instead, put this in `.mcp.json` at the repo root:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"mcpServers": {
|
|
41
|
+
"breakscale": {
|
|
42
|
+
"command": "npx",
|
|
43
|
+
"args": ["-y", "breakscale-mcp", "--stdio"]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### VS Code with GitHub Copilot
|
|
50
|
+
|
|
51
|
+
From a terminal:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
code --add-mcp '{"name":"breakscale","type":"stdio","command":"npx","args":["-y","breakscale-mcp","--stdio"]}'
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Or run **MCP: Add Server** from the command palette, choose a command (stdio) server, enter `npx -y breakscale-mcp --stdio`, and pick Global to have it everywhere. For one workspace only, put this in `.vscode/mcp.json` (the key is `servers`, not `mcpServers`):
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"servers": {
|
|
62
|
+
"breakscale": {
|
|
63
|
+
"type": "stdio",
|
|
64
|
+
"command": "npx",
|
|
65
|
+
"args": ["-y", "breakscale-mcp", "--stdio"]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Then ask in Copilot Chat in agent mode. The canvas appears inline when the setting `chat.mcp.apps.enabled` is on.
|
|
72
|
+
|
|
73
|
+
### Cursor
|
|
74
|
+
|
|
75
|
+
Put this in `~/.cursor/mcp.json` for every project, or `.cursor/mcp.json` for one:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"mcpServers": {
|
|
80
|
+
"breakscale": {
|
|
81
|
+
"type": "stdio",
|
|
82
|
+
"command": "npx",
|
|
83
|
+
"args": ["-y", "breakscale-mcp", "--stdio"]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Claude Desktop
|
|
90
|
+
|
|
91
|
+
Open **Settings > Developer > Edit Config**, add the server, and restart the app completely:
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"mcpServers": {
|
|
96
|
+
"breakscale": {
|
|
97
|
+
"command": "npx",
|
|
98
|
+
"args": ["-y", "breakscale-mcp", "--stdio"]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Codex CLI
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
codex mcp add breakscale -- npx -y breakscale-mcp --stdio
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
or in `~/.codex/config.toml`:
|
|
111
|
+
|
|
112
|
+
```toml
|
|
113
|
+
[mcp_servers.breakscale]
|
|
114
|
+
command = "npx"
|
|
115
|
+
args = ["-y", "breakscale-mcp", "--stdio"]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Gemini CLI
|
|
119
|
+
|
|
120
|
+
In `~/.gemini/settings.json`, or `.gemini/settings.json` for one project:
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"mcpServers": {
|
|
125
|
+
"breakscale": {
|
|
126
|
+
"command": "npx",
|
|
127
|
+
"args": ["-y", "breakscale-mcp", "--stdio"]
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Windsurf / Devin Desktop
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
devin mcp add -s user breakscale -- npx -y breakscale-mcp --stdio
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Or open the MCP config file from the Cascade panel's menu and add the same `mcpServers` block as Claude Desktop's.
|
|
140
|
+
|
|
141
|
+
### Goose
|
|
142
|
+
|
|
143
|
+
Extensions > Add custom extension, type Standard IO, command `npx -y breakscale-mcp --stdio`. In the CLI, `goose configure` > Add Extension > Command-line Extension.
|
|
144
|
+
|
|
145
|
+
### Zed
|
|
146
|
+
|
|
147
|
+
In `settings.json`, or Settings > AI > MCP Servers > Add Local Server:
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"context_servers": {
|
|
152
|
+
"breakscale": {
|
|
153
|
+
"command": "npx",
|
|
154
|
+
"args": ["-y", "breakscale-mcp", "--stdio"],
|
|
155
|
+
"env": {}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Anything else
|
|
162
|
+
|
|
163
|
+
Anything that speaks MCP can run `npx -y breakscale-mcp --stdio`. Without `--stdio` it serves Streamable HTTP at `http://localhost:3001/mcp` instead: `PORT` changes the port, `HOST` the address it binds to, and `ALLOWED_HOSTS` adds hostnames it will answer to besides localhost.
|
|
164
|
+
|
|
165
|
+
## Things to try
|
|
166
|
+
|
|
167
|
+
- "Make a rate limiter diagram in Breakscale."
|
|
168
|
+
- "Read this repo and turn its architecture into a Breakscale design. Tell me which numbers you had to guess."
|
|
169
|
+
- "Double the traffic. What breaks first?" and then "Fix it without adding more servers."
|
|
170
|
+
- Paste a breakscale.tech share link and ask for a change to it.
|
|
171
|
+
- "Save it as a .breakscale file."
|
|
172
|
+
|
|
173
|
+
To open a saved `.breakscale` file, use **Settings > Open a file** on breakscale.tech, or in the VS Code extension after running **Open Breakscale**. Opening the file directly in an editor shows its JSON; the extension does not claim the file type.
|
|
174
|
+
|
|
175
|
+
## Working on it
|
|
176
|
+
|
|
177
|
+
You need [Bun](https://bun.sh) to build it from this repo:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
cd mcp
|
|
181
|
+
bun install
|
|
182
|
+
bun run build
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
That produces `dist/index.js`, one file with the canvas and the engine inside it. Point an assistant at it with `node /path/to/breakscale/mcp/dist/index.js --stdio` in place of the `npx` command to try your changes.
|
|
186
|
+
|
|
187
|
+
The server imports the engine and the app straight from `../src`, so there is no second copy of anything. `widget/` is the canvas a chat host draws: the whole app, seeded with the design through the same storage shim idea the VS Code panel uses. `bun run typecheck` checks this package, and its tests live in `src/` and run with the rest of the suite from the repo root.
|
|
188
|
+
|
|
189
|
+
To try the canvas without an assistant, the MCP Apps repo has a small test host: build `examples/basic-host` from [modelcontextprotocol/ext-apps](https://github.com/modelcontextprotocol/ext-apps), start this server with `node dist/index.js`, and run the host with `SERVERS='["http://localhost:3001/mcp"]'`.
|