@teamflojo/floimg-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.
- package/LICENSE +21 -0
- package/README.md +171 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +988 -0
- package/dist/server.js.map +1 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Flojo, Inc.
|
|
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,171 @@
|
|
|
1
|
+
# @teamflojo/floimg-mcp
|
|
2
|
+
|
|
3
|
+
Model Context Protocol (MCP) server for [FloImg](https://floimg.com) - AI image workflow automation.
|
|
4
|
+
|
|
5
|
+
This package exposes FloImg's image generation, transformation, and saving capabilities to AI agents like Claude, GPT, and others through the [Model Context Protocol](https://modelcontextprotocol.io/).
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @teamflojo/floimg-mcp
|
|
11
|
+
# or
|
|
12
|
+
pnpm add -g @teamflojo/floimg-mcp
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### With Claude Desktop
|
|
18
|
+
|
|
19
|
+
Add to your Claude Desktop configuration (`~/.claude/claude_desktop_config.json`):
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"floimg": {
|
|
25
|
+
"command": "npx",
|
|
26
|
+
"args": ["-y", "@teamflojo/floimg-mcp"],
|
|
27
|
+
"env": {
|
|
28
|
+
"OPENAI_API_KEY": "sk-..."
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### With Claude Code
|
|
36
|
+
|
|
37
|
+
Add to your project's `.mcp.json`:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"mcpServers": {
|
|
42
|
+
"floimg": {
|
|
43
|
+
"command": "npx",
|
|
44
|
+
"args": ["-y", "@teamflojo/floimg-mcp"]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Direct Execution
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npx @teamflojo/floimg-mcp
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Available Tools
|
|
57
|
+
|
|
58
|
+
### `generate_image`
|
|
59
|
+
|
|
60
|
+
Generate any type of image with smart intent routing:
|
|
61
|
+
|
|
62
|
+
- **AI Images**: DALL-E, Stability AI, Replicate
|
|
63
|
+
- **Charts**: Bar, line, pie, radar (via QuickChart)
|
|
64
|
+
- **Diagrams**: Flowcharts, sequence diagrams (via Mermaid)
|
|
65
|
+
- **QR Codes**: Any URL or text
|
|
66
|
+
- **Screenshots**: Capture any webpage
|
|
67
|
+
- **Shapes**: SVG gradients and basic shapes
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
Intent: "golden retriever in a sunny field" → Routes to DALL-E
|
|
71
|
+
Intent: "QR code for https://floimg.com" → Routes to QR generator
|
|
72
|
+
Intent: "bar chart of sales data" → Routes to QuickChart
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### `transform_image`
|
|
76
|
+
|
|
77
|
+
Apply deterministic, pixel-precise transforms:
|
|
78
|
+
|
|
79
|
+
- `resize` - Exact dimensions
|
|
80
|
+
- `blur`, `sharpen` - Image effects
|
|
81
|
+
- `grayscale`, `modulate` - Color adjustments
|
|
82
|
+
- `addText`, `addCaption` - Text overlays
|
|
83
|
+
- `roundCorners` - Border radius
|
|
84
|
+
- `convert` - Format conversion (PNG, JPEG, WebP, AVIF)
|
|
85
|
+
|
|
86
|
+
Unlike AI regeneration, these operations modify exactly what you specify.
|
|
87
|
+
|
|
88
|
+
### `save_image`
|
|
89
|
+
|
|
90
|
+
Save to filesystem or cloud storage:
|
|
91
|
+
|
|
92
|
+
- `./output.png` → Local filesystem
|
|
93
|
+
- `s3://bucket/key.png` → Amazon S3
|
|
94
|
+
- `r2://bucket/key.png` → Cloudflare R2
|
|
95
|
+
- `tigris://bucket/key.png` → Tigris
|
|
96
|
+
|
|
97
|
+
### `run_pipeline`
|
|
98
|
+
|
|
99
|
+
Execute multi-step workflows atomically:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"steps": [
|
|
104
|
+
{ "generate": { "intent": "mountain landscape at sunset" } },
|
|
105
|
+
{ "transform": { "operation": "resize", "params": { "width": 1200, "height": 630 } } },
|
|
106
|
+
{ "transform": { "operation": "addCaption", "params": { "text": "Adventure Awaits" } } },
|
|
107
|
+
{ "save": { "destination": "s3://my-bucket/hero.png" } }
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### `analyze_image`
|
|
113
|
+
|
|
114
|
+
AI vision analysis with multiple providers:
|
|
115
|
+
|
|
116
|
+
- OpenAI GPT-4V
|
|
117
|
+
- Anthropic Claude Vision
|
|
118
|
+
- Google Gemini Vision
|
|
119
|
+
- Ollama LLaVA (local)
|
|
120
|
+
|
|
121
|
+
### `generate_text`
|
|
122
|
+
|
|
123
|
+
AI text generation for creating prompts, descriptions, and more.
|
|
124
|
+
|
|
125
|
+
## Plugin Discovery
|
|
126
|
+
|
|
127
|
+
The MCP server automatically discovers and loads installed FloImg plugins:
|
|
128
|
+
|
|
129
|
+
- `@teamflojo/floimg-quickchart` - Chart generation
|
|
130
|
+
- `@teamflojo/floimg-mermaid` - Diagram generation
|
|
131
|
+
- `@teamflojo/floimg-qr` - QR code generation
|
|
132
|
+
- `@teamflojo/floimg-d3` - Data visualization
|
|
133
|
+
- `@teamflojo/floimg-screenshot` - Web screenshots
|
|
134
|
+
- `@teamflojo/floimg-google` - Gemini AI providers
|
|
135
|
+
|
|
136
|
+
Install plugins globally for the MCP server to find them:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
npm install -g @teamflojo/floimg-quickchart @teamflojo/floimg-mermaid @teamflojo/floimg-qr
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Configuration
|
|
143
|
+
|
|
144
|
+
Configure via environment variables or `floimg.config.ts`:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# AI Providers
|
|
148
|
+
OPENAI_API_KEY=sk-...
|
|
149
|
+
GOOGLE_AI_API_KEY=...
|
|
150
|
+
ANTHROPIC_API_KEY=...
|
|
151
|
+
|
|
152
|
+
# Cloud Storage
|
|
153
|
+
AWS_ACCESS_KEY_ID=...
|
|
154
|
+
AWS_SECRET_ACCESS_KEY=...
|
|
155
|
+
AWS_REGION=us-east-1
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Requirements
|
|
159
|
+
|
|
160
|
+
- Node.js 18+
|
|
161
|
+
- `@teamflojo/floimg` (peer dependency)
|
|
162
|
+
|
|
163
|
+
## Related
|
|
164
|
+
|
|
165
|
+
- [FloImg Documentation](https://floimg.com/docs)
|
|
166
|
+
- [FloImg Studio](https://studio.floimg.com) - Visual workflow builder
|
|
167
|
+
- [Model Context Protocol](https://modelcontextprotocol.io/)
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @teamflojo/floimg-mcp
|
|
3
|
+
*
|
|
4
|
+
* Model Context Protocol server for floimg - AI image workflow automation.
|
|
5
|
+
*
|
|
6
|
+
* This package provides an MCP server that exposes floimg's image generation,
|
|
7
|
+
* transformation, and saving capabilities to AI agents (Claude, GPT, etc.).
|
|
8
|
+
*
|
|
9
|
+
* ## Usage
|
|
10
|
+
*
|
|
11
|
+
* Add to your MCP configuration:
|
|
12
|
+
*
|
|
13
|
+
* ```json
|
|
14
|
+
* {
|
|
15
|
+
* "mcpServers": {
|
|
16
|
+
* "floimg": {
|
|
17
|
+
* "command": "npx",
|
|
18
|
+
* "args": ["-y", "@teamflojo/floimg-mcp"]
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* Or run directly:
|
|
25
|
+
*
|
|
26
|
+
* ```bash
|
|
27
|
+
* npx @teamflojo/floimg-mcp
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* ## Available Tools
|
|
31
|
+
*
|
|
32
|
+
* - `generate_image` - Generate images (AI, charts, diagrams, QR codes, screenshots)
|
|
33
|
+
* - `transform_image` - Apply deterministic transforms (resize, blur, caption, etc.)
|
|
34
|
+
* - `save_image` - Save to filesystem or cloud storage (S3, R2, Tigris)
|
|
35
|
+
* - `run_pipeline` - Execute multi-step workflows atomically
|
|
36
|
+
* - `analyze_image` - AI vision analysis (GPT-4V, Claude, Gemini, Ollama)
|
|
37
|
+
* - `generate_text` - AI text generation
|
|
38
|
+
*
|
|
39
|
+
* @packageDocumentation
|
|
40
|
+
*/
|
|
41
|
+
export { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
42
|
+
export { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @teamflojo/floimg-mcp
|
|
3
|
+
*
|
|
4
|
+
* Model Context Protocol server for floimg - AI image workflow automation.
|
|
5
|
+
*
|
|
6
|
+
* This package provides an MCP server that exposes floimg's image generation,
|
|
7
|
+
* transformation, and saving capabilities to AI agents (Claude, GPT, etc.).
|
|
8
|
+
*
|
|
9
|
+
* ## Usage
|
|
10
|
+
*
|
|
11
|
+
* Add to your MCP configuration:
|
|
12
|
+
*
|
|
13
|
+
* ```json
|
|
14
|
+
* {
|
|
15
|
+
* "mcpServers": {
|
|
16
|
+
* "floimg": {
|
|
17
|
+
* "command": "npx",
|
|
18
|
+
* "args": ["-y", "@teamflojo/floimg-mcp"]
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* Or run directly:
|
|
25
|
+
*
|
|
26
|
+
* ```bash
|
|
27
|
+
* npx @teamflojo/floimg-mcp
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* ## Available Tools
|
|
31
|
+
*
|
|
32
|
+
* - `generate_image` - Generate images (AI, charts, diagrams, QR codes, screenshots)
|
|
33
|
+
* - `transform_image` - Apply deterministic transforms (resize, blur, caption, etc.)
|
|
34
|
+
* - `save_image` - Save to filesystem or cloud storage (S3, R2, Tigris)
|
|
35
|
+
* - `run_pipeline` - Execute multi-step workflows atomically
|
|
36
|
+
* - `analyze_image` - AI vision analysis (GPT-4V, Claude, Gemini, Ollama)
|
|
37
|
+
* - `generate_text` - AI text generation
|
|
38
|
+
*
|
|
39
|
+
* @packageDocumentation
|
|
40
|
+
*/
|
|
41
|
+
// Re-export for programmatic usage (advanced)
|
|
42
|
+
export { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
43
|
+
export { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,8CAA8C;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":""}
|