@bridge-ds/mcp 0.9.0 → 0.11.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 ADDED
@@ -0,0 +1,110 @@
1
+ # Functional Source License, Version 1.1, MIT Future License
2
+
3
+ ## Abbreviation
4
+
5
+ FSL-1.1-MIT
6
+
7
+ ## Notice
8
+
9
+ Copyright 2026 Florian Gouloubi
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the MIT license that is effective on the second anniversary of the date we make
91
+ the Software available. On or after that date, you may use the Software under
92
+ the MIT license, in which case the following will apply:
93
+
94
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
95
+ this software and associated documentation files (the "Software"), to deal in
96
+ the Software without restriction, including without limitation the rights to
97
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
98
+ of the Software, and to permit persons to whom the Software is furnished to do
99
+ so, subject to the following conditions:
100
+
101
+ The above copyright notice and this permission notice shall be included in all
102
+ copies or substantial portions of the Software.
103
+
104
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
105
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
106
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
107
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
108
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
109
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
110
+ SOFTWARE.
package/README.md CHANGED
@@ -4,7 +4,7 @@ An MCP server that connects your own Claude (Claude Code, Claude Desktop or any
4
4
  design system repo. Claude can read your DTCG tokens, components and docs, run your contrast gate, and
5
5
  propose token changes as reviewable branches and pull requests. It never writes to `main`.
6
6
 
7
- Free and open source (MIT). Local, no backend, no account: it reads files on your disk, or a GitHub repo
7
+ Free and source available (FSL-1.1-MIT, each version becomes MIT after two years). Local, no backend, no account: it reads files on your disk, or a GitHub repo
8
8
  with your own token.
9
9
 
10
10
  ## Run it
@@ -45,20 +45,22 @@ Working on the server itself: `npm run mcp:build` in a clone of this repo builds
45
45
 
46
46
  <!-- tools:start (generated from the server: npm run readme:tools -w @bridge-ds/mcp) -->
47
47
 
48
- 73 tools. "writes" tools change files, branches, pull requests or issues; they need a token in remote mode and only run when the person asked.
48
+ 75 tools. "writes" tools change files, branches, pull requests or issues; they need a token in remote mode and only run when the person asked.
49
49
 
50
50
  | Tool | Access | What it does |
51
51
  | --- | --- | --- |
52
52
  | `bridge_apply_suggestion` | writes | Apply a Bridge suggestion to today's code ("Apply Bridge suggestion #42"). |
53
+ | `bridge_archive_exploration` | writes | Archive an exploration, as in Studio: the archived label on its still open pull request hides it from the default lists, home and counts (bridge_list_explorations with archived: true lists them). |
53
54
  | `bridge_ask_someone_else` | writes | Ask the other people who can give the missing approvals to review a branch, as "Ask someone else to review" in the Studio review queue, and take the person off its requested reviewers. |
54
55
  | `bridge_audit` | reads | Measure how a product codebase uses this design system (local only). |
55
56
  | `bridge_back_to_draft` | writes | Take a branch out of review back to draft, as in Studio's More menu. |
56
57
  | `bridge_branch_status` | reads | One branch in review as Studio shows it: its product, status (draft, in review, needs design or tech approval, blocked by tests, conflict, ready to merge, merged, closed), approvals (Tier 1: one owner approval; a branch that applies an approved suggestion carries its approvals), tests, how it stands against main, whether the person may merge it (the same verdict as the Merge button and status chips in Studio), and the next step. |
57
58
  | `bridge_check_contrast` | reads | Run the repo's WCAG contrast gate (every pair in every brand x theme). |
58
59
  | `bridge_close_branch` | writes | Close a branch without merging it, as in Studio's More menu. |
59
- | `bridge_close_exploration` | writes | Close an exploration without merging it, as in Studio. |
60
+ | `bridge_close_exploration` | writes | Close an exploration without merging it. |
60
61
  | `bridge_combine_branches` | reads | Combined preview of 2 to 4 token branches, as "Try together" in Studio: each branch's own token edits on the latest main, the tokens two branches set differently (pick one per key with picks), and the links that open the combination (the admin demo with the Bridge toolbar, the library views). |
61
62
  | `bridge_comment` | writes | Post a comment on a branch, or reply in the thread of a line comment (replyTo: its id from bridge_list_comments). |
63
+ | `bridge_continue_exploration` | writes | Pick an exploration up where it was left, when the person says "Continue Bridge exploration #12" (Studio's Continue in Claude line; shop#12 for a product with its own repository) or asks to continue one by name. |
62
64
  | `bridge_create_request` | writes | File a component change request as a GitHub issue labeled component-change (source: mcp), in the same format as Figma and Bridge Studio requests. |
63
65
  | `bridge_create_suggestion` | writes | File any change as a suggestion from its payload (schema bridge.suggestion/1: kind, title, summary, and tokens edits, docs, componentSpec or files). |
64
66
  | `bridge_draft_docs` | reads | Start or refresh a component's docs.json. |
@@ -84,8 +86,8 @@ Working on the server itself: `npm run mcp:build` in a clone of this repo builds
84
86
  | `bridge_list_build_requests` | reads | Build requests: structure changes pushed from Figma (a new variant, option, layout or component) that developers build, as GitHub issues labeled component-change and bridge-build, plus library branches from Figma waiting for a developer. |
85
87
  | `bridge_list_comments` | reads | The conversation on a branch and its line comment threads, with the ids to reply to (bridge_comment with replyTo). |
86
88
  | `bridge_list_components` | reads | List design system components with family and one-line summary (what it is for). |
87
- | `bridge_list_explorations` | reads | Explorations of the repo (draft pull requests labeled exploration on explore/* branches): name, purpose, status (active: running; promoted: ready for review; closed), author, last update, for running ones the preview links Vercel reports (url null while it has not reported one yet) and the install command a product staging branch uses, read from the preview comment on the pull request (state building until the snapshot of the latest commit is published, never a guessed command), and the component requests implemented on each. |
88
- | `bridge_list_products` | reads | The products of this design system (bridge.config.json "products": name, repo or folder, preview link pattern, framework) and the one the current folder or repo belongs to, which tools that start work use when no product is given. |
89
+ | `bridge_list_explorations` | reads | Explorations (pull requests on explore/* branches) of the design system repository and of every product with its own repository (bridge.config.json products[].repo, one read each; a product repository Bridge cannot reach is left out, bridge_list_products says which): ref ("#12", or "shop#12" in a product repository: pass it as is to the other exploration tools), repo, name, purpose, status (active: running; ready: done exploring, waiting for code; building: developers push to it; shipped: merged; promoted: sent to review the older way; closed), archived, author, last update, for open ones the preview links Vercel reports (url null while it has not reported one yet) and the install command a product staging branch uses, read from the preview comment on the pull request (state building until the snapshot of the latest commit is published, never a guessed command), and the component requests implemented on each. |
90
+ | `bridge_list_products` | reads | The products of this design system (bridge.config.json "products": name, repo or folder, preview link pattern, framework; for a product with its own repository, connection: connected, read-only or not-connected, where not-connected means its explorations are left out of the lists until an admin installs the Bridge GitHub App there) and the one the current folder or repo belongs to, which tools that start work use when no product is given. |
89
91
  | `bridge_list_requests` | reads | Component change requests: GitHub issues labeled component-change (from Figma, Bridge Studio, the CLI or Claude). |
90
92
  | `bridge_list_reviews` | reads | Open pull requests on the repo (flagging the ones Bridge opened) and, locally, the bridge/* proposal branches. |
91
93
  | `bridge_list_suggestions` | reads | Suggestions in the repo: GitHub issues labeled bridge-suggestion, each an exact change (tokens, docs, a component spec, a brand, a revert, settings) that the owners approve and a developer applies. |
@@ -98,7 +100,7 @@ Working on the server itself: `npm run mcp:build` in a clone of this repo builds
98
100
  | `bridge_plan_brand` | reads | Dry run of a new brand: the brand token file (generated primary and neutral ramps, radius and font roles), copied theme overrides, the bridge.config.json change, every contrast pair for the new brand in light and dark (ok, or the failing pairs), validation issues, the risk tier (always Tier 3, minor) and the PR body. |
99
101
  | `bridge_plan_revert` | reads | What undoing a merged token change takes, computed against the CURRENT base branch (not a blind git revert): the inverse edits, conflicts where a token changed again later (with the later PR), changes already undone, contrast before and after, new validation errors, risk tier, files and the PR body ("Revert: <title>", links the original PR). |
100
102
  | `bridge_product_branch` | reads | A product branch as Studio shows it: the summary sentence, each linked library branch with its status and reviewers, what its preview means for the product branch and the next action, and the pieces with no library branch yet. |
101
- | `bridge_promote_exploration` | writes | Promote an exploration (explore/<name>) to review, as in Studio: the draft becomes ready for review with its tier labels, the exploration label and note go, and the component requests it implements are linked so they close when it merges. |
103
+ | `bridge_promote_exploration` | writes | "Done exploring" on an exploration (explore/<name>), as in Studio (the tool keeps its old name). |
102
104
  | `bridge_propose_brand` | writes | Propose a new brand as a reviewable change. |
103
105
  | `bridge_propose_figma_fixes` | writes | Opens the accepted fixes for review like other Bridge changes: figma-fixes.json with them on a new bridge/* branch and a draft pull request labelled drafted-by-claude, figma-fixes and its tier (locally: a new local branch, never pushed). |
104
106
  | `bridge_propose_revert` | writes | Plans the revert (or restore) like bridge_plan_revert, then: local repo, commits to a new local bridge/* branch without touching your working tree (never pushes); GitHub with token, new bridge/* branch and a PR labelled revert and its tier (draft for Tier 2 and 3). |
@@ -112,7 +114,7 @@ Working on the server itself: `npm run mcp:build` in a clone of this repo builds
112
114
  | `bridge_scaffold_component` | writes | Generate a new component folder per the repo checklist: Name.tsx (forwardRef, typed props), Name.module.css (existing tokens only), stories with AllStates, docs.json with the reference component's keys, a keyboard + axe test when interactive, index.ts. |
113
115
  | `bridge_search_tokens` | reads | Find tokens by words in the path or description ("danger text", "focus ring"), by CSS variable, or by value ("#c2410c", "16px": exact and near colors). |
114
116
  | `bridge_send_for_review` | writes | Ask for review: a draft branch becomes ready for review, as "Mark as ready" in Studio. |
115
- | `bridge_start_exploration` | writes | Start an exploration: a branch explore/<slug> from the default branch with a note file, and a DRAFT pull request labeled exploration that gets per-branch previews and a snapshot package a product staging branch installs (npm i @bridge-ds/react@<snapshot>). |
117
+ | `bridge_start_exploration` | writes | Start an exploration: a branch explore/<slug> from the default branch with a note file, and a DRAFT pull request labeled exploration. |
116
118
  | `bridge_switch_to_published` | writes | Once its library branches shipped, bring main into the product branch (GitHub update branch): it stops carrying the library change and uses the shipped one. |
117
119
  | `bridge_try_branch` | reads | Try a branch before it merges: the preview link of each product Vercel reported for it (the admin demo opens with the Bridge toolbar on, as "Try it in the product" in Studio), the other previews, and "Share with a product team": the install command a product team runs in a staging branch, or why there is none yet, with a ready-to-paste message. |
118
120
  | `bridge_try_figma_fix` | reads | Checks proposed fixes offline, nothing is written: validates them (the strict figma-fixes.json validator), lays them on the measure, rebuilds the set the way the plugin pulls it, and compares each differing variant with what the code renders. |
@@ -93,6 +93,7 @@ export declare function branchFacts(ctx: BridgeContext, gh: GitHubClient, n: num
93
93
  tokenValues: boolean;
94
94
  autoShip: boolean;
95
95
  statusLabel: string;
96
+ publishedBy: string | null;
96
97
  }>;
97
98
  /** One branch, the way Studio shows it: status, what blocks the merge and who acts, how it stands against main. */
98
99
  export declare function branchStatus(ctx: BridgeContext, a: {
@@ -104,6 +105,7 @@ export declare function branchStatus(ctx: BridgeContext, a: {
104
105
  shipsByItself: boolean;
105
106
  said: string;
106
107
  } | undefined;
108
+ published?: string | undefined;
107
109
  pr: number;
108
110
  title: string;
109
111
  url: string;
@@ -189,6 +191,8 @@ export declare function listProducts(ctx: BridgeContext): Promise<{
189
191
  framework?: string | undefined;
190
192
  preview?: string | undefined;
191
193
  path?: string | undefined;
194
+ connect?: string | undefined;
195
+ connection?: "unknown" | "not-connected" | "read-only" | "connected" | undefined;
192
196
  repo?: string | undefined;
193
197
  key: string;
194
198
  name: string;
@@ -235,7 +239,7 @@ export declare function tryBranch(ctx: BridgeContext, a: {
235
239
  }[];
236
240
  share: {
237
241
  message?: import("@bridge-ds/core").ShareMessage | undefined;
238
- state: "ready" | "building" | "failed" | "closed" | "shipped" | "no-packages";
242
+ state: "ready" | "building" | "failed" | "shipped" | "closed" | "no-packages";
239
243
  install: string | null;
240
244
  sentence: string;
241
245
  };