miromiro-mcp 0.2.0 → 0.2.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.
Files changed (3) hide show
  1. package/README.md +58 -17
  2. package/package.json +10 -2
  3. package/src/index.mjs +2 -2
package/README.md CHANGED
@@ -1,11 +1,30 @@
1
1
  # miromiro-mcp
2
2
 
3
- MCP server for the [MiroMiro](https://miromiro.app/api) design-extraction API. Give your coding agent (Cursor, Claude Code, Windsurf) the real design of any website — code, tokens, assets, SVGs, fonts, and Lottie — so it builds UI in that style instead of guessing.
3
+ [![npm version](https://img.shields.io/npm/v/miromiro-mcp)](https://www.npmjs.com/package/miromiro-mcp)
4
+ [![MIT license](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)
4
5
 
5
- ## Setup
6
+ MCP server for the [MiroMiro](https://miromiro.app/api) design-extraction API. Give your AI agent the real design of any live website - brand colors, fonts, design tokens, SVGs, images, Lottie animations, and paste-ready component code - so it builds from actual values instead of guessing from a screenshot.
6
7
 
7
- 1. Get a free API key (100 credits/month, no card) at **https://miromiro.app/api/dashboard**.
8
- 2. Add the server to your agent's MCP config:
8
+ Works with Claude (web, desktop, Claude Code), ChatGPT, Cursor, Windsurf, Codex, and any MCP client.
9
+
10
+ ## Quick start: remote server (nothing to install)
11
+
12
+ A hosted server lives at:
13
+
14
+ ```
15
+ https://miromiro.app/mcp
16
+ ```
17
+
18
+ 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).
19
+
20
+ - **Claude (web or desktop):** Settings → Connectors → Add custom connector → paste the URL. Or use the [one-click install](https://miromiro.app/api/mcp).
21
+ - **ChatGPT:** Settings → Security and login → enable Developer mode, then add the URL as a connector (authentication: OAuth).
22
+ - **Cursor (remote):** add `{ "mcpServers": { "miromiro": { "url": "https://miromiro.app/mcp" } } }` to `~/.cursor/mcp.json`.
23
+ - **Raw API key instead of OAuth:** append `?access_key=mm_live_...` to the URL, or send it as an `Authorization: Bearer` header.
24
+
25
+ ## Local server (npm)
26
+
27
+ Prefer a local stdio process with the key in an env var? Get a free key at [miromiro.app/api/dashboard](https://miromiro.app/api/dashboard), then:
9
28
 
10
29
  **Cursor** (`~/.cursor/mcp.json`) / **Windsurf** (Settings → MCP):
11
30
 
@@ -33,24 +52,46 @@ claude mcp add miromiro -s user \
33
52
 
34
53
  | Tool | What it returns | Credits |
35
54
  |---|---|---|
36
- | `extract_code` | A section of a live page as a paste-ready component (Tailwind, HTML+CSS, JSX or Vue) + the tokens it uses — start here to rebuild real UI | 25 |
37
- | `extract_brand` | Named color roles (primary/accent/background/text), palette, fonts, logo | 15 |
38
- | `extract_design_tokens` | Full token system; `format: css` or `tailwind` for paste-ready output | 10 |
39
- | `extract_fonts` | Font files & families the site loads | 5 |
40
- | `extract_lottie` | Lottie animations declared in the page | 3 |
41
- | `extract_svgs` | Inline SVG code + SVG files | 1 |
42
- | `extract_assets` | Every image URL on a page | 1 |
55
+ | `extract_code` | A section of a live page as a paste-ready component (Tailwind, HTML+CSS, JSX or Vue) plus the tokens it uses - start here to rebuild real UI | 25 |
56
+ | `extract_brand` | Named color roles (primary/accent/background/text), palette, fonts split by role, logo, social profiles, and a 0-1 confidence score | 15 |
57
+ | `extract_design_tokens` | Full token system with usage counts; `format: css` or `tailwind` for paste-ready output | 10 |
58
+ | `extract_fonts` | Every font file and family the site loads, with weights, formats, and file URLs | 5 |
59
+ | `extract_lottie` | Lottie animation JSON files declared in the page | 3 |
60
+ | `extract_svgs` | Inline SVG code (sanitized, paste-ready) plus external SVG file URLs | 1 |
61
+ | `extract_assets` | Every image URL on a page, tagged by source, with alt text | 1 |
62
+
63
+ All tools are read-only and retry-safe. Identical calls within 24 hours are served from cache for free, and failed calls are never billed.
43
64
 
44
- ## Example
65
+ ### Controlling output size (remote server)
66
+
67
+ Remote results are trimmed by default so a big page cannot flood the chat context, and every trimmed response says exactly what was dropped. Two optional arguments loosen it per call:
68
+
69
+ - `limit` (up to 200) - raise the item cap: "give me 80 SVGs, not 20"
70
+ - `full_output: true` - complete long strings, like entire inline SVG markup
71
+
72
+ The REST API and this local npm server always return everything untrimmed.
73
+
74
+ ## Examples
45
75
 
46
76
  > "Rebuild stripe.com's pricing section in React"
47
77
 
48
- The agent calls `extract_code` with the URL → gets the section's real markup, colors, fonts and spacing → adapts actual values instead of guessing from a screenshot.
78
+ 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.
79
+
80
+ > "Build a dashboard in the style of linear.app"
81
+
82
+ The agent calls `extract_brand` and `extract_design_tokens`, gets Linear's real colors, fonts, and spacing scale, and builds to match.
83
+
84
+ > "What fonts does apple.com use?"
85
+
86
+ The agent calls `extract_fonts` and returns every family with its font file URLs and weights.
87
+
88
+ ## Notes
49
89
 
50
- > "Build a pricing section in the style of linear.app"
90
+ - The API reads static HTML and resolves the full CSS cascade. It does not execute JavaScript, so a fully client-rendered app may return little for images and Lottie (tokens, fonts, brand, and code come from CSS and are unaffected).
91
+ - Respect the sites you extract from: check their terms before reusing assets commercially.
51
92
 
52
- The agent calls `extract_brand` → gets Linear's real colors and fonts → builds the section matching them.
93
+ ## Links
53
94
 
54
- ## Credits
95
+ [API docs](https://miromiro.app/api/docs) · [Playground (no account)](https://miromiro.app/api/demo) · [Pricing](https://miromiro.app/api/pricing) · [Changelog](https://miromiro.app/api/changelog) · [Connect page](https://miromiro.app/api/mcp)
55
96
 
56
- Weighted per endpoint (see table above). Cached and failed calls are free. Full reference: [docs](https://miromiro.app/api/docs) · [pricing](https://miromiro.app/api/pricing).
97
+ MIT © [MiroMiro](https://miromiro.app)
package/package.json CHANGED
@@ -1,11 +1,16 @@
1
1
  {
2
2
  "name": "miromiro-mcp",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
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
+ "mcpName": "app.miromiro/miromiro",
5
6
  "type": "module",
6
7
  "author": "MiroMiro (https://miromiro.app)",
7
8
  "homepage": "https://miromiro.app/api",
8
- "bugs": { "url": "https://miromiro.app/api/docs/errors" },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/SoraiaBarroso/miromiro-mcp.git"
12
+ },
13
+ "bugs": { "url": "https://github.com/SoraiaBarroso/miromiro-mcp/issues" },
9
14
  "bin": {
10
15
  "miromiro-mcp": "src/index.mjs"
11
16
  },
@@ -15,8 +20,11 @@
15
20
  "keywords": [
16
21
  "mcp",
17
22
  "model-context-protocol",
23
+ "mcp-server",
18
24
  "design-tokens",
19
25
  "design-to-code",
26
+ "brand-colors",
27
+ "web-scraping",
20
28
  "miromiro",
21
29
  "cursor",
22
30
  "claude-code",
package/src/index.mjs CHANGED
@@ -57,7 +57,7 @@ const TOOLS = [
57
57
  title: 'Extract brand identity',
58
58
  endpoint: 'brand',
59
59
  description:
60
- "Get a website's curated brand identity: named color roles (primary, accent, background, text), the brand palette, primary fonts, logo, and social image. Use this when you only need a site's STYLE (colors/fonts) rather than its code — to build new UI 'in the style of' a reference site. If you need the actual markup of a section, use extract_code instead.",
60
+ "Get a website's curated brand identity: color roles (primary, accent, background, text) read from the site's own CSS variables and logo — each as hex plus a human-readable name like 'Royal Blue' — dark/light theme detection, the brand palette, fonts split by role (primary/mono), logo, social image, the brand's social profiles (X, GitHub, LinkedIn, …), and a 0-1 confidence score for how much the site declared vs how much was inferred. Use this when you only need a site's STYLE (colors/fonts) rather than its code — to build new UI 'in the style of' a reference site. If you need the actual markup of a section, use extract_code instead.",
61
61
  inputSchema: {
62
62
  type: 'object',
63
63
  properties: { url: { type: 'string', description: 'The website URL, e.g. stripe.com' } },
@@ -157,7 +157,7 @@ async function callApi(endpoint, args) {
157
157
  }
158
158
 
159
159
  const server = new Server(
160
- { name: 'miromiro', version: '0.2.0' },
160
+ { name: 'miromiro', version: '0.2.1' },
161
161
  { capabilities: { tools: {} } }
162
162
  )
163
163