@shadsapp/mcp 0.2.0 → 1.0.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/README.md CHANGED
@@ -1,119 +1,37 @@
1
- # @shadsapp/mcp
1
+ # @shadsapp/mcp (Deprecated)
2
2
 
3
- MCP server for [shads.app](https://shads.app). It gives AI clients access to curated shadcn/ui themes, theme validation, registry URLs, theme skills, and installation plans.
3
+ > [!WARNING]
4
+ > **DEPRECATION NOTICE**: This npm package is deprecated in favor of the official zero-install remote HTTP MCP server at **`https://mcp.shads.app`**.
5
+ >
6
+ > You no longer need to install or run Node.js packages locally. Remove the `@shadsapp/mcp` entry from your MCP client config and connect directly to the HTTP endpoint. Each client uses a different config format, so follow the guide for yours: [shads.app/docs/mcp](https://shads.app/docs/mcp).
4
7
 
5
- The server uses the MCP **stdio transport**. It runs as a child process started by an MCP client such as Claude Desktop, Cursor, VS Code, or another MCP host.
8
+ ## Migration
6
9
 
7
- ## Requirements
10
+ If you previously configured the `@shadsapp/mcp` command in your MCP client settings (e.g. `npx -y @shadsapp/mcp`), delete it and add the remote server `https://mcp.shads.app` using the [client guide](https://shads.app/docs/mcp). For any client, `npx add-mcp https://mcp.shads.app` writes the config for you.
8
11
 
9
- - Node.js 18 or newer
10
- - Internet access for registry tools (`resolve_share`, `get_theme_package`, `get_skill`, and `install_plan`)
11
- - A project using the shadcn CLI for generated install commands
12
- - A Pro shads.app API key for the Pro tools (optional)
12
+ Executing `npx @shadsapp/mcp` will output this deprecation notice and exit.
13
13
 
14
- `list_themes`, `get_theme`, `validate_theme`, `theme_schema`, and `list_starters` work from the installed package without a network request.
15
-
16
- ## Installation
17
-
18
- ### Run directly with npx
19
-
20
- This is the simplest option. The MCP client downloads the package when it starts the server:
21
-
22
- ```bash
23
- npx -y @shadsapp/mcp
24
- ```
25
-
26
- Use the following configuration in an MCP client that supports JSON server configuration:
27
-
28
- ```json
29
- {
30
- "mcpServers": {
31
- "shads": {
32
- "command": "npx",
33
- "args": ["-y", "@shadsapp/mcp"]
34
- }
35
- }
36
- }
37
- ```
38
-
39
- ### Install globally
40
-
41
- ```bash
42
- npm install --global @shadsapp/mcp
43
- shads-mcp
44
- ```
45
-
46
- Then configure the client with:
47
-
48
- ```json
49
- {
50
- "mcpServers": {
51
- "shads": {
52
- "command": "shads-mcp"
53
- }
54
- }
55
- }
56
- ```
57
-
58
- ### Install locally in a project
59
-
60
- ```bash
61
- npm install --save-dev @shadsapp/mcp
62
- ```
63
-
64
- Use an absolute executable path when the MCP host does not inherit your project's `node_modules/.bin` path. For example:
65
-
66
- ```json
67
- {
68
- "mcpServers": {
69
- "shads": {
70
- "command": "/absolute/path/to/project/node_modules/.bin/shads-mcp"
71
- }
72
- }
73
- }
74
- ```
75
-
76
- On Windows, use the generated `shads-mcp.cmd` path or run through `npx.cmd`:
77
-
78
- ```json
79
- {
80
- "mcpServers": {
81
- "shads": {
82
- "command": "npx.cmd",
83
- "args": ["-y", "@shadsapp/mcp"]
84
- }
85
- }
86
- }
87
- ```
88
-
89
- ## Client setup
90
-
91
- Add the configuration to the MCP client's server settings, then restart the client. The server communicates over stdin/stdout, so do not add logging or other output to stdout in a wrapper script. Diagnostics belong on stderr.
92
-
93
- If the client supports an explicit working directory, set it to the project where shadcn commands should run. The MCP server itself does not modify that project; it returns install commands for the agent or user to review and run.
94
-
95
- ## Available tools
14
+ ## Available tools on `https://mcp.shads.app`
96
15
 
97
16
  ### Public tools
98
17
 
99
18
  | Tool | Input | Purpose |
100
19
  | -------------------- | ------------------------------------------- | ---------------------------------------------------- |
101
- | `list_themes` | `{}` | List bundled starter theme metadata. |
102
- | `get_theme` | `{ "id": "workspace" }` | Return a bundled theme and CSS. |
20
+ | `list_themes` | `{}` | List curated public starter themes. |
21
+ | `get_theme` | `{ "id": "system-modern-default-theme" }` | Return a theme document and CSS. |
103
22
  | `validate_theme` | `{ "source": "..." }` | Validate raw or fenced `theme.json` text. |
104
23
  | `theme_schema` | `{}` | Return the active schema id. |
105
24
  | `list_starters` | `{}` | List starter registry and skill URLs. |
106
- | `get_install_prompt` | `{ "item": "workspace", "mode": "both" }` | Return a copyable install prompt. |
25
+ | `get_install_prompt` | `{ "item": "system-modern-default-theme", "mode": "both" }` | Return a copyable install prompt. |
107
26
  | `resolve_share` | `{ "item": "abc123" }` | Resolve a registry/share item and return its prompt. |
108
- | `get_theme_package` | `{ "id": "workspace" }` | Return theme, skill, dependencies, and install data. |
109
- | `get_skill` | `{ "id": "workspace" }` | Return the theme-specific skill markdown. |
110
- | `install_plan` | `{ "id": "workspace", "mode": "existing" }` | Return validated install commands and notes. |
111
-
112
- ### Pro tools (require `SHADS_API_KEY`)
27
+ | `get_theme_package` | `{ "id": "system-modern-default-theme" }` | Return theme, skill, dependencies, and install data. |
28
+ | `get_skill` | `{ "id": "system-modern-default-theme" }` | Return the theme-specific skill markdown. |
29
+ | `install_plan` | `{ "id": "system-modern-default-theme", "mode": "existing" }` | Return validated install commands and notes. |
30
+ | `list_concepts` | `{}` | List visual-language concepts. |
31
+ | `get_concept` | `{ "slug": "terminal" }` | Return a concept document. |
32
+ | `connection_status` | `{}` | Verify the connection, plan, and API key status. |
113
33
 
114
- Add a `SHADS_API_KEY` env var and the server unlocks account tools that talk to
115
- shads.app on your behalf. All premium logic and data stays on the shads.app
116
- server — the key only authorizes requests, nothing is baked into this package.
34
+ ### Pro tools (require `Authorization: Bearer <key>`)
117
35
 
118
36
  | Tool | Input | Purpose |
119
37
  | -------------------- | ----------------------------------------------------- | ------------------------------------------------------- |
@@ -124,142 +42,4 @@ server — the key only authorizes requests, nothing is baked into this package.
124
42
  | `generate_theme` | `{ "description": "..." }` | Hosted AI generation (uses your monthly quota). |
125
43
  | `check_subscription` | `{}` | Show plan, MCP access, AI quota, and theme count. |
126
44
 
127
- `get_my_theme` returns `themeCss` as one self-contained stylesheet — the tokens,
128
- the `[data-slot]` adapters, and the `@theme inline` wiring — so it works as a
129
- single `<link>` without the ZIP's `index.css` merge step.
130
-
131
- When no key is set, the server advertises a single `authenticate` tool that
132
- returns the setup instructions above instead of the premium tools.
133
-
134
- #### Connecting a Pro key
135
-
136
- 1. Sign in at [shads.app](https://shads.app) on a Pro plan.
137
- 2. Open **Account settings → API keys** and create a key.
138
- 3. Copy it immediately — it is shown once and stored only as a hash.
139
- 4. Add it to the **server** env in your MCP client config:
140
-
141
- ```json
142
- {
143
- "mcpServers": {
144
- "shads": {
145
- "command": "npx",
146
- "args": ["-y", "@shadsapp/mcp"],
147
- "env": { "SHADS_API_KEY": "shads_live_..." }
148
- }
149
- }
150
- }
151
- ```
152
-
153
- Restart the client; the Pro tools appear in the tool list. Keys inherit the plan:
154
- if the subscription lapses, the tools return a 402 until it is restored (the key
155
- itself stays valid). Revoke keys from the same settings page at any time.
156
-
157
- Set `SHADS_API_BASE` to point at a non-production host (for example a preview
158
- deployment) instead of `https://shads.app`.
159
-
160
- Starter names such as `workspace` are converted to registry item ids such as `workspace-theme`. You may also provide a theme item id, a share id, or a registry URL such as `https://shads.app/r/workspace-theme.json`.
161
-
162
- Registry item ids accept only letters, numbers, hyphens, and underscores. This keeps generated shell commands safe to review and execute.
163
-
164
- ## Typical workflows
165
-
166
- ### Install a starter into an existing app
167
-
168
- 1. Call `get_theme_package` with `{ "id": "workspace" }`.
169
- 2. Review the returned theme URL, skill markdown, dependencies, and prompt.
170
- 3. Call `install_plan` with mode `existing` if you only need the command.
171
- 4. Run the returned command from the target shadcn project.
172
-
173
- ### Create a new app from a starter
174
-
175
- Call `get_install_prompt` with mode `new`:
176
-
177
- ```json
178
- {
179
- "item": "workspace",
180
- "mode": "new"
181
- }
182
- ```
183
-
184
- The result contains the `shadcn create` command and the relevant theme skill instructions.
185
-
186
- ### Validate a theme document
187
-
188
- Pass the complete JSON text or a fenced JSON block:
189
-
190
- ````json
191
- {
192
- "source": "```json\n{\"$schema\":\"shads-theme/v1\",\"config\":{}}\n```"
193
- }
194
- ````
195
-
196
- The result has `ok: true` and a normalized document when valid, or `ok: false` with a list of validation errors.
197
-
198
- ## Troubleshooting
199
-
200
- ### The client cannot start the server
201
-
202
- Check that Node.js 18 or newer is available to the client process:
203
-
204
- ```bash
205
- node --version
206
- npx -y @shadsapp/mcp
207
- ```
208
-
209
- For GUI clients, use an absolute command path or configure the full path to `npx`/`npx.cmd`. GUI applications often have a smaller `PATH` than your shell.
210
-
211
- ### The server starts but registry tools fail
212
-
213
- The remote registry tools require network access to `https://shads.app`. Check that the client process can reach the registry and that the item exists. Remote requests fail with a bounded timeout rather than waiting indefinitely.
214
-
215
- ### Install commands do not affect the project
216
-
217
- The server only returns commands. Run them from the target shadcn project, or configure the MCP host's working directory when supported.
218
-
219
- ### Pro tools are missing from the tool list
220
-
221
- `SHADS_API_KEY` is read from the **server** process env. Put it in the `env` block
222
- of the server entry (see above) — not in a `.env` file inside the project you are
223
- editing. Only keys starting with `shads_live_` are accepted; anything else is
224
- ignored, and the server falls back to advertising `authenticate`.
225
-
226
- ### Pro tool returns 401
227
-
228
- No key, a revoked key, or a malformed `Authorization` header. Public tools keep
229
- working, which distinguishes this from a network problem. Create a new key in
230
- Account settings → API keys.
231
-
232
- ### Pro tool returns 402
233
-
234
- The key is valid but the account's plan no longer includes MCP access. Restore
235
- the subscription and the same key starts working again — keys are not deleted on
236
- downgrade.
237
-
238
- ### Pro tool returns 429
239
-
240
- Rate limited. Hosted AI (`generate_theme`) shares the account's monthly quota and
241
- an hourly request limit; key creation is capped at 5 per user per 24 hours.
242
-
243
- ## Development
244
-
245
- From the repository root:
246
-
247
- ```bash
248
- npm install
249
- npm run test -w @shadsapp/mcp
250
- npm run typecheck -w @shadsapp/mcp
251
- npm run build -w @shadsapp/mcp
252
- npm pack -w @shadsapp/mcp --dry-run
253
- ```
254
-
255
- The published package contains `dist`, the executable entrypoint, and this README. The server uses stderr for fatal startup diagnostics and reserves stdout for MCP protocol messages.
256
-
257
- ## Related packages
258
-
259
- - [`@shadsapp/schema`](https://www.npmjs.com/package/@shadsapp/schema)
260
- - [`@shadsapp/themes`](https://www.npmjs.com/package/@shadsapp/themes)
261
- - [`@shadsapp/cli`](https://www.npmjs.com/package/@shadsapp/cli)
262
-
263
- ## License
264
-
265
- MIT
45
+ For more information, visit [shads.app/docs/mcp](https://shads.app/docs/mcp).
@@ -4,6 +4,25 @@ export declare class ShadsApiError extends Error {
4
4
  readonly status: number;
5
5
  constructor(status: number, message: string);
6
6
  }
7
+ export type ConceptSummary = {
8
+ id: string;
9
+ version: number;
10
+ trust: "system" | "user";
11
+ name: string;
12
+ family: string;
13
+ description: string;
14
+ swatch: string[];
15
+ baseThemes: Array<{
16
+ id: string;
17
+ label: string;
18
+ }>;
19
+ runtimes: Array<"base-ui" | "radix" | "react-aria">;
20
+ modes: Array<"light" | "dark">;
21
+ };
22
+ export declare function listConcepts(): Promise<{
23
+ items: ConceptSummary[];
24
+ }>;
25
+ export declare function getConcept(slug: string): Promise<Record<string, unknown>>;
7
26
  export type CloudThemeSummary = {
8
27
  id: string;
9
28
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,EAAE,MAEF,CAAA;AAKrB,wBAAgB,UAAU,IAAI,MAAM,GAAG,IAAI,CAG1C;AAED,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;gBAEX,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAK5C;AAyED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,SAAS,EA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AAO,CAAC,mBAAmB,CAAC,CAM9B;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAErE"}
@@ -64,6 +64,35 @@ async function request(path, init = {}) {
64
64
  }
65
65
  return payload;
66
66
  }
67
+ async function requestPublic(path) {
68
+ let response;
69
+ try {
70
+ response = await fetch(`${API_BASE}${path}`, {
71
+ headers: { Accept: "application/json" },
72
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
73
+ });
74
+ }
75
+ catch (cause) {
76
+ if (cause instanceof Error && cause.name === "TimeoutError") {
77
+ throw new ShadsApiError(504, "shads.app request timed out. Retry.");
78
+ }
79
+ throw new ShadsApiError(0, `Could not reach shads.app at ${API_BASE}. Check your network.`);
80
+ }
81
+ const payload = (await response
82
+ .json()
83
+ .catch(() => null));
84
+ if (!response.ok) {
85
+ const payloadError = payload && typeof payload.error === "string" ? payload.error : null;
86
+ throw new ShadsApiError(response.status, payloadError ?? `shads.app request failed (${response.status})`);
87
+ }
88
+ return payload;
89
+ }
90
+ export async function listConcepts() {
91
+ return requestPublic("/api/concepts");
92
+ }
93
+ export async function getConcept(slug) {
94
+ return requestPublic(`/api/concepts/${encodeURIComponent(slug)}`);
95
+ }
67
96
  export async function listMyThemes() {
68
97
  const data = await request("/api/themes");
69
98
  return data.items.map((item) => ({
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEvD,MAAM,CAAC,MAAM,QAAQ,GAAW,CAC9B,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,iBAAiB,CAChD,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AAErB,MAAM,kBAAkB,GAAG,MAAM,CAAA;AACjC,MAAM,mBAAmB,GAAG,MAAM,CAAA;AAElC,MAAM,UAAU,UAAU;IACxB,MAAM,GAAG,GAAG,OAAO,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;AAC7E,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,EAAU,EACV,KAA0D;IAE1D,MAAM,OAAO,GAAG,MAAM,OAAO,CAC3B,eAAe,kBAAkB,CAAC,EAAE,CAAC,EAAE,EACvC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CACjC,CAAA;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,WAAmB;IAEnB,OAAO,OAAO,CAAsB,kBAAkB,EAAE;QACtD,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,EAAE,WAAW,EAAE;QACrB,SAAS,EAAE,mBAAmB;KAC/B,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACrC,OAAO,OAAO,CAAqB,iBAAiB,CAAC,CAAA;AACvD,CAAC"}
package/dist/index.js CHANGED
@@ -1,493 +1,38 @@
1
1
  #!/usr/bin/env node
2
- import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
- import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
- import { parseThemeDocumentInput, THEME_SCHEMA } from "@shadsapp/schema";
6
- import { getTheme, listThemes } from "@shadsapp/themes";
7
- import { buildAgentInstallPrompt, buildInstallPlan, listStarterInstallEntries, REGISTRY_HOMEPAGE, resolveSafeItemId, systemSkillItemId, } from "./install-prompt.js";
8
- import { checkSubscription, generateTheme, getMyTheme, listMyThemes, saveTheme, updateTheme, } from "./api-client.js";
9
- import { AUTHENTICATE_TOOL, AUTH_SETUP_MESSAGE, DESCRIPTION_MAX_LENGTH, DESCRIPTION_MIN_LENGTH, PREMIUM_TOOL_DEFINITIONS, hasApiKeyConfigured, parseThemeConfigDocument, premiumCall, textResult, } from "./premium-tools.js";
10
- const server = new Server({
11
- name: "shads",
12
- version: "0.2.0",
13
- }, {
14
- capabilities: {
15
- tools: {},
16
- },
17
- });
18
- server.setRequestHandler(ListToolsRequestSchema, async () => {
19
- const tools = [
20
- {
21
- name: "list_themes",
22
- description: "List curated public shads starter themes",
23
- inputSchema: {
24
- type: "object",
25
- properties: {},
26
- additionalProperties: false,
27
- },
28
- },
29
- {
30
- name: "get_theme",
31
- description: "Get a public theme bundle (theme.json + theme.css)",
32
- inputSchema: {
33
- type: "object",
34
- properties: {
35
- id: {
36
- type: "string",
37
- description: "Theme id, e.g. workspace",
38
- },
39
- },
40
- required: ["id"],
41
- additionalProperties: false,
42
- },
43
- },
44
- {
45
- name: "validate_theme",
46
- description: "Validate a theme.json document string",
47
- inputSchema: {
48
- type: "object",
49
- properties: {
50
- source: {
51
- type: "string",
52
- description: "Raw theme.json text or fenced JSON",
53
- },
54
- },
55
- required: ["source"],
56
- additionalProperties: false,
57
- },
58
- },
59
- {
60
- name: "theme_schema",
61
- description: "Return the active shads theme document schema id",
62
- inputSchema: {
63
- type: "object",
64
- properties: {},
65
- additionalProperties: false,
66
- },
67
- },
68
- {
69
- name: "list_starters",
70
- description: "List all shads starter themes with registry install URLs for agents",
71
- inputSchema: {
72
- type: "object",
73
- properties: {},
74
- additionalProperties: false,
75
- },
76
- },
77
- {
78
- name: "get_install_prompt",
79
- description: "Return a copyable agent install prompt for a starter, share id, or registry URL",
80
- inputSchema: {
81
- type: "object",
82
- properties: {
83
- item: {
84
- type: "string",
85
- description: "Starter id (workspace), theme item id, share id, or full registry URL",
86
- },
87
- mode: {
88
- type: "string",
89
- enum: ["existing", "new", "both"],
90
- description: "Which install commands to include (default both)",
91
- },
92
- },
93
- required: ["item"],
94
- additionalProperties: false,
95
- },
96
- },
97
- {
98
- name: "resolve_share",
99
- description: "Resolve a share or registry item URL and return title plus install prompt",
100
- inputSchema: {
101
- type: "object",
102
- properties: {
103
- item: {
104
- type: "string",
105
- description: "Share id, theme item id, or registry URL",
106
- },
107
- },
108
- required: ["item"],
109
- additionalProperties: false,
110
- },
111
- },
112
- {
113
- name: "get_theme_package",
114
- description: "Fetch a full theme package: registry theme, theme skill markdown, and install URLs",
115
- inputSchema: {
116
- type: "object",
117
- properties: {
118
- id: {
119
- type: "string",
120
- description: "Starter id (workspace), theme item id, share id, or registry URL",
121
- },
122
- },
123
- required: ["id"],
124
- additionalProperties: false,
125
- },
126
- },
127
- {
128
- name: "get_skill",
129
- description: "Return the theme-specific skill markdown for a starter or share",
130
- inputSchema: {
131
- type: "object",
132
- properties: {
133
- id: {
134
- type: "string",
135
- description: "Starter id, theme item id, share id, or registry URL",
136
- },
137
- },
138
- required: ["id"],
139
- additionalProperties: false,
140
- },
141
- },
142
- {
143
- name: "install_plan",
144
- description: "Ordered shell commands to install a theme into a new or existing project",
145
- inputSchema: {
146
- type: "object",
147
- properties: {
148
- id: {
149
- type: "string",
150
- description: "Starter id, theme item id, share id, or registry URL",
151
- },
152
- mode: {
153
- type: "string",
154
- enum: ["new", "existing"],
155
- description: "Install target (default existing)",
156
- },
157
- },
158
- required: ["id"],
159
- additionalProperties: false,
160
- },
161
- },
162
- ];
163
- if (hasApiKeyConfigured()) {
164
- tools.push(...PREMIUM_TOOL_DEFINITIONS);
2
+ console.error(`
3
+ [@shadsapp/mcp] DEPRECATION NOTICE
4
+ ================================================================================
5
+ The @shadsapp/mcp npm package is deprecated in favor of our zero-install
6
+ remote HTTP MCP server at:
7
+
8
+ https://mcp.shads.app
9
+
10
+ Please update your MCP client configuration (Cursor, Claude Desktop, VS Code,
11
+ Windsurf, Zed, etc.) to connect directly to the HTTP endpoint:
12
+
13
+ {
14
+ "mcpServers": {
15
+ "shads": {
16
+ "url": "https://mcp.shads.app"
165
17
  }
166
- else {
167
- tools.push(AUTHENTICATE_TOOL);
168
- }
169
- return { tools };
170
- });
171
- const REGISTRY_FETCH_TIMEOUT_MS = 10_000;
172
- async function fetchRegistryItem(itemId) {
173
- try {
174
- const response = await fetch(`${REGISTRY_HOMEPAGE}/r/${itemId}.json`, {
175
- headers: { Accept: "application/json" },
176
- signal: AbortSignal.timeout(REGISTRY_FETCH_TIMEOUT_MS),
177
- });
178
- if (!response.ok) {
179
- return null;
180
- }
181
- return (await response.json());
182
- }
183
- catch {
184
- return null;
185
- }
186
- }
187
- function skillMarkdownFromItem(item) {
188
- const skillFile = item.files?.find((file) => file.target?.endsWith("SKILL.md"));
189
- return skillFile?.content ?? null;
18
+ }
190
19
  }
191
- server.setRequestHandler(CallToolRequestSchema, async (request) => {
192
- switch (request.params.name) {
193
- case "list_themes": {
194
- return {
195
- content: [
196
- {
197
- type: "text",
198
- text: JSON.stringify(listThemes(), null, 2),
199
- },
200
- ],
201
- };
202
- }
203
- case "get_theme": {
204
- const id = String(request.params.arguments?.id ?? "");
205
- const bundle = getTheme(id);
206
- return {
207
- content: [
208
- {
209
- type: "text",
210
- text: JSON.stringify({
211
- id: bundle.id,
212
- meta: bundle.meta,
213
- theme: bundle.theme,
214
- themeCss: bundle.themeCss,
215
- }, null, 2),
216
- },
217
- ],
218
- };
219
- }
220
- case "validate_theme": {
221
- const source = String(request.params.arguments?.source ?? "");
222
- const result = parseThemeDocumentInput(source);
223
- return {
224
- content: [
225
- {
226
- type: "text",
227
- text: JSON.stringify(result, null, 2),
228
- },
229
- ],
230
- };
231
- }
232
- case "theme_schema": {
233
- return {
234
- content: [
235
- {
236
- type: "text",
237
- text: THEME_SCHEMA,
238
- },
239
- ],
240
- };
241
- }
242
- case "list_starters": {
243
- return {
244
- content: [
245
- {
246
- type: "text",
247
- text: JSON.stringify(listStarterInstallEntries(), null, 2),
248
- },
249
- ],
250
- };
251
- }
252
- case "get_install_prompt": {
253
- const item = String(request.params.arguments?.item ?? "");
254
- const mode = request.params.arguments?.mode;
255
- const itemId = resolveSafeItemId(item);
256
- const prompt = buildAgentInstallPrompt({ itemId, mode });
257
- return {
258
- content: [
259
- {
260
- type: "text",
261
- text: prompt,
262
- },
263
- ],
264
- };
265
- }
266
- case "resolve_share": {
267
- const item = String(request.params.arguments?.item ?? "");
268
- const itemId = resolveSafeItemId(item);
269
- const registryItem = await fetchRegistryItem(itemId);
270
- if (!registryItem) {
271
- return {
272
- content: [
273
- {
274
- type: "text",
275
- text: JSON.stringify({
276
- error: "Registry item not found",
277
- itemId,
278
- }, null, 2),
279
- },
280
- ],
281
- isError: true,
282
- };
283
- }
284
- const prompt = buildAgentInstallPrompt({
285
- itemId,
286
- title: registryItem.title ?? registryItem.name,
287
- });
288
- return {
289
- content: [
290
- {
291
- type: "text",
292
- text: JSON.stringify({
293
- itemId,
294
- title: registryItem.title ?? registryItem.name ?? itemId,
295
- prompt,
296
- }, null, 2),
297
- },
298
- ],
299
- };
300
- }
301
- case "get_theme_package": {
302
- const id = String(request.params.arguments?.id ?? "");
303
- const itemId = resolveSafeItemId(id);
304
- const themeItem = await fetchRegistryItem(itemId);
305
- if (!themeItem) {
306
- return {
307
- content: [
308
- {
309
- type: "text",
310
- text: JSON.stringify({ error: "Registry item not found", itemId }, null, 2),
311
- },
312
- ],
313
- isError: true,
314
- };
315
- }
316
- const skillItemId = systemSkillItemId(itemId);
317
- const skillItem = await fetchRegistryItem(skillItemId);
318
- const skillMarkdown = skillItem
319
- ? skillMarkdownFromItem(skillItem)
320
- : null;
321
- return {
322
- content: [
323
- {
324
- type: "text",
325
- text: JSON.stringify({
326
- itemId,
327
- title: themeItem.title ?? themeItem.name ?? itemId,
328
- themeUrl: `${REGISTRY_HOMEPAGE}/r/${itemId}.json`,
329
- skillItemId,
330
- skillUrl: `${REGISTRY_HOMEPAGE}/r/${skillItemId}.json`,
331
- skillMarkdown,
332
- registryDependencies: themeItem.registryDependencies ?? [],
333
- installPrompt: buildAgentInstallPrompt({
334
- itemId,
335
- title: themeItem.title ?? themeItem.name,
336
- }),
337
- installPlan: buildInstallPlan({
338
- itemId,
339
- title: themeItem.title ?? themeItem.name,
340
- mode: "existing",
341
- }),
342
- }, null, 2),
343
- },
344
- ],
345
- };
346
- }
347
- case "get_skill": {
348
- const id = String(request.params.arguments?.id ?? "");
349
- const itemId = resolveSafeItemId(id);
350
- const skillItemId = itemId.endsWith("-skill")
351
- ? itemId
352
- : systemSkillItemId(itemId);
353
- const skillItem = await fetchRegistryItem(skillItemId);
354
- if (!skillItem) {
355
- return {
356
- content: [
357
- {
358
- type: "text",
359
- text: JSON.stringify({ error: "Theme skill not found", skillItemId }, null, 2),
360
- },
361
- ],
362
- isError: true,
363
- };
364
- }
365
- const markdown = skillMarkdownFromItem(skillItem);
366
- return {
367
- content: [
368
- {
369
- type: "text",
370
- text: markdown ??
371
- JSON.stringify({ error: "Skill markdown missing", skillItemId }, null, 2),
372
- },
373
- ],
374
- isError: !markdown,
375
- };
376
- }
377
- case "install_plan": {
378
- const id = String(request.params.arguments?.id ?? "");
379
- const mode = request.params.arguments?.mode === "new" ? "new" : "existing";
380
- const itemId = resolveSafeItemId(id);
381
- const registryItem = await fetchRegistryItem(itemId);
382
- if (!registryItem) {
383
- return {
384
- content: [
385
- {
386
- type: "text",
387
- text: JSON.stringify({ error: "Registry item not found", itemId }, null, 2),
388
- },
389
- ],
390
- isError: true,
391
- };
392
- }
393
- const plan = buildInstallPlan({
394
- itemId,
395
- mode,
396
- title: registryItem?.title ?? registryItem?.name,
397
- });
398
- return {
399
- content: [
400
- {
401
- type: "text",
402
- text: JSON.stringify({
403
- itemId,
404
- mode,
405
- ...plan,
406
- prompt: buildAgentInstallPrompt({
407
- itemId,
408
- mode: mode === "new" ? "new" : "existing",
409
- title: registryItem?.title ?? registryItem?.name,
410
- }),
411
- }, null, 2),
412
- },
413
- ],
414
- };
415
- }
416
- case "authenticate": {
417
- // Guidance, not a failure: the agent asked how to connect, and this is
418
- // the answer. isError is reserved for genuinely broken calls.
419
- return {
420
- content: [{ type: "text", text: AUTH_SETUP_MESSAGE }],
421
- };
422
- }
423
- case "list_my_themes": {
424
- return premiumCall(() => listMyThemes().then((items) => ({ items })));
425
- }
426
- case "get_my_theme": {
427
- const id = String(request.params.arguments?.id ?? "");
428
- if (!id) {
429
- return textResult({ error: "Theme id is required" }, true);
430
- }
431
- return premiumCall(() => getMyTheme(id));
432
- }
433
- case "save_theme": {
434
- const name = String(request.params.arguments?.name ?? "").trim();
435
- const source = String(request.params.arguments?.document ?? "");
436
- const parsed = parseThemeConfigDocument(source);
437
- if (!parsed.ok) {
438
- return textResult({ errors: parsed.errors }, true);
439
- }
440
- if (!name) {
441
- return textResult({ error: "Theme name is required" }, true);
442
- }
443
- return premiumCall(() => saveTheme(name, parsed.config));
444
- }
445
- case "update_theme": {
446
- const id = String(request.params.arguments?.id ?? "");
447
- if (!id) {
448
- return textResult({ error: "Theme id is required" }, true);
449
- }
450
- const nameArg = request.params.arguments?.name;
451
- const name = typeof nameArg === "string" && nameArg.trim()
452
- ? nameArg.trim()
453
- : undefined;
454
- const source = request.params.arguments?.document;
455
- let config;
456
- if (typeof source === "string" && source.trim()) {
457
- const parsed = parseThemeConfigDocument(source);
458
- if (!parsed.ok) {
459
- return textResult({ errors: parsed.errors }, true);
460
- }
461
- config = parsed.config;
462
- }
463
- if (name === undefined && config === undefined) {
464
- return textResult({ error: "Provide a name and/or document to update" }, true);
465
- }
466
- return premiumCall(() => updateTheme(id, { name, config }));
467
- }
468
- case "generate_theme": {
469
- const description = String(request.params.arguments?.description ?? "").trim();
470
- if (description.length < DESCRIPTION_MIN_LENGTH) {
471
- return textResult({ error: `description must be at least ${DESCRIPTION_MIN_LENGTH} characters` }, true);
472
- }
473
- if (description.length > DESCRIPTION_MAX_LENGTH) {
474
- return textResult({ error: `description must be ${DESCRIPTION_MAX_LENGTH} characters or fewer` }, true);
475
- }
476
- return premiumCall(() => generateTheme(description));
477
- }
478
- case "check_subscription": {
479
- return premiumCall(() => checkSubscription());
480
- }
481
- default:
482
- throw new Error(`Unknown tool: ${request.params.name}`);
20
+
21
+ For Pro accounts with an API key:
22
+ {
23
+ "mcpServers": {
24
+ "shads": {
25
+ "url": "https://mcp.shads.app",
26
+ "headers": {
27
+ "Authorization": "Bearer YOUR_API_KEY"
28
+ }
483
29
  }
484
- });
485
- async function main() {
486
- const transport = new StdioServerTransport();
487
- await server.connect(transport);
30
+ }
488
31
  }
489
- main().catch((error) => {
490
- console.error(error);
491
- process.exit(1);
492
- });
32
+
33
+ Setup guides & documentation: https://shads.app/docs/mcp
34
+ ================================================================================
35
+ `);
36
+ process.exit(1);
37
+ export {};
493
38
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAA;AAE3C,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACxE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAEvD,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAElB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,SAAS,EACT,WAAW,GACZ,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,WAAW,EACX,UAAU,GACX,MAAM,oBAAoB,CAAA;AAE3B,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB;IACE,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,OAAO;CACjB,EACD;IACE,YAAY,EAAE;QACZ,KAAK,EAAE,EAAE;KACV;CACF,CACF,CAAA;AAED,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,EA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EAC9E,IAAI,CACL,CAAA;YACH,CAAC;YACD,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAA;QACtD,CAAC;QACD,KAAK,oBAAoB,CAAC,CAAC,CAAC;YAC1B,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC,CAAA;QAC/C,CAAC;QACD;YACE,MAAM,IAAI,KAAK,CAAC,iBAAiB,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;IAC3D,CAAC;AACH,CAAC,CAAC,CAAA;AAEF,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAA;IAC5C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;AACjC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCb,CAAC,CAAA;AAEF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@shadsapp/mcp",
3
- "version": "0.2.0",
3
+ "version": "1.0.0",
4
4
  "description": "MCP server that lets AI agents list, fetch, and validate shads.app shadcn/ui themes",
5
+ "deprecated": "The @shadsapp/mcp package is deprecated. Please migrate to the remote HTTP MCP server at https://mcp.shads.app. Docs: https://shads.app/docs/mcp",
5
6
  "type": "module",
6
7
  "license": "MIT",
7
8
  "bin": {
@@ -22,11 +23,6 @@
22
23
  "typecheck": "tsc -p tsconfig.json --noEmit",
23
24
  "test": "vitest run"
24
25
  },
25
- "dependencies": {
26
- "@modelcontextprotocol/sdk": "^1.17.5",
27
- "@shadsapp/schema": "0.1.2",
28
- "@shadsapp/themes": "0.1.3"
29
- },
30
26
  "devDependencies": {
31
27
  "vitest": "^5.0.0"
32
28
  },