@greese/mcp 0.0.0-stage → 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 +62 -2
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +7 -0
- package/dist/data.d.ts +60 -0
- package/dist/data.js +3 -0
- package/dist/data.json +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/search.d.ts +17 -0
- package/dist/search.js +58 -0
- package/dist/server.d.ts +9 -0
- package/dist/server.js +301 -0
- package/package.json +66 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Chris Moody
|
|
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
CHANGED
|
@@ -1,3 +1,63 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @greese/mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An [MCP](https://modelcontextprotocol.io) server for greese ui. It gives a
|
|
4
|
+
coding assistant the facts it needs to write greese ui code instead of guessing
|
|
5
|
+
them:
|
|
6
|
+
|
|
7
|
+
- the components;
|
|
8
|
+
- their props;
|
|
9
|
+
- the classes a theme can target;
|
|
10
|
+
- tokens and icons;
|
|
11
|
+
- the guides;
|
|
12
|
+
- the shape themes;
|
|
13
|
+
- complete page templates.
|
|
14
|
+
|
|
15
|
+
It answers for the greese ui version it was built with.
|
|
16
|
+
|
|
17
|
+
## Set up
|
|
18
|
+
|
|
19
|
+
Claude Code:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
claude mcp add greese -- npx -y @greese/mcp
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Any client that takes a JSON config (Claude Desktop, Cursor, VS Code…):
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"mcpServers": {
|
|
30
|
+
"greese": { "command": "npx", "args": ["-y", "@greese/mcp"] }
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
It runs over stdio and needs Node 24 or later.
|
|
36
|
+
|
|
37
|
+
## Tools
|
|
38
|
+
|
|
39
|
+
| Tool | What it returns |
|
|
40
|
+
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
41
|
+
| `list_components` | Every component by docs category, one line each |
|
|
42
|
+
| `get_component` | A component's description, every prop (type, default, meaning), its classes, parts, modifiers and CSS variables, and its stories file as example code |
|
|
43
|
+
| `search` | Components, guides, templates and themes that match some words |
|
|
44
|
+
| `list_tokens` | Design tokens as CSS custom properties, by group |
|
|
45
|
+
| `list_icons` | The icons in `@greese/icons` |
|
|
46
|
+
| `create_theme` | The CSS of a theme built with `createTheme(options)` |
|
|
47
|
+
| `list_templates`, `get_template` | Page templates (finance, admin dashboard, email client, blog, SaaS, store) and their source |
|
|
48
|
+
| `list_themes`, `get_theme` | Shape themes (clip-path and masks), as kit SCSS or compiled CSS |
|
|
49
|
+
|
|
50
|
+
## Resources
|
|
51
|
+
|
|
52
|
+
- `greese://guides/<name>`: the guides (Getting started, Theming, Styling…).
|
|
53
|
+
- `greese://components/<Name>`: one document per component.
|
|
54
|
+
|
|
55
|
+
## Programmatic use
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { createGreeseServer, loadData } from '@greese/mcp'
|
|
59
|
+
|
|
60
|
+
const server = createGreeseServer(loadData()) // an McpServer: connect any transport
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
See ADR 0022 for how it's built.
|
package/dist/cli.d.ts
ADDED
package/dist/cli.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
|
+
import { loadData } from "./data.js";
|
|
4
|
+
import { createGreeseServer } from "./server.js";
|
|
5
|
+
// stdout carries the protocol: anything else goes to stderr.
|
|
6
|
+
await createGreeseServer(loadData()).connect(new StdioServerTransport());
|
|
7
|
+
console.error('greese ui MCP server running on stdio');
|
package/dist/data.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** One prop of a component, as its TSDoc describes it. */
|
|
2
|
+
export interface PropDoc {
|
|
3
|
+
name: string;
|
|
4
|
+
type: string;
|
|
5
|
+
required: boolean;
|
|
6
|
+
default?: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
/** A component's entry in the style manifest (ADR 0010): what a theme can target. */
|
|
10
|
+
export interface StyleEntry {
|
|
11
|
+
className: string;
|
|
12
|
+
parts: string[];
|
|
13
|
+
modifiers: string[];
|
|
14
|
+
attributes: string[];
|
|
15
|
+
variables: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface ComponentDoc {
|
|
18
|
+
name: string;
|
|
19
|
+
/** Its docs category: Layout, Forms, Content, Overlays, Navigation, Motion, Utilities. */
|
|
20
|
+
category: string;
|
|
21
|
+
description: string;
|
|
22
|
+
/** Where it lives, relative to the repository. */
|
|
23
|
+
file: string;
|
|
24
|
+
props: PropDoc[];
|
|
25
|
+
styles?: StyleEntry;
|
|
26
|
+
/** Its stories file: working usage, args first. */
|
|
27
|
+
example?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface Guide {
|
|
30
|
+
name: string;
|
|
31
|
+
title: string;
|
|
32
|
+
text: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ThemeDoc {
|
|
35
|
+
id: string;
|
|
36
|
+
description: string;
|
|
37
|
+
/** The kit source: compile it after greese ui's styles, or read it as a recipe. */
|
|
38
|
+
scss: string;
|
|
39
|
+
/** The same, compiled. */
|
|
40
|
+
css: string;
|
|
41
|
+
}
|
|
42
|
+
export interface Template {
|
|
43
|
+
id: string;
|
|
44
|
+
description: string;
|
|
45
|
+
source: string;
|
|
46
|
+
}
|
|
47
|
+
/** Everything the server answers from: dist/data.json, written at build time. */
|
|
48
|
+
export interface GreeseData {
|
|
49
|
+
version: string;
|
|
50
|
+
components: ComponentDoc[];
|
|
51
|
+
tokens: Record<string, unknown>;
|
|
52
|
+
icons: string[];
|
|
53
|
+
guides: Guide[];
|
|
54
|
+
themes: ThemeDoc[];
|
|
55
|
+
templates: Template[];
|
|
56
|
+
/** The SCSS the templates share (their `tpl-*` classes). */
|
|
57
|
+
templateStyles?: string;
|
|
58
|
+
}
|
|
59
|
+
/** The data this build shipped with. */
|
|
60
|
+
export declare const loadData: () => GreeseData;
|
package/dist/data.js
ADDED