@spronta/mcp 0.1.1 → 0.1.2

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 (2) hide show
  1. package/README.md +127 -46
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -1,30 +1,41 @@
1
1
  # @spronta/mcp
2
2
 
3
- MCP server for the [Spronta](https://www.spronta.com) Image CDN. Lets LLMs manage image projects, upload images, create presets, generate signed URLs, and more.
3
+ MCP server for uploading, transforming, and serving images on a global CDN directly from AI assistants.
4
4
 
5
- ## Install
5
+ Connect Claude, GPT, Cursor, Windsurf, or any [MCP](https://modelcontextprotocol.io)-compatible client to the [Spronta](https://www.spronta.com) Image CDN. Upload images from URLs or base64, apply real-time transforms (resize, crop, format conversion, smart crop, blurhash), create reusable presets, generate signed URLs, and monitor usage — all through natural language.
6
6
 
7
- ```bash
8
- npm install -g @spronta/mcp
9
- ```
7
+ ## Why use this?
8
+
9
+ - **Upload images from AI** — give your LLM an image URL and it uploads, optimizes, and returns a CDN link
10
+ - **Real-time transforms** — resize, crop, convert to WebP/AVIF/JXL, smart crop with face detection
11
+ - **Global CDN delivery** — images served from edge locations worldwide
12
+ - **Blurhash generation** — automatic blur placeholders computed on upload
13
+ - **Signed URLs** — HMAC-SHA256 signed URLs with expiration for private images
14
+ - **Named presets** — create reusable transform configurations (e.g. `thumbnail`, `hero`, `og-image`)
15
+ - **No vendor lock-in** — MIT licensed, open source
10
16
 
11
- Or use directly with `npx`:
17
+ ## Quick start
18
+
19
+ ### Install
12
20
 
13
21
  ```bash
22
+ npm install -g @spronta/mcp
23
+ # or use directly
14
24
  npx @spronta/mcp
15
25
  ```
16
26
 
17
- ## Setup
18
-
19
27
  ### Claude Code
20
28
 
21
29
  ```bash
22
- claude mcp add spronta -e SPRONTA_API_KEY=spronta_img_... -e SPRONTA_PROJECT_ID=your-project-id -- npx @spronta/mcp
30
+ claude mcp add spronta \
31
+ -e SPRONTA_API_KEY=spronta_img_... \
32
+ -e SPRONTA_PROJECT_ID=your-project-id \
33
+ -- npx @spronta/mcp
23
34
  ```
24
35
 
25
- ### Claude Desktop / Cursor
36
+ ### Claude Desktop / Cursor / Windsurf
26
37
 
27
- Add to your MCP config:
38
+ Add to your MCP configuration file:
28
39
 
29
40
  ```json
30
41
  {
@@ -41,58 +52,128 @@ Add to your MCP config:
41
52
  }
42
53
  ```
43
54
 
55
+ ### Get your API key
56
+
57
+ 1. Sign up at [app.spronta.com](https://app.spronta.com/sign-up) (free tier: 100 images)
58
+ 2. Create a project in the dashboard
59
+ 3. Copy your API key from project settings
60
+
44
61
  ## Environment variables
45
62
 
46
63
  | Variable | Required | Description |
47
64
  |----------|----------|-------------|
48
- | `SPRONTA_API_KEY` | Yes | Your project API key (from the Spronta dashboard) |
49
- | `SPRONTA_PROJECT_ID` | No | Default project ID can also be passed per-tool |
65
+ | `SPRONTA_API_KEY` | Yes | Your project API key |
66
+ | `SPRONTA_PROJECT_ID` | No | Default project ID (can also be passed per-tool) |
50
67
  | `SPRONTA_API_URL` | No | API base URL (default: `https://app.spronta.com/api`) |
51
68
 
52
- ## Available tools
69
+ ## 18 tools available
53
70
 
54
71
  ### Projects
55
- - `list_projects` List all image projects
56
- - `create_project` — Create a new project
57
- - `get_project` Get project details with usage stats
58
- - `update_project` Update name or custom domain
59
- - `delete_project` Permanently delete a project
72
+ | Tool | Description |
73
+ |------|-------------|
74
+ | `list_projects` | List all image projects |
75
+ | `create_project` | Create a new project |
76
+ | `get_project` | Get project details with usage stats |
77
+ | `update_project` | Update name or custom domain |
78
+ | `delete_project` | Permanently delete a project |
79
+
80
+ ### Upload & Images
81
+ | Tool | Description |
82
+ |------|-------------|
83
+ | `upload_image` | Upload from URL or base64 — handles presigned upload, blurhash generation, and CDN URL creation in one call |
84
+ | `list_images` | List images with pagination |
85
+ | `update_image` | Update alt text and tags |
86
+ | `delete_image` | Delete an image from CDN and storage |
87
+
88
+ ### Transform Presets
89
+ | Tool | Description |
90
+ |------|-------------|
91
+ | `list_presets` | List named transform presets |
92
+ | `create_preset` | Create a preset (use in CDN URLs with `?t=name`) |
93
+ | `update_preset` | Update a preset's name or transforms |
94
+ | `delete_preset` | Delete a preset |
95
+
96
+ ### URL Signing
97
+ | Tool | Description |
98
+ |------|-------------|
99
+ | `get_signing_config` | Get URL signing configuration |
100
+ | `update_signing` | Enable/disable HMAC-SHA256 signing |
101
+ | `generate_signed_url` | Generate a signed CDN URL with optional expiration |
102
+
103
+ ### Analytics & Utility
104
+ | Tool | Description |
105
+ |------|-------------|
106
+ | `get_usage` | Get daily metrics (requests, bandwidth, transforms) |
107
+ | `build_cdn_url` | Build a CDN URL with transform parameters (no API call) |
60
108
 
61
- ### Upload
62
- - `upload_image` — Upload an image from URL or base64. Handles the full upload flow (presigned URL → upload → confirm) and returns the CDN URL with blurhash.
109
+ ## Example prompts
63
110
 
64
- ### Images
65
- - `list_images` — List images with pagination
66
- - `update_image` — Update alt text and tags
67
- - `delete_image` — Delete an image
111
+ Once connected, just ask your AI:
68
112
 
69
- ### Presets
70
- - `list_presets` List named transform presets
71
- - `create_preset` — Create a preset (use in URLs with `?t=name`)
72
- - `update_preset` — Update a preset
73
- - `delete_preset` — Delete a preset
113
+ ```
114
+ > Upload this image to my project: https://example.com/photo.jpg
74
115
 
75
- ### Signing
76
- - `get_signing_config` — Get URL signing configuration
77
- - `update_signing` — Enable/disable signing
78
- - `generate_signed_url` — Generate an HMAC-SHA256 signed URL
116
+ > Create a thumbnail preset: 200x200, cover crop, face detection, webp format
79
117
 
80
- ### Usage
81
- - `get_usage` — Get daily metrics (requests, bandwidth, transforms)
118
+ > How many requests did my project handle this week?
82
119
 
83
- ### Utility
84
- - `build_cdn_url` — Build a CDN URL with transform parameters (no API call)
120
+ > Generate a signed URL for hero.jpg that expires in 1 hour
85
121
 
86
- ## Example prompts
122
+ > List all my images and update the alt text on the product shots
87
123
 
88
- Once connected, you can ask your LLM:
124
+ > Build a CDN URL for banner.png at 1200px wide in avif format
125
+ ```
89
126
 
90
- - "List my Spronta projects"
91
- - "Upload this image to my project: https://example.com/photo.jpg"
92
- - "Create a thumbnail preset: 200x200, cover, face gravity, webp"
93
- - "How many requests did my project get this week?"
94
- - "Generate a signed URL for hero.jpg that expires in 1 hour"
95
- - "Build a CDN URL for photo.jpg at 800px wide in webp format"
127
+ ## Transform options
128
+
129
+ When creating presets or building URLs, these transforms are available:
130
+
131
+ | Parameter | Type | Description |
132
+ |-----------|------|-------------|
133
+ | `width` | integer | Output width (1–8192) |
134
+ | `height` | integer | Output height (1–8192) |
135
+ | `fit` | string | `cover`, `contain`, `fill`, `scale-down`, `crop`, `pad` |
136
+ | `format` | string | `auto`, `webp`, `avif`, `jpeg`, `png`, `jxl` |
137
+ | `quality` | integer | 1–100 |
138
+ | `qualityMode` | string | `high`, `medium`, `low` (perceptual targeting) |
139
+ | `gravity` | string | `auto`, `face`, `center`, position keywords |
140
+ | `blur` | integer | Gaussian blur (1–250) |
141
+ | `sharpen` | number | Unsharp mask (0–10) |
142
+ | `radius` | integer | Corner radius (1–9999, or "max" for circle) |
143
+ | `grayscale` | boolean | Convert to grayscale |
144
+ | `brightness` | integer | -100 to 100 |
145
+ | `contrast` | number | -100 to 100 |
146
+ | `saturation` | integer | -100 to 100 |
147
+ | `sepia` | boolean | Sepia tone filter |
148
+ | `rotate` | integer | 90, 180, 270 |
149
+ | `flip` | string | `h` (horizontal), `v` (vertical) |
150
+
151
+ ## How upload works
152
+
153
+ The `upload_image` tool handles the full upload pipeline in a single call:
154
+
155
+ 1. You provide an image URL (or base64 data) and a filename
156
+ 2. The server fetches the image
157
+ 3. Requests a presigned upload URL from Spronta
158
+ 4. Uploads the file directly to storage
159
+ 5. Confirms the upload — Spronta computes the blurhash and detects dimensions
160
+ 6. Returns the confirmed image with CDN URL, blurhash, and metadata
161
+
162
+ ## Related packages
163
+
164
+ - [`@spronta/images`](https://www.npmjs.com/package/@spronta/images) — Core URL builder SDK (zero deps)
165
+ - [`@spronta/images-react`](https://www.npmjs.com/package/@spronta/images-react) — React components
166
+ - [`@spronta/images-next`](https://www.npmjs.com/package/@spronta/images-next) — Next.js integration
167
+ - [WordPress plugin](https://github.com/spronta/wordpress-plugin) — Automatic CDN for WordPress
168
+
169
+ ## Links
170
+
171
+ - [Website](https://www.spronta.com)
172
+ - [Documentation](https://www.spronta.com/docs)
173
+ - [API Reference](https://www.spronta.com/docs/api)
174
+ - [OpenAPI Spec](https://www.spronta.com/openapi.yaml)
175
+ - [GitHub](https://github.com/spronta/mcp)
176
+ - [npm](https://www.npmjs.com/package/@spronta/mcp)
96
177
 
97
178
  ## License
98
179
 
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@spronta/mcp",
3
- "version": "0.1.1",
4
- "description": "Spronta Image CDN — MCP server for LLM integrations",
3
+ "version": "0.1.2",
4
+ "description": "Spronta Image CDN — MCP server for LLM integrations. Upload, transform, and deliver images via AI agents.",
5
+ "mcpName": "io.github.spronta/images",
5
6
  "type": "module",
6
7
  "main": "./dist/index.js",
7
8
  "types": "./dist/index.d.ts",