miromiro-mcp 0.4.0 → 0.5.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
@@ -18,7 +18,7 @@ claude plugin install miromiro@claude-community
18
18
  ```
19
19
 
20
20
  The plugin uses the remote server, so there is nothing to install and no key to paste - on
21
- first use it opens a one-click MiroMiro sign-in that links a free account (100 credits/month,
21
+ first use it opens a one-click MiroMiro sign-in that links a free account (300 credits/month,
22
22
  no card).
23
23
 
24
24
  ## Quick start: remote server (nothing to install)
@@ -29,7 +29,7 @@ A hosted server lives at:
29
29
  https://miromiro.app/mcp
30
30
  ```
31
31
 
32
- Paste that URL into any client that accepts a remote MCP server. On first use it opens a one-click MiroMiro sign-in that links a free account (100 credits/month, no card).
32
+ Paste that URL into any client that accepts a remote MCP server. On first use it opens a one-click MiroMiro sign-in that links a free account (300 credits/month, no card).
33
33
 
34
34
  - **Claude (web or desktop):** Settings → Connectors → Add custom connector → paste the URL. Or use the [one-click install](https://miromiro.app/api/mcp).
35
35
  - **ChatGPT:** Settings → Security and login → enable Developer mode, then add the URL as a connector (authentication: OAuth).
@@ -90,7 +90,7 @@ The REST API and this local npm server always return everything untrimmed, so `l
90
90
  `render: true`, plus two more shared arguments:
91
91
 
92
92
  - `fresh: true` - skip the 24-hour cache and re-extract the live page (charged normally); use when the site just changed
93
- - `screenshot: true` (requires `render: true`) - the result gains a `screenshot` field: a public URL of a 1440x900 capture of the page, live for 7 days, at no extra credits - show it to the user to verify an extraction
93
+ - `screenshot: true` (requires `render: true`) - the result gains a `screenshot` field: a public URL of a 1440x900 capture of the page, live for 7 days, at no extra credits - show it to the user to verify an extraction. Pass `'full'` instead of `true` for the entire page height.
94
94
 
95
95
  ## Examples
96
96
 
@@ -98,6 +98,12 @@ The REST API and this local npm server always return everything untrimmed, so `l
98
98
 
99
99
  The agent calls `extract_code` with the URL, gets the section's real markup, colors, fonts, and spacing, and adapts actual values instead of guessing.
100
100
 
101
+ Extraction returns a page's light styles by default, so a site you know as dark comes back light unless you ask otherwise:
102
+
103
+ > "Rebuild linear.app's pricing card in its dark theme"
104
+
105
+ The agent passes `theme: "dark"` and the page's `prefers-color-scheme: dark` rules and custom properties become the component itself. Every result also carries a `theme` field saying which one you actually got. Sites that switch themes with a JavaScript class toggle cannot be selected this way - you get the page default plus a hint saying so.
106
+
101
107
  > "Build a dashboard in the style of linear.app"
102
108
 
103
109
  The agent calls `extract_brand` and `extract_design_tokens`, gets Linear's real colors, fonts, and spacing scale, and builds to match.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "miromiro-mcp",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "MCP server for the MiroMiro design-extraction API — give your coding agent the real code, design tokens, assets, SVGs, fonts, and Lottie of any website.",
5
5
  "mcpName": "app.miromiro/miromiro",
6
6
  "type": "module",
package/src/index.mjs CHANGED
@@ -50,8 +50,8 @@ const FRESH_ARG = {
50
50
 
51
51
  // Shared input arg: a screenshot URL alongside the data (requires render=true).
52
52
  const SCREENSHOT_ARG = {
53
- type: 'boolean',
54
- description: 'Requires render=true. Adds a screenshot field to the result: a public URL of a 1440x900 capture of the page (live 7 days), taken by the same browser that rendered it. No extra credits beyond the render surcharge. Useful for showing the user what the extracted site looks like.'
53
+ type: ['boolean', 'string'],
54
+ description: "Requires render=true. Adds a screenshot field to the result: a public URL of a capture of the page (live 7 days), taken by the same browser that rendered it. Pass true for the 1440x900 viewport or 'full' for the entire page height. No extra credits beyond the render surcharge. Useful for showing the user what the extracted site looks like."
55
55
  }
56
56
 
57
57
  const TOOLS = [
@@ -60,14 +60,15 @@ const TOOLS = [
60
60
  title: 'Extract section as code',
61
61
  endpoint: 'code',
62
62
  description:
63
- "Turn a section of a LIVE website into clean, paste-ready component code. Give it a URL and (optionally) a CSS selector; it resolves the page's real CSS cascade and returns a self-contained component in Tailwind, plain HTML+CSS, React (JSX) or Vue — plus the design tokens that section actually uses. The response also includes `sections`: every extractable section on the page with a human-readable label and a ready selector — when the user wants a specific part (pricing, footer, testimonials), find it there and call again with that selector. For jsx/vue, repeated structures (pricing tiers, testimonial cards, feature lists) are collapsed into a data array rendered with .map()/v-for - one template plus the data, like a human would write it. The section's ::before/::after decorations come back as real elements, dark-mode styles as dark: variants, and its @keyframes ship in the css field. USE THIS whenever the user asks to rebuild, clone, port, or copy a section of a real website: it returns the actual code with true colors, fonts, spacing and copy, so you adapt real values instead of guessing from a screenshot. Note: it reads static HTML/CSS by default - summary.styledCoverage (0-100) tells you how much styling resolved, and a client-rendered app that returns little includes a hint field saying to call again with render=true (+5 credits). Follow it.",
63
+ "Turn a section of a LIVE website into clean, paste-ready component code. Give it a URL and (optionally) a CSS selector; it resolves the page's real CSS cascade and returns a self-contained component in Tailwind, plain HTML+CSS, React (JSX) or Vue — plus the design tokens that section actually uses. The response also includes `sections`: every extractable section on the page with a human-readable label and a ready selector — when the user wants a specific part (pricing, footer, testimonials), find it there and call again with that selector. For jsx/vue, repeated structures (pricing tiers, testimonial cards, feature lists) are collapsed into a data array rendered with .map()/v-for - one template plus the data, like a human would write it. The section's ::before/::after decorations come back as real elements, dark-mode styles as dark: variants, and its @keyframes ship in the css field. The `theme` field (light | dark) tells you which theme the returned code actually is - measured from the page, never echoed back from your request. A site that expresses its themes through a prefers-color-scheme media query returns its LIGHT branch by default, so pass theme='dark' when the user is looking at that site in dark mode or asks for its dark version; sites that scope themes to a root attribute or class are read correctly either way. Say which theme you returned. USE THIS whenever the user asks to rebuild, clone, port, or copy a section of a real website: it returns the actual code with true colors, fonts, spacing and copy, so you adapt real values instead of guessing from a screenshot. Note: it reads static HTML/CSS by default - summary.styledCoverage (0-100) tells you how much styling resolved, and a client-rendered app that returns little includes a hint field saying to call again with render=true (+5 credits). Follow it.",
64
64
  inputSchema: {
65
65
  type: 'object',
66
66
  properties: {
67
67
  url: { type: 'string', description: 'The website URL, e.g. stripe.com' },
68
68
  selector: { type: 'string', description: 'CSS selector for the section to extract, e.g. "#hero" or ".pricing-card". Omit to auto-detect the hero.' },
69
69
  framework: { type: 'string', enum: ['tailwind', 'html', 'jsx', 'vue'], description: 'The code to generate (default tailwind).' },
70
- name: { type: 'string', description: 'Component name for the jsx/vue targets (default ExtractedSection).' },
70
+ name: { type: 'string', description: 'Component name for the jsx target (default ExtractedSection). Ignored by tailwind, html and vue. Renaming never re-runs the extraction - it costs 0 credits on a cached section.' },
71
+ theme: { type: 'string', enum: ['light', 'dark'], description: "Which colour scheme to extract (default light). Pass 'dark' when the user is looking at the site in dark mode or asks for the dark version: the page's prefers-color-scheme: dark rules and custom properties become the component itself instead of riding along as dark: variants. Works whether the site expresses its themes as @media (prefers-color-scheme) or as a root attribute/class the CSS is scoped to ([data-theme=dark], html.dark). Sites that switch themes purely in JavaScript cannot be selected this way - you get the page default plus a hint saying so. No extra credits." },
71
72
  render: RENDER_ARG, fresh: FRESH_ARG, screenshot: SCREENSHOT_ARG
72
73
  },
73
74
  required: ['url']
@@ -90,7 +91,7 @@ const TOOLS = [
90
91
  title: 'Extract design tokens',
91
92
  endpoint: 'extract',
92
93
  description:
93
- "Extract the full design-token system of a URL: every color, font family, font size, border radius, box shadow, line height and z-index (with usage counts). Pass format='css' for a :root {} block, format='tailwind' for a tailwind.config, or format='dtcg' for a standalone W3C Design Tokens file (drops into Style Dictionary / Figma variables pipelines). Use when you need the complete token set, not just the brand summary.",
94
+ "Extract the full design-token system of a URL: every color, font family, font size, border radius, box shadow, line height and z-index (with usage counts). Pass format='css' for a :root {} block, format='tailwind' for a tailwind.config, or format='dtcg' for a standalone W3C Design Tokens file (drops into Style Dictionary / Figma variables pipelines). Use when you need the complete token set, not just the brand summary. Returns VALUES and how often each is used - not layout, spacing composition or shadow stacks, and not which value belongs to which element: if the user asked you to rebuild or clone a section, use extract_code instead, which returns the real markup with the values already in place. Counts are tallied over the whole stylesheet, so a site shipping both light and dark themes returns the union of the two (see colorSchemes) - do not assume the most-used color is the background.",
94
95
  inputSchema: {
95
96
  type: 'object',
96
97
  properties: {
@@ -204,7 +205,7 @@ async function callApi(endpoint, args) {
204
205
  }
205
206
 
206
207
  const server = new Server(
207
- { name: 'miromiro', version: '0.4.0' },
208
+ { name: 'miromiro', version: '0.5.0' },
208
209
  { capabilities: { tools: {} } }
209
210
  )
210
211