@soroush.design/mcp 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +67 -2
- package/dist/bin.mjs +2926 -0
- package/dist/index.cjs +2928 -0
- package/dist/index.d.cts +78 -0
- package/dist/index.d.mts +78 -0
- package/dist/index.mjs +2922 -0
- package/package.json +77 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Masoud Soroush <https://soroush.tech>
|
|
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,68 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @soroush.design/mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
MCP server for the [`@soroush.tech`](https://docs.soroush.tech) design system. It
|
|
4
|
+
gives AI coding tools - Claude Code, Claude, Cursor, or anything else that speaks the
|
|
5
|
+
[Model Context Protocol](https://modelcontextprotocol.io) - the component inventory,
|
|
6
|
+
every component's README, and the theme token contract, so they write UI that matches
|
|
7
|
+
the library instead of guessing at it.
|
|
8
|
+
|
|
9
|
+
## Use it
|
|
10
|
+
|
|
11
|
+
The hosted server needs no install:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
claude mcp add --transport http soroush https://mcp.soroush.design/mcp
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or run it locally over stdio - useful offline, or to pin a version:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npx -y @soroush.design/mcp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For a client configured by file:
|
|
24
|
+
|
|
25
|
+
```jsonc
|
|
26
|
+
{
|
|
27
|
+
"mcpServers": {
|
|
28
|
+
"soroush": { "command": "npx", "args": ["-y", "@soroush.design/mcp"] },
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Tools
|
|
34
|
+
|
|
35
|
+
| Tool | Arguments | Returns |
|
|
36
|
+
| ----------------- | ------------------------------------------------ | --------------------------------------------------------------------------- |
|
|
37
|
+
| `list_components` | `package?` | Every component with its category, summary, and exact subpath import |
|
|
38
|
+
| `get_component` | `name`, `part?` (`all`/`intro`/`api`/`examples`) | The component's README - `api` is its props with token values and defaults |
|
|
39
|
+
| `get_tokens` | `scale?` | The token contract from `baseTheme`: space, palette, radii, typography, ... |
|
|
40
|
+
| `list_docs` | - | The guide index: installation, usage, theming, layout kit, styled-system |
|
|
41
|
+
| `get_doc` | `id` | One guide or reference in full |
|
|
42
|
+
| `search_docs` | `query` | Best matches across components and guides, with snippets |
|
|
43
|
+
|
|
44
|
+
A typical run starts with `list_components`, then `get_component` with `part: "api"`
|
|
45
|
+
before writing markup, and `get_tokens` instead of hardcoding a value.
|
|
46
|
+
|
|
47
|
+
## Programmatic use
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
import { createMcpServer } from '@soroush.design/mcp'
|
|
51
|
+
|
|
52
|
+
const server = createMcpServer()
|
|
53
|
+
await server.connect(myTransport)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`content`, `findComponent`, `findDoc`, and `search` are exported too, for reading the
|
|
57
|
+
bundle without going through MCP.
|
|
58
|
+
|
|
59
|
+
## How the content stays current
|
|
60
|
+
|
|
61
|
+
Nothing here is hand-written documentation. At build time the package reads the
|
|
62
|
+
component registry and README splitter from the workspace, pulls each component's
|
|
63
|
+
`README.md`, and serializes the live `baseTheme` object. The docs site at
|
|
64
|
+
docs.soroush.tech renders the same sources, so the two cannot drift.
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
MIT
|