@spronta/mcp 0.1.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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +99 -0
  3. package/package.json +50 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Spronta
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 ADDED
@@ -0,0 +1,99 @@
1
+ # @spronta/mcp
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.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g @spronta/mcp
9
+ ```
10
+
11
+ Or use directly with `npx`:
12
+
13
+ ```bash
14
+ npx @spronta/mcp
15
+ ```
16
+
17
+ ## Setup
18
+
19
+ ### Claude Code
20
+
21
+ ```bash
22
+ claude mcp add spronta -e SPRONTA_API_KEY=spronta_img_... -e SPRONTA_PROJECT_ID=your-project-id -- npx @spronta/mcp
23
+ ```
24
+
25
+ ### Claude Desktop / Cursor
26
+
27
+ Add to your MCP config:
28
+
29
+ ```json
30
+ {
31
+ "mcpServers": {
32
+ "spronta": {
33
+ "command": "npx",
34
+ "args": ["@spronta/mcp"],
35
+ "env": {
36
+ "SPRONTA_API_KEY": "spronta_img_...",
37
+ "SPRONTA_PROJECT_ID": "your-project-id"
38
+ }
39
+ }
40
+ }
41
+ }
42
+ ```
43
+
44
+ ## Environment variables
45
+
46
+ | Variable | Required | Description |
47
+ |----------|----------|-------------|
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 |
50
+ | `SPRONTA_API_URL` | No | API base URL (default: `https://app.spronta.com/api`) |
51
+
52
+ ## Available tools
53
+
54
+ ### 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
60
+
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.
63
+
64
+ ### Images
65
+ - `list_images` — List images with pagination
66
+ - `update_image` — Update alt text and tags
67
+ - `delete_image` — Delete an image
68
+
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
74
+
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
79
+
80
+ ### Usage
81
+ - `get_usage` — Get daily metrics (requests, bandwidth, transforms)
82
+
83
+ ### Utility
84
+ - `build_cdn_url` — Build a CDN URL with transform parameters (no API call)
85
+
86
+ ## Example prompts
87
+
88
+ Once connected, you can ask your LLM:
89
+
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"
96
+
97
+ ## License
98
+
99
+ [MIT](LICENSE)
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@spronta/mcp",
3
+ "version": "0.1.0",
4
+ "description": "Spronta Image CDN — MCP server for LLM integrations",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "spronta-mcp": "./dist/index.js"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "scripts": {
21
+ "build": "tsc",
22
+ "dev": "tsc --watch",
23
+ "typecheck": "tsc --noEmit"
24
+ },
25
+ "license": "MIT",
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/spronta/mcp.git"
32
+ },
33
+ "homepage": "https://www.spronta.com",
34
+ "keywords": [
35
+ "mcp",
36
+ "model-context-protocol",
37
+ "spronta",
38
+ "image-cdn",
39
+ "image-optimization",
40
+ "ai",
41
+ "llm"
42
+ ],
43
+ "dependencies": {
44
+ "@modelcontextprotocol/sdk": "^1.27.0"
45
+ },
46
+ "devDependencies": {
47
+ "@types/node": "^22",
48
+ "typescript": "^5.9.3"
49
+ }
50
+ }