dali-mcp 0.1.0__tar.gz

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.
@@ -0,0 +1,40 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch: {}
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.x"
19
+ - name: Build package
20
+ run: |
21
+ pip install build
22
+ python -m build
23
+ - uses: actions/upload-artifact@v4
24
+ with:
25
+ name: dist
26
+ path: dist/
27
+
28
+ publish:
29
+ needs: build
30
+ runs-on: ubuntu-latest
31
+ environment: pypi
32
+ permissions:
33
+ id-token: write
34
+ steps:
35
+ - uses: actions/download-artifact@v4
36
+ with:
37
+ name: dist
38
+ path: dist/
39
+ - name: Publish to PyPI
40
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,10 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .venv/
7
+ venv/
8
+ .env
9
+ *.env
10
+ .DS_Store
@@ -0,0 +1,15 @@
1
+ FROM python:3.12-slim
2
+
3
+ WORKDIR /app
4
+
5
+ COPY pyproject.toml .
6
+ RUN pip install --no-cache-dir "fastmcp>=0.1.0" "httpx>=0.27.0" hatchling
7
+
8
+ COPY dali/ ./dali/
9
+
10
+ # DALI_TOKEN required — get yours at dali.getlulu.dev (free GitHub OAuth login)
11
+ ENV DALI_TRANSPORT=http
12
+
13
+ EXPOSE 8080
14
+
15
+ CMD ["python", "-m", "dali.server"]
dali_mcp-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lulu
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.
@@ -0,0 +1,225 @@
1
+ Metadata-Version: 2.4
2
+ Name: dali-mcp
3
+ Version: 0.1.0
4
+ Summary: Dali by Lulu — creative intelligence MCP. Score your prompt before you spend the credit.
5
+ Project-URL: Homepage, https://dali.getlulu.dev
6
+ Project-URL: Repository, https://github.com/Lulu-The-Narwhal/dali-mcp
7
+ License: MIT
8
+ License-File: LICENSE
9
+ Keywords: ai,creative,flux,higgsfield,image,lulu,mcp,midjourney,prompts,veo,video
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.10
15
+ Requires-Dist: fastmcp>=0.1.0
16
+ Requires-Dist: httpx>=0.27.0
17
+ Description-Content-Type: text/markdown
18
+
19
+ <!-- mcp-name: io.github.Lulu-The-Narwhal/dali -->
20
+ # Dali by Lulu
21
+
22
+ <p align="center">
23
+ <img src="assets/dali-lulu-scorer.png" alt="Dali by Lulu — creative intelligence MCP" width="100%">
24
+ </p>
25
+
26
+ <p align="center">
27
+ <a href="https://dali.getlulu.dev"><strong>dali.getlulu.dev</strong></a> &nbsp;·&nbsp;
28
+ <a href="https://dali.getlulu.dev/#install">Install</a> &nbsp;·&nbsp;
29
+ <a href="https://dali.getlulu.dev/dashboard">Live stats</a> &nbsp;·&nbsp;
30
+ <a href="https://getlulu.dev">Lulu</a>
31
+ </p>
32
+
33
+ <p align="center">
34
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License"></a>
35
+ <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="Python 3.10+"></a>
36
+ <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-server-6b5bff.svg" alt="MCP Server"></a>
37
+ <a href="https://dali.getlulu.dev/dashboard"><img src="https://img.shields.io/badge/status-live-brightgreen.svg" alt="Live"></a>
38
+ </p>
39
+
40
+ ---
41
+
42
+ **The prediction MCP that helps you avoid the AI generation tax.**
43
+
44
+ Most AI generation failures are prompt failures. You can't tell the difference until after you've burned the token. Dali scores your prompt *before* you generate — so you never waste a credit on a bad prompt again. Every wasted generation has a real cost (a Seedance retry is ~$6) — [the live dashboard](https://dali.getlulu.dev/dashboard) tracks what the community has saved by catching bad prompts before they burned a credit.
45
+
46
+ ```
47
+ You: "make a video ad for our glass serum bottle"
48
+
49
+ dali::score_prompt(prompt, "veo3")
50
+ → 8/100 Grade: F
51
+ → no camera move · no motion · no lighting · 8 words
52
+ → Verdict: Generic stock footage guaranteed. Enhance first.
53
+
54
+ dali::enhance_prompt(prompt, "veo3")
55
+ → Returns a rewrite brief — YOUR LLM writes the enhanced prompt:
56
+
57
+ ① lead with camera — Veo 3's #1 lever: "Slow dolly", "Orbital push"
58
+ ② describe physics: "a drop falls", "liquid ripples", "glass refracts"
59
+ ③ lighting type + quality: "warm backlight", "rim-lit edges"
60
+ ↳ [Camera]. [Subject + motion]. [Lighting]. [Mood]. [No text.]
61
+
62
+ ✦ Claude rewrites using the brief:
63
+
64
+ "Slow orbital push around a glass serum bottle on white marble. A single
65
+ amber drop falls in extreme slow motion, catching warm backlight. Macro:
66
+ liquid gold ripples outward from impact. Rim-lit edges, soft studio
67
+ diffusion. Premium, clinical. No text."
68
+
69
+ dali::score_prompt(enhanced, "veo3")
70
+ → 91/100 Grade: A ✓ Safe to generate.
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Contents
76
+
77
+ - [Install](#install)
78
+ - [Tools](#tools)
79
+ - [Supported models](#supported-models)
80
+ - [Platform supersets](#platform-supersets)
81
+ - [Why model-specific?](#why-model-specific)
82
+ - [MCP resources](#mcp-resources)
83
+ - [Contributing](#contributing)
84
+
85
+ ---
86
+
87
+ ## Install
88
+
89
+ **Hosted MCP — connect once, scores every prompt:**
90
+
91
+ ```bash
92
+ # Claude Code
93
+ claude mcp add --transport http dali https://dali.getlulu.dev/mcp
94
+ ```
95
+
96
+ ```json
97
+ // Cursor / Windsurf — .cursor/mcp.json or windsurf settings
98
+ {
99
+ "mcpServers": {
100
+ "dali": { "url": "https://dali.getlulu.dev/mcp" }
101
+ }
102
+ }
103
+ ```
104
+
105
+ → **[Full install guide with all clients](https://dali.getlulu.dev/#install)**
106
+
107
+ **Self-hosted — local, no auth required:**
108
+
109
+ ```bash
110
+ # PyPI package is not published yet — install directly from source for now
111
+ pip install git+https://github.com/Lulu-The-Narwhal/dali-mcp
112
+ claude mcp add dali -- python -m dali.server
113
+ ```
114
+
115
+ ---
116
+
117
+ ## Tools
118
+
119
+ | Tool | What it does |
120
+ |------|-------------|
121
+ | `score_prompt(prompt, model)` | Grade 0–100, letter grade, per-dimension breakdown, what's missing, verdict |
122
+ | `enhance_prompt(prompt, model)` | Returns a structured rewrite brief — YOUR LLM writes the enhanced prompt using it |
123
+ | `analyze_intent(prompt)` | Parse dimensions: camera, motion, lighting, style, mood, gaps |
124
+ | `creative_patterns(model)` | Community top patterns for this model from the graph brain |
125
+ | `community_benchmark(prompt, model)` | Compare your prompt against community top scorers |
126
+ | `my_story()` | Your scoring history, model stats, grade distribution |
127
+ | `list_models()` | All supported models with medium and core strength |
128
+
129
+ ---
130
+
131
+ ## Supported models
132
+
133
+ ### Video
134
+
135
+ | Model | Platforms | Best for | Prompt style |
136
+ |-------|-----------|----------|--------------|
137
+ | `veo3` | Higgsfield, Google AI Studio (`veo-3.1-generate-preview`), Runway | Cinematic brand films, narrative ads, photorealistic motion | Camera move → Subject → Action → Location → Lighting → Mood |
138
+ | `seedance` | Higgsfield, fal.ai (`bytedance/seedance-2.0`) | UGC, social-native content, TikTok/Reels performance ads | Natural language, motion-first, authentic feel |
139
+ | `kling` | Higgsfield (`kling3`), Kling.ai (`kling-v3-text-to-video`) | Character animation, product showcases, facial performance | Scene → Characters → Action → Camera → Style; multi-shot labels |
140
+ | `runway` | Runway (`gen4_turbo`) | VFX, character performance, cinematic motion | Motion-first — describe what moves, not what exists |
141
+ | `wan` | fal.ai (`fal-ai/wan/v2.7/text-to-video`) | 4K, 20-second clips, native audio, open-source workflows | Scene → Motion → Sound → Duration → Mood |
142
+ | `minimax` | fal.ai (`fal-ai/minimax/hailuo-02/pro/text-to-video`) | Cinematic storytelling, character animation | Natural language + `[camera movement]` bracket syntax |
143
+ | `higgsfield` | Higgsfield (native model) | Physics-driven motion — cloth, hair, fluid, particles | Describe materials in motion, not motion abstractly |
144
+
145
+ > **Sora 2** (OpenAI): API shutdown September 24, 2026. Do not build new dependencies on it — use Runway or Kling instead.
146
+
147
+ ### Image
148
+
149
+ | Model | Platforms | Best for | Prompt style |
150
+ |-------|-----------|----------|--------------|
151
+ | `flux` | BFL API (`flux-pro-v1.1`), fal.ai, Replicate | Photorealism, technical photography, product shots | 30–80 words; camera body + lens specs; front-load subject |
152
+ | `midjourney` | Midjourney (v8.1) | Artistic depth, editorial, stylized illustration | Prose + params appended: `--ar 16:9 --s 300 --v 8.1 --style raw` |
153
+ | `ideogram` | Ideogram API (`V_4`), fal.ai | Typography, logos, text-in-image, graphic design | Describe text exactly in quotes inside the prompt |
154
+ | `firefly` | Adobe Firefly 5 (enterprise) | IP-indemnified commercial assets, 4MP brand content | Natural language + `contentClass` and `style.presets` API params |
155
+
156
+ > **Imagen 4** (Google): deprecated — use `gemini-3.5-flash` with image output. Dali still scores legacy Imagen prompts via the `imagen` model key but don't build new things on it.
157
+
158
+ ---
159
+
160
+ ## Platform supersets
161
+
162
+ **Higgsfield** and **Runway** are aggregator platforms — they proxy multiple underlying models under one API. The model you pick matters more than the platform name:
163
+
164
+ | Platform | Model selector | Underlying model |
165
+ |----------|---------------|-----------------|
166
+ | Higgsfield | `veo3` | Google Veo 3.1 |
167
+ | Higgsfield | `seedance` | ByteDance Seedance 2.0 |
168
+ | Higgsfield | `kling3` | Kling 3 |
169
+ | Higgsfield | `wan2-7` | Wan 2.7 |
170
+ | Higgsfield | `image2video` | Higgsfield native |
171
+ | Runway | `veo3` | Google Veo 3.1 |
172
+ | Runway | `gen4_turbo` | Runway Gen 4.5 |
173
+ | Runway | `seedance` | ByteDance Seedance 2.0 |
174
+
175
+ Dali scores for the **underlying model's native prompt language**, not the platform wrapper. Pass the model name (`veo3`, `kling`, `seedance`…), not the platform name.
176
+
177
+ ---
178
+
179
+ ## Why model-specific?
180
+
181
+ Generic prompt optimizers don't know that:
182
+ - **Veo 3.1** needs camera movement specified above everything else
183
+ - **Kling 3** supports multi-shot scene labels natively in the prompt
184
+ - **Flux** responds to camera body and lens names like a photographer (`"Sony A7 IV, 85mm f/1.4"`)
185
+ - **Midjourney V8.1** reads prose + parameters, not keyword lists
186
+ - **Higgsfield** simulates physics — you describe materials in motion, not motion abstractly
187
+ - **Minimax** uses `[Pan left]` bracket syntax for camera moves — plain text camera commands are ignored
188
+ - **Ideogram V4** needs text quoted exactly in the prompt for typography accuracy
189
+ - **Wan 2.7** generates native audio — include sound descriptions alongside visuals
190
+
191
+ Dali has a separate scoring rubric and rewrite brief for each model. Your LLM does the creative rewriting — Dali provides the intelligence.
192
+
193
+ ---
194
+
195
+ ## MCP resources
196
+
197
+ ```
198
+ creative://guide/veo3 → Veo 3.1 camera language guide
199
+ creative://guide/seedance → Seedance UGC motion guide
200
+ creative://guide/kling → Kling multi-shot + expression guide
201
+ creative://guide/runway → Runway motion-first guide
202
+ creative://guide/wan → Wan 2.7 audio + motion guide
203
+ creative://guide/minimax → Minimax bracket camera guide
204
+ creative://guide/higgsfield → Higgsfield physics-motion guide
205
+ creative://guide/sora → Sora 2 guide (API shutdown Sep 24, 2026)
206
+ creative://guide/flux → Flux photography brief guide
207
+ creative://guide/midjourney → Midjourney V8.1 + parameters guide
208
+ creative://guide/ideogram → Ideogram V4 typography guide
209
+ creative://guide/firefly → Firefly 5 commercial content guide
210
+ creative://guide/imagen → Imagen 4 guide (deprecated Aug 17, 2026)
211
+ creative://models → All models overview
212
+ ```
213
+
214
+ ---
215
+
216
+ ## Contributing
217
+
218
+ Model guides live in `dali/data/guides/{model}.json` on the hosted server. Found practitioner patterns that consistently produce high-grade results? Open an issue with the model, the pattern, and a sample prompt + result. The best contributions come from Reddit, Discord, and YouTube — real practitioners, not official docs.
219
+
220
+ → **[Prompt best practices by model](docs/best-practices.md)** — cheat sheets, do/don't tables, top patterns per model
221
+ → **[Dali creative flow skill](skills/dali-creative-flow.md)** — install this skill so your LLM follows the score → enhance → generate workflow automatically
222
+
223
+ ---
224
+
225
+ [MIT License](LICENSE) · Built by [Lulu](https://getlulu.dev) · [dali.getlulu.dev](https://dali.getlulu.dev)
@@ -0,0 +1,207 @@
1
+ <!-- mcp-name: io.github.Lulu-The-Narwhal/dali -->
2
+ # Dali by Lulu
3
+
4
+ <p align="center">
5
+ <img src="assets/dali-lulu-scorer.png" alt="Dali by Lulu — creative intelligence MCP" width="100%">
6
+ </p>
7
+
8
+ <p align="center">
9
+ <a href="https://dali.getlulu.dev"><strong>dali.getlulu.dev</strong></a> &nbsp;·&nbsp;
10
+ <a href="https://dali.getlulu.dev/#install">Install</a> &nbsp;·&nbsp;
11
+ <a href="https://dali.getlulu.dev/dashboard">Live stats</a> &nbsp;·&nbsp;
12
+ <a href="https://getlulu.dev">Lulu</a>
13
+ </p>
14
+
15
+ <p align="center">
16
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License"></a>
17
+ <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="Python 3.10+"></a>
18
+ <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-server-6b5bff.svg" alt="MCP Server"></a>
19
+ <a href="https://dali.getlulu.dev/dashboard"><img src="https://img.shields.io/badge/status-live-brightgreen.svg" alt="Live"></a>
20
+ </p>
21
+
22
+ ---
23
+
24
+ **The prediction MCP that helps you avoid the AI generation tax.**
25
+
26
+ Most AI generation failures are prompt failures. You can't tell the difference until after you've burned the token. Dali scores your prompt *before* you generate — so you never waste a credit on a bad prompt again. Every wasted generation has a real cost (a Seedance retry is ~$6) — [the live dashboard](https://dali.getlulu.dev/dashboard) tracks what the community has saved by catching bad prompts before they burned a credit.
27
+
28
+ ```
29
+ You: "make a video ad for our glass serum bottle"
30
+
31
+ dali::score_prompt(prompt, "veo3")
32
+ → 8/100 Grade: F
33
+ → no camera move · no motion · no lighting · 8 words
34
+ → Verdict: Generic stock footage guaranteed. Enhance first.
35
+
36
+ dali::enhance_prompt(prompt, "veo3")
37
+ → Returns a rewrite brief — YOUR LLM writes the enhanced prompt:
38
+
39
+ ① lead with camera — Veo 3's #1 lever: "Slow dolly", "Orbital push"
40
+ ② describe physics: "a drop falls", "liquid ripples", "glass refracts"
41
+ ③ lighting type + quality: "warm backlight", "rim-lit edges"
42
+ ↳ [Camera]. [Subject + motion]. [Lighting]. [Mood]. [No text.]
43
+
44
+ ✦ Claude rewrites using the brief:
45
+
46
+ "Slow orbital push around a glass serum bottle on white marble. A single
47
+ amber drop falls in extreme slow motion, catching warm backlight. Macro:
48
+ liquid gold ripples outward from impact. Rim-lit edges, soft studio
49
+ diffusion. Premium, clinical. No text."
50
+
51
+ dali::score_prompt(enhanced, "veo3")
52
+ → 91/100 Grade: A ✓ Safe to generate.
53
+ ```
54
+
55
+ ---
56
+
57
+ ## Contents
58
+
59
+ - [Install](#install)
60
+ - [Tools](#tools)
61
+ - [Supported models](#supported-models)
62
+ - [Platform supersets](#platform-supersets)
63
+ - [Why model-specific?](#why-model-specific)
64
+ - [MCP resources](#mcp-resources)
65
+ - [Contributing](#contributing)
66
+
67
+ ---
68
+
69
+ ## Install
70
+
71
+ **Hosted MCP — connect once, scores every prompt:**
72
+
73
+ ```bash
74
+ # Claude Code
75
+ claude mcp add --transport http dali https://dali.getlulu.dev/mcp
76
+ ```
77
+
78
+ ```json
79
+ // Cursor / Windsurf — .cursor/mcp.json or windsurf settings
80
+ {
81
+ "mcpServers": {
82
+ "dali": { "url": "https://dali.getlulu.dev/mcp" }
83
+ }
84
+ }
85
+ ```
86
+
87
+ → **[Full install guide with all clients](https://dali.getlulu.dev/#install)**
88
+
89
+ **Self-hosted — local, no auth required:**
90
+
91
+ ```bash
92
+ # PyPI package is not published yet — install directly from source for now
93
+ pip install git+https://github.com/Lulu-The-Narwhal/dali-mcp
94
+ claude mcp add dali -- python -m dali.server
95
+ ```
96
+
97
+ ---
98
+
99
+ ## Tools
100
+
101
+ | Tool | What it does |
102
+ |------|-------------|
103
+ | `score_prompt(prompt, model)` | Grade 0–100, letter grade, per-dimension breakdown, what's missing, verdict |
104
+ | `enhance_prompt(prompt, model)` | Returns a structured rewrite brief — YOUR LLM writes the enhanced prompt using it |
105
+ | `analyze_intent(prompt)` | Parse dimensions: camera, motion, lighting, style, mood, gaps |
106
+ | `creative_patterns(model)` | Community top patterns for this model from the graph brain |
107
+ | `community_benchmark(prompt, model)` | Compare your prompt against community top scorers |
108
+ | `my_story()` | Your scoring history, model stats, grade distribution |
109
+ | `list_models()` | All supported models with medium and core strength |
110
+
111
+ ---
112
+
113
+ ## Supported models
114
+
115
+ ### Video
116
+
117
+ | Model | Platforms | Best for | Prompt style |
118
+ |-------|-----------|----------|--------------|
119
+ | `veo3` | Higgsfield, Google AI Studio (`veo-3.1-generate-preview`), Runway | Cinematic brand films, narrative ads, photorealistic motion | Camera move → Subject → Action → Location → Lighting → Mood |
120
+ | `seedance` | Higgsfield, fal.ai (`bytedance/seedance-2.0`) | UGC, social-native content, TikTok/Reels performance ads | Natural language, motion-first, authentic feel |
121
+ | `kling` | Higgsfield (`kling3`), Kling.ai (`kling-v3-text-to-video`) | Character animation, product showcases, facial performance | Scene → Characters → Action → Camera → Style; multi-shot labels |
122
+ | `runway` | Runway (`gen4_turbo`) | VFX, character performance, cinematic motion | Motion-first — describe what moves, not what exists |
123
+ | `wan` | fal.ai (`fal-ai/wan/v2.7/text-to-video`) | 4K, 20-second clips, native audio, open-source workflows | Scene → Motion → Sound → Duration → Mood |
124
+ | `minimax` | fal.ai (`fal-ai/minimax/hailuo-02/pro/text-to-video`) | Cinematic storytelling, character animation | Natural language + `[camera movement]` bracket syntax |
125
+ | `higgsfield` | Higgsfield (native model) | Physics-driven motion — cloth, hair, fluid, particles | Describe materials in motion, not motion abstractly |
126
+
127
+ > **Sora 2** (OpenAI): API shutdown September 24, 2026. Do not build new dependencies on it — use Runway or Kling instead.
128
+
129
+ ### Image
130
+
131
+ | Model | Platforms | Best for | Prompt style |
132
+ |-------|-----------|----------|--------------|
133
+ | `flux` | BFL API (`flux-pro-v1.1`), fal.ai, Replicate | Photorealism, technical photography, product shots | 30–80 words; camera body + lens specs; front-load subject |
134
+ | `midjourney` | Midjourney (v8.1) | Artistic depth, editorial, stylized illustration | Prose + params appended: `--ar 16:9 --s 300 --v 8.1 --style raw` |
135
+ | `ideogram` | Ideogram API (`V_4`), fal.ai | Typography, logos, text-in-image, graphic design | Describe text exactly in quotes inside the prompt |
136
+ | `firefly` | Adobe Firefly 5 (enterprise) | IP-indemnified commercial assets, 4MP brand content | Natural language + `contentClass` and `style.presets` API params |
137
+
138
+ > **Imagen 4** (Google): deprecated — use `gemini-3.5-flash` with image output. Dali still scores legacy Imagen prompts via the `imagen` model key but don't build new things on it.
139
+
140
+ ---
141
+
142
+ ## Platform supersets
143
+
144
+ **Higgsfield** and **Runway** are aggregator platforms — they proxy multiple underlying models under one API. The model you pick matters more than the platform name:
145
+
146
+ | Platform | Model selector | Underlying model |
147
+ |----------|---------------|-----------------|
148
+ | Higgsfield | `veo3` | Google Veo 3.1 |
149
+ | Higgsfield | `seedance` | ByteDance Seedance 2.0 |
150
+ | Higgsfield | `kling3` | Kling 3 |
151
+ | Higgsfield | `wan2-7` | Wan 2.7 |
152
+ | Higgsfield | `image2video` | Higgsfield native |
153
+ | Runway | `veo3` | Google Veo 3.1 |
154
+ | Runway | `gen4_turbo` | Runway Gen 4.5 |
155
+ | Runway | `seedance` | ByteDance Seedance 2.0 |
156
+
157
+ Dali scores for the **underlying model's native prompt language**, not the platform wrapper. Pass the model name (`veo3`, `kling`, `seedance`…), not the platform name.
158
+
159
+ ---
160
+
161
+ ## Why model-specific?
162
+
163
+ Generic prompt optimizers don't know that:
164
+ - **Veo 3.1** needs camera movement specified above everything else
165
+ - **Kling 3** supports multi-shot scene labels natively in the prompt
166
+ - **Flux** responds to camera body and lens names like a photographer (`"Sony A7 IV, 85mm f/1.4"`)
167
+ - **Midjourney V8.1** reads prose + parameters, not keyword lists
168
+ - **Higgsfield** simulates physics — you describe materials in motion, not motion abstractly
169
+ - **Minimax** uses `[Pan left]` bracket syntax for camera moves — plain text camera commands are ignored
170
+ - **Ideogram V4** needs text quoted exactly in the prompt for typography accuracy
171
+ - **Wan 2.7** generates native audio — include sound descriptions alongside visuals
172
+
173
+ Dali has a separate scoring rubric and rewrite brief for each model. Your LLM does the creative rewriting — Dali provides the intelligence.
174
+
175
+ ---
176
+
177
+ ## MCP resources
178
+
179
+ ```
180
+ creative://guide/veo3 → Veo 3.1 camera language guide
181
+ creative://guide/seedance → Seedance UGC motion guide
182
+ creative://guide/kling → Kling multi-shot + expression guide
183
+ creative://guide/runway → Runway motion-first guide
184
+ creative://guide/wan → Wan 2.7 audio + motion guide
185
+ creative://guide/minimax → Minimax bracket camera guide
186
+ creative://guide/higgsfield → Higgsfield physics-motion guide
187
+ creative://guide/sora → Sora 2 guide (API shutdown Sep 24, 2026)
188
+ creative://guide/flux → Flux photography brief guide
189
+ creative://guide/midjourney → Midjourney V8.1 + parameters guide
190
+ creative://guide/ideogram → Ideogram V4 typography guide
191
+ creative://guide/firefly → Firefly 5 commercial content guide
192
+ creative://guide/imagen → Imagen 4 guide (deprecated Aug 17, 2026)
193
+ creative://models → All models overview
194
+ ```
195
+
196
+ ---
197
+
198
+ ## Contributing
199
+
200
+ Model guides live in `dali/data/guides/{model}.json` on the hosted server. Found practitioner patterns that consistently produce high-grade results? Open an issue with the model, the pattern, and a sample prompt + result. The best contributions come from Reddit, Discord, and YouTube — real practitioners, not official docs.
201
+
202
+ → **[Prompt best practices by model](docs/best-practices.md)** — cheat sheets, do/don't tables, top patterns per model
203
+ → **[Dali creative flow skill](skills/dali-creative-flow.md)** — install this skill so your LLM follows the score → enhance → generate workflow automatically
204
+
205
+ ---
206
+
207
+ [MIT License](LICENSE) · Built by [Lulu](https://getlulu.dev) · [dali.getlulu.dev](https://dali.getlulu.dev)
Binary file
Binary file
@@ -0,0 +1,46 @@
1
+ steps:
2
+ # Build image
3
+ - name: 'gcr.io/cloud-builders/docker'
4
+ args:
5
+ - build
6
+ - -t
7
+ - us-central1-docker.pkg.dev/$PROJECT_ID/dali-mcp/dali-mcp:$COMMIT_SHA
8
+ - -t
9
+ - us-central1-docker.pkg.dev/$PROJECT_ID/dali-mcp/dali-mcp:latest
10
+ - .
11
+
12
+ # Push SHA tag
13
+ - name: 'gcr.io/cloud-builders/docker'
14
+ args: ['push', 'us-central1-docker.pkg.dev/$PROJECT_ID/dali-mcp/dali-mcp:$COMMIT_SHA']
15
+
16
+ # Push latest tag
17
+ - name: 'gcr.io/cloud-builders/docker'
18
+ args: ['push', 'us-central1-docker.pkg.dev/$PROJECT_ID/dali-mcp/dali-mcp:latest']
19
+
20
+ # Get GKE credentials
21
+ - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
22
+ entrypoint: gcloud
23
+ args:
24
+ - container
25
+ - clusters
26
+ - get-credentials
27
+ - lulu-cluster
28
+ - --region=us-east1
29
+ - --project=$PROJECT_ID
30
+
31
+ # Roll dali-mcp deployment to the new image
32
+ - name: 'gcr.io/cloud-builders/kubectl'
33
+ args:
34
+ - set
35
+ - image
36
+ - deployment/dali-mcp
37
+ - dali-mcp=us-central1-docker.pkg.dev/$PROJECT_ID/dali-mcp/dali-mcp:$COMMIT_SHA
38
+ - -n
39
+ - lulu
40
+ env:
41
+ - 'CLOUDSDK_COMPUTE_REGION=us-east1'
42
+ - 'CLOUDSDK_CONTAINER_CLUSTER=lulu-cluster'
43
+
44
+ images:
45
+ - us-central1-docker.pkg.dev/$PROJECT_ID/dali-mcp/dali-mcp:$COMMIT_SHA
46
+ - us-central1-docker.pkg.dev/$PROJECT_ID/dali-mcp/dali-mcp:latest
@@ -0,0 +1,3 @@
1
+ """Dali by Lulu — creative intelligence MCP for AI generation prompts."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,50 @@
1
+ """
2
+ HTTP client for the Dali hosted API at dali.getlulu.dev.
3
+
4
+ All intelligence (scoring, enhancement, Memgraph graph) runs server-side.
5
+ This module handles auth token injection and request formatting.
6
+
7
+ Tokens: get yours at dali.getlulu.dev (GitHub OAuth login, free tier).
8
+ """
9
+
10
+ from __future__ import annotations
11
+ import os
12
+ import httpx
13
+ from typing import Optional
14
+
15
+ DALI_API_BASE = os.environ.get("DALI_API_URL", "https://dali.getlulu.dev")
16
+ _DEFAULT_TIMEOUT = 30.0
17
+
18
+
19
+ def _headers(token: Optional[str] = None) -> dict:
20
+ h = {"Content-Type": "application/json", "User-Agent": "dali-mcp/0.3.0"}
21
+ tok = token or os.environ.get("DALI_TOKEN")
22
+ if tok:
23
+ h["Authorization"] = f"Bearer {tok}"
24
+ return h
25
+
26
+
27
+ def call(endpoint: str, payload: dict, token: Optional[str] = None) -> dict:
28
+ """POST to the Dali API. Returns the parsed JSON response."""
29
+ url = f"{DALI_API_BASE.rstrip('/')}/{endpoint.lstrip('/')}"
30
+ try:
31
+ with httpx.Client(timeout=_DEFAULT_TIMEOUT) as http:
32
+ resp = http.post(url, json=payload, headers=_headers(token))
33
+ resp.raise_for_status()
34
+ return resp.json()
35
+ except httpx.TimeoutException:
36
+ return {"error": "Request timed out. Dali API may be under load — retry in a moment."}
37
+ except httpx.HTTPStatusError as e:
38
+ if e.response.status_code == 401:
39
+ return {
40
+ "error": "Unauthorized. Set DALI_TOKEN or run: dali auth login",
41
+ "auth_url": f"{DALI_API_BASE}/auth/github",
42
+ }
43
+ if e.response.status_code == 429:
44
+ return {
45
+ "error": "Rate limit reached. Free tier: 100 calls/month.",
46
+ "upgrade_url": f"{DALI_API_BASE}/pricing",
47
+ }
48
+ return {"error": f"API error {e.response.status_code}: {e.response.text[:200]}"}
49
+ except Exception as e:
50
+ return {"error": f"Could not reach Dali API: {e}"}
@@ -0,0 +1,266 @@
1
+ """
2
+ Dali by Lulu — creative intelligence MCP for AI generation agents.
3
+
4
+ Score your prompt before you spend the credit.
5
+
6
+ This is the open-source MCP client. Tool definitions live here.
7
+ Intelligence (scoring engine, Gemini enhancement, V3 graph brain) runs
8
+ on the hosted server at dali.getlulu.dev.
9
+
10
+ Connect (recommended):
11
+ claude mcp add dali --url https://dali.getlulu.dev/mcp
12
+
13
+ Self-hosted (calls Dali API, requires a free token):
14
+ pip install dali-mcp
15
+ export DALI_TOKEN=<your token from dali.getlulu.dev>
16
+ claude mcp add dali -- python -m dali.server
17
+
18
+ Tools:
19
+ analyze_intent — parse raw text into structured creative intent
20
+ score_prompt — score a prompt 0–100 for a specific model
21
+ enhance_prompt — Gemini-powered rewrite in the model's native language
22
+ creative_patterns — community graph: A-grade patterns for this model (V3)
23
+ community_benchmark — how your prompt compares to community top scorers (V3)
24
+ my_story — your scoring history, model stats, creative DNA
25
+ list_models — all supported generation models
26
+
27
+ Resources:
28
+ creative://guide/{model} — full native-language guide for each model
29
+ creative://models — overview of all models
30
+ """
31
+
32
+ from __future__ import annotations
33
+ import os
34
+
35
+ try:
36
+ from fastmcp import FastMCP
37
+ except ImportError:
38
+ raise ImportError(
39
+ "fastmcp not installed. Run: pip install dali-mcp\n"
40
+ "Or use the hosted server: https://dali.getlulu.dev/mcp"
41
+ )
42
+
43
+ from .client import call
44
+
45
+ mcp = FastMCP(
46
+ name="dali",
47
+ instructions=(
48
+ "Dali is creative intelligence for AI generation. Use it BEFORE generating any image or video.\n\n"
49
+ "PROACTIVE WORKFLOW (always follow this):\n"
50
+ "1. User expresses any image/video generation intent → IMMEDIATELY call score_prompt(prompt, model)\n"
51
+ "2. Grade A or B (score ≥ 70) → proceed with the prompt\n"
52
+ "3. Grade C, D, or F (score < 70) → call enhance_prompt(prompt, model) to get a rewrite brief, "
53
+ "then YOU write the enhanced prompt using the brief's native_language_rules + structure_template. "
54
+ "Then call score_prompt on your version to verify.\n"
55
+ "4. NEVER generate without scoring first\n\n"
56
+ "TOOLS:\n"
57
+ "- analyze_intent(prompt) — parse intent signals before scoring\n"
58
+ "- score_prompt(prompt, model) — grade 0–100 with what's missing\n"
59
+ "- enhance_prompt(prompt, model) — AI rewrite in the model's native language\n"
60
+ "- creative_patterns(model) — community A-grade patterns from the graph brain\n"
61
+ "- community_benchmark(prompt, model) — compare vs top scorers\n"
62
+ "- my_story() — personal scoring history and creative DNA\n"
63
+ "- list_models() — all supported models\n\n"
64
+ "SUPPORTED MODELS: veo3, seedance, kling, runway, wan, minimax, higgsfield, sora, flux, midjourney, ideogram, firefly, imagen\n"
65
+ "ALIASES: veo→veo3, mj→midjourney, sd→flux, gen4→runway, hailuo→minimax, wan27→wan\n\n"
66
+ "RESOURCES: creative://guide/{model} — full native-language guide\n\n"
67
+ "INSTALL GUIDE: dali.getlulu.dev/install"
68
+ ),
69
+ )
70
+
71
+
72
+ # ── Tools ──────────────────────────────────────────────────────────────────
73
+
74
+ @mcp.tool()
75
+ def analyze_intent(
76
+ prompt: str,
77
+ medium: str = "auto",
78
+ ) -> dict:
79
+ """
80
+ Parse a creative prompt into structured intent dimensions.
81
+
82
+ Returns: detected camera language, motion, lighting, style, mood signals,
83
+ identified gaps, and which models suit the current signals best.
84
+
85
+ Args:
86
+ prompt: Raw creative text (rough idea or full prompt — both work)
87
+ medium: "image", "video", or "auto" (default, auto-detected)
88
+ """
89
+ return call("/api/intent", {"prompt": prompt, "medium": medium})
90
+
91
+
92
+ @mcp.tool()
93
+ def score_prompt(
94
+ prompt: str,
95
+ model: str,
96
+ ) -> dict:
97
+ """
98
+ Score a prompt for a specific generation model (0–100).
99
+
100
+ Returns a ScoreCard: overall score, letter grade (A–F), per-dimension
101
+ breakdown, what's missing, detected anti-patterns, and a one-line verdict
102
+ on whether it's safe to generate.
103
+
104
+ Supported models: veo3, seedance, kling, runway, wan, minimax, higgsfield, sora, flux, midjourney, ideogram, firefly, imagen
105
+ Aliases: "veo" → veo3, "mj" → midjourney, "sd" → flux, "gen4" → runway, "hailuo" → minimax
106
+
107
+ Args:
108
+ prompt: The prompt to score
109
+ model: Target generation model
110
+ """
111
+ return call("/api/score", {"prompt": prompt, "model": model})
112
+
113
+
114
+ @mcp.tool()
115
+ def enhance_prompt(
116
+ prompt: str,
117
+ model: str,
118
+ ) -> dict:
119
+ """
120
+ Rewrite a prompt using AI to score higher on the target model.
121
+
122
+ Returns a rewrite brief — YOU (the LLM) write the enhanced prompt from it.
123
+
124
+ Dali provides creative intelligence: what's missing, the model's native language rules,
125
+ structure template, priority fixes, and length target.
126
+ You provide creative execution: actually writing the better prompt.
127
+
128
+ Returns:
129
+ - score_before: full ScoreCard showing current gaps
130
+ - rewrite_brief: native_language_rules, structure_template, priority_fixes, length_target
131
+ - llm_instructions: step-by-step instructions for writing the enhanced prompt
132
+
133
+ Args:
134
+ prompt: The prompt to enhance
135
+ model: Target generation model (veo3, seedance, kling, runway, wan, minimax, higgsfield, sora, flux, midjourney, ideogram, firefly, imagen)
136
+ """
137
+ return call("/api/enhance", {"prompt": prompt, "model": model})
138
+
139
+
140
+ @mcp.tool()
141
+ def creative_patterns(
142
+ model: str,
143
+ grade: str = "A",
144
+ ) -> dict:
145
+ """
146
+ Community graph intelligence: which patterns consistently produce high-grade prompts
147
+ for this model?
148
+
149
+ Powered by the Dali V3 graph brain — every prompt scored by every
150
+ Dali user contributes to this. The more community usage, the richer the signal.
151
+
152
+ Also returns: enhancement unlocks (which patterns added during enhance_prompt
153
+ have produced the highest score gains for this model).
154
+
155
+ Args:
156
+ model: Target generation model (veo3, seedance, kling, runway, wan, minimax, higgsfield, flux, midjourney, ideogram, firefly)
157
+ grade: Minimum grade filter — "A" (only A-grade), "B" (A+B), "C" (A+B+C)
158
+ """
159
+ return call("/api/patterns", {"model": model, "grade": grade})
160
+
161
+
162
+ @mcp.tool()
163
+ def community_benchmark(
164
+ prompt: str,
165
+ model: str,
166
+ ) -> dict:
167
+ """
168
+ Compare your prompt against community top scorers for this model.
169
+
170
+ Scores your prompt, then queries the Dali graph to find:
171
+ - Which A-grade community patterns are absent from your prompt
172
+ - Which enhancement patterns would give you the biggest score gain
173
+ - Where you sit vs the community average for this model
174
+
175
+ Args:
176
+ prompt: Your prompt to benchmark
177
+ model: Target generation model
178
+ """
179
+ return call("/api/benchmark", {"prompt": prompt, "model": model})
180
+
181
+
182
+ @mcp.tool()
183
+ def my_story() -> dict:
184
+ """
185
+ Your Dali creative intelligence report.
186
+
187
+ Shows your prompt scoring history across all models:
188
+ - Total prompts scored + this month's count
189
+ - Average score and model breakdown
190
+ - Grade distribution (how many A, B, C, D, F scores)
191
+ - Your creative DNA: patterns that define your highest-scoring work (V3 graph)
192
+ - A personal insight on where you'd improve fastest
193
+
194
+ Requires login at dali.getlulu.dev. History is tied to your GitHub account.
195
+ """
196
+ return call("/api/story", {})
197
+
198
+
199
+ @mcp.tool()
200
+ def list_models() -> dict:
201
+ """List all supported generation models with medium, creator, and core strength."""
202
+ return call("/api/models", {})
203
+
204
+
205
+ # ── Resources ──────────────────────────────────────────────────────────────
206
+
207
+ @mcp.resource("creative://guide/{model}")
208
+ def model_guide(model: str) -> str:
209
+ """Full native-language prompt guide for a specific generation model."""
210
+ result = call("/api/guide", {"model": model})
211
+ if "error" in result:
212
+ return f"Could not load guide: {result['error']}"
213
+ return result.get("text", f"No guide found for {model}")
214
+
215
+
216
+ @mcp.resource("creative://models")
217
+ def models_overview() -> str:
218
+ """Overview of all supported models and their strengths."""
219
+ result = call("/api/models", {})
220
+ if "error" in result:
221
+ return "Could not load models overview. Is DALI_TOKEN set?"
222
+ lines = [
223
+ "# Dali by Lulu — Supported Generation Models",
224
+ "dali.getlulu.dev | github.com/Lulu-The-Narwhal/dali-mcp",
225
+ "",
226
+ ]
227
+ details = result.get("details", {})
228
+ video = [m for m, d in details.items() if d.get("medium") == "video"]
229
+ image = [m for m, d in details.items() if d.get("medium") == "image"]
230
+ lines.append("## Video Models")
231
+ for m in video:
232
+ d = details[m]
233
+ lines.append(f"- **{m}** ({d.get('by', '')}): {d.get('strength', '')}")
234
+ lines.append("\n## Image Models")
235
+ for m in image:
236
+ d = details[m]
237
+ lines.append(f"- **{m}** ({d.get('by', '')}): {d.get('strength', '')}")
238
+ lines += [
239
+ "\n## Tools",
240
+ "- score_prompt(prompt, model) → 0–100 score + what's missing",
241
+ "- enhance_prompt(prompt, model) → AI rewrites it for the model's native language",
242
+ "- creative_patterns(model) → V3 graph: community A-grade patterns",
243
+ "- community_benchmark(prompt, model) → V3 graph: how you compare to top scorers",
244
+ "- my_story() → scoring history, model stats, creative DNA",
245
+ ]
246
+ return "\n".join(lines)
247
+
248
+
249
+ # ── Entry point ────────────────────────────────────────────────────────────
250
+
251
+ def main():
252
+ """
253
+ Entry point.
254
+ - DALI_TRANSPORT=http → streamable-http on PORT (for hosting your own instance)
255
+ - default → stdio (local / Claude Code)
256
+ """
257
+ transport = os.environ.get("DALI_TRANSPORT", "stdio")
258
+ if transport == "http":
259
+ port = int(os.environ.get("PORT", 8080))
260
+ mcp.run(transport="streamable-http", host="0.0.0.0", port=port)
261
+ else:
262
+ mcp.run()
263
+
264
+
265
+ if __name__ == "__main__":
266
+ main()
@@ -0,0 +1,234 @@
1
+ # Dali Prompt Best Practices
2
+
3
+ Model-specific patterns that consistently score A or B. Sourced from Reddit, Discord, and YouTube creators — not official docs.
4
+
5
+ ---
6
+
7
+ ## Video models
8
+
9
+ ### Veo 3.1 (`veo3`)
10
+
11
+ **The rule: camera move first. Everything else follows.**
12
+
13
+ ```
14
+ Slow dolly push following [subject] as [motion with adverb]. [Location/time].
15
+ [Lighting type] + [lighting quality]. [Style anchor]. No text.
16
+ ```
17
+
18
+ | Do | Don't |
19
+ |----|-------|
20
+ | "Slow dolly push" / "Orbital camera" / "Static wide" | Start with the subject |
21
+ | "gently cascades", "slowly drifts" | Just "cascades", "drifts" |
22
+ | "warm sodium-vapor glow, wet street reflection" | "good lighting" |
23
+ | End with "Cinematic. No text." | Leave mood unanchored |
24
+ | 50–120 words | One-liners |
25
+
26
+ **Top pattern**: `[Camera]. [Subject + motion adverb]. [Location]. [Lighting: type + quality]. [Style]. No text.`
27
+
28
+ ---
29
+
30
+ ### Seedance 2.0 (`seedance`)
31
+
32
+ **Write like you're describing a video to a friend. No cinematography jargon.**
33
+
34
+ ```
35
+ A [person description] [does action] in [location]. [Natural light cue].
36
+ Shot in a [UGC/authentic style] way.
37
+ ```
38
+
39
+ | Do | Don't |
40
+ |----|-------|
41
+ | "A woman holds up the product and smiles at camera" | "Cinematic shot of woman" |
42
+ | "Morning light through the window" | "Studio lighting" |
43
+ | "TikTok-style", "authentic feel" | Cinematography terms |
44
+ | 20–60 words | Overly detailed prompts |
45
+
46
+ **Top pattern**: `[Person + action]. [Natural light]. [Social context: TikTok/Reels/UGC].`
47
+
48
+ ---
49
+
50
+ ### Kling 3 (`kling`)
51
+
52
+ **Motion amplitude and expression are your biggest levers.**
53
+
54
+ ```
55
+ [Subject with expression]. [Motion with amplitude modifier] in [location].
56
+ [Camera move]. [Mood].
57
+ ```
58
+
59
+ | Do | Don't |
60
+ |----|-------|
61
+ | "subtle sway", "dramatic turn", "gentle tilt" | "moves", "walks" |
62
+ | "warm smile", "focused expression", "wide-eyed" | Skip expression |
63
+ | "Shot 1: ...\nShot 2: ..." for multi-shot | Freeform paragraphs |
64
+ | "Intimate. Warm." as a closing line | No mood anchor |
65
+
66
+ **Multi-shot pattern**: Label each beat — `Shot 1:`, `Shot 2:`, etc. Kling reads these natively.
67
+
68
+ ---
69
+
70
+ ### Runway Gen 4.5 (`runway`)
71
+
72
+ **Motion is the noun. Subject is the vehicle.**
73
+
74
+ ```
75
+ [Physical force or motion]. [Subject in that motion]. Camera [tracking move].
76
+ [Location]. [Style].
77
+ ```
78
+
79
+ | Do | Don't |
80
+ |----|-------|
81
+ | Open with a verb or force: "Rain crashes", "Wind tears through", "Light floods" | Static descriptions |
82
+ | Physical forces: gravity, wind, water, pressure | Abstract descriptions of stillness |
83
+ | Camera tracking AFTER establishing motion | Lead with camera |
84
+ | 30–80 words, tight | Long atmospheric paragraphs |
85
+
86
+ **Rule**: If nothing moves in your prompt, nothing will move in the output.
87
+
88
+ ---
89
+
90
+ ### Wan 2.7 (`wan`)
91
+
92
+ **Describe the sound. Wan generates native audio from the prompt.**
93
+
94
+ ```
95
+ [Scene description]. [Motion description]. We hear [sound description].
96
+ [Duration pacing]. [Mood].
97
+ ```
98
+
99
+ | Do | Don't |
100
+ |----|-------|
101
+ | "We hear rain pattering softly on leaves" | Skip audio |
102
+ | "Accompanied by a slow jazz piano" | Assume it'll infer audio |
103
+ | "15 seconds", "brief moment", "gradually" | Unspecified duration |
104
+ | Scene → Motion → Sound → Mood order | Random order |
105
+
106
+ ---
107
+
108
+ ### Minimax Hailuo 2 (`minimax`)
109
+
110
+ **Brackets are required for camera moves. Plain text is ignored.**
111
+
112
+ ```
113
+ [Scene]. [Subject action]. [Emotional beat]. [Pan left] or [Dolly in].
114
+ ```
115
+
116
+ | Do | Don't |
117
+ |----|-------|
118
+ | `[Pan left]`, `[Dolly in]`, `[Close-up]`, `[Tracking shot]` | "pan left", "dolly in" (no brackets) |
119
+ | Multiple brackets in one prompt | One camera move max |
120
+ | Natural language for everything except camera | Use brackets for non-camera text |
121
+
122
+ **Rule**: `[bracket]` syntax = camera. Natural language = everything else.
123
+
124
+ ---
125
+
126
+ ### Higgsfield (`higgsfield`)
127
+
128
+ **Name the physics. Describe materials in motion, not motion abstractly.**
129
+
130
+ ```
131
+ [Material in motion: silk draping / hair streaming / water cascading].
132
+ [Character detail]. [Camera movement]. [Style].
133
+ ```
134
+
135
+ | Do | Don't |
136
+ |----|-------|
137
+ | "silk draping", "hair streaming in wind", "water cascading over stone" | "things move naturally" |
138
+ | Name the physics: "cloth simulation", "fluid dynamics", "particle trail" | Vague movement language |
139
+ | Separate character physics from camera movement | Conflate them |
140
+ | Omit "stay still" | "Stay still" creates physics conflicts |
141
+
142
+ ---
143
+
144
+ ## Image models
145
+
146
+ ### Flux Pro (`flux`)
147
+
148
+ **Write a photography brief, not a description.**
149
+
150
+ ```
151
+ [Camera body], [lens], [aperture]. [Subject front-loaded]. [Lighting: type + quality].
152
+ [Technical style].
153
+ ```
154
+
155
+ | Do | Don't |
156
+ |----|-------|
157
+ | "Sony A7 IV, 85mm f/1.4, f/1.8" | Omit camera specs |
158
+ | "Hasselblad", "Leica M11", "Fujifilm GFX" for premium feel | Generic "professional camera" |
159
+ | 60–150 words with technical specificity | Short vague descriptions |
160
+ | Subject first, then specs, then lighting | Specs first |
161
+
162
+ ---
163
+
164
+ ### Midjourney V8.1 (`midjourney`)
165
+
166
+ **Keyword list + parameters. Not sentences.**
167
+
168
+ ```
169
+ [subject], [style descriptors], [lighting], [mood], [composition] --ar 16:9 --s 300 --v 8.1 --style raw
170
+ ```
171
+
172
+ | Do | Don't |
173
+ |----|-------|
174
+ | Comma-separated keywords | Full sentences |
175
+ | `--ar 16:9 --s 300 --v 8.1 --style raw` appended | Forget parameters |
176
+ | Style refs: "in the style of [artist]" | Generic "beautiful" |
177
+ | Lighting keywords: "rim lighting", "golden hour", "dramatic side light" | Skip lighting |
178
+ | Remove conversational language | "please make", "I want" |
179
+
180
+ ---
181
+
182
+ ### Ideogram V4 (`ideogram`)
183
+
184
+ **Text to render MUST be in double quotes inside the prompt.**
185
+
186
+ ```
187
+ [Background/composition context]. [Font style]: "[TEXT IN QUOTES]". [Color palette].
188
+ ```
189
+
190
+ | Do | Don't |
191
+ |----|-------|
192
+ | `"SALE"`, `"Open"`, `"DailyWell"` — exact text in double quotes | "text that says SALE" |
193
+ | Keep each text element under 5 words | Long text strings |
194
+ | Describe font: "bold sans-serif", "neon 3D", "handwritten", "italic serif" | Skip font style |
195
+ | Describe the background + composition | Prompt only the text |
196
+
197
+ ---
198
+
199
+ ### Adobe Firefly 5 (`firefly`)
200
+
201
+ **Commercial context explicit. No trademarked names.**
202
+
203
+ ```
204
+ [Commercial context: product photography / brand asset]. [Subject precision].
205
+ [Lighting setup]. [Style]. [Color mood].
206
+ ```
207
+
208
+ | Do | Don't |
209
+ |----|-------|
210
+ | "product photography for a health supplement brand" | Vague "photo of a bottle" |
211
+ | "professional", "editorial", "clean studio", "lifestyle" | Generic "high quality" |
212
+ | End with color mood: "Warm amber tones. Premium feel." | Skip mood |
213
+ | Avoid trademarked brands, characters | Name real brands/IPs (defeats IP-safety) |
214
+
215
+ ---
216
+
217
+ ## Universal rules
218
+
219
+ 1. **Score before you generate.** A D-grade prompt wastes the credit. `score_prompt → enhance_prompt → generate`.
220
+ 2. **Specificity beats quality adjectives.** "warm sodium-vapor glow" > "beautiful lighting".
221
+ 3. **Name the motion, not the result.** "silk draping over her shoulder" > "looks elegant".
222
+ 4. **Camera ≠ style.** They're separate signals. Both matter.
223
+ 5. **End with an anchor.** A mood/style closing line (even just "Cinematic. No text.") consistently lifts scores.
224
+
225
+ ---
226
+
227
+ ## Contributing
228
+
229
+ Found a pattern that consistently scores A on a specific model? [Open an issue](https://github.com/Lulu-The-Narwhal/dali-mcp/issues) with:
230
+ - Model name
231
+ - The pattern (ideally as a template)
232
+ - A real prompt + result that scored A
233
+
234
+ Source it from Reddit, Discord, or YouTube — practitioner evidence beats theory.
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "dali-mcp"
7
+ version = "0.1.0"
8
+ description = "Dali by Lulu — creative intelligence MCP. Score your prompt before you spend the credit."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = { text = "MIT" }
12
+ keywords = ["mcp", "ai", "prompts", "creative", "image", "video", "midjourney", "veo", "higgsfield", "flux", "lulu"]
13
+ classifiers = [
14
+ "Development Status :: 3 - Alpha",
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3",
18
+ ]
19
+ dependencies = [
20
+ "fastmcp>=0.1.0",
21
+ "httpx>=0.27.0",
22
+ ]
23
+
24
+ [project.scripts]
25
+ dali = "dali.server:main"
26
+
27
+ [project.urls]
28
+ Homepage = "https://dali.getlulu.dev"
29
+ Repository = "https://github.com/Lulu-The-Narwhal/dali-mcp"
30
+
31
+ [tool.hatch.build.targets.wheel]
32
+ packages = ["dali"]
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.Lulu-The-Narwhal/dali",
4
+ "title": "Dali by Lulu",
5
+ "description": "The prediction MCP that helps you avoid the AI generation tax. Score your prompt 0-100 before generating — so you never waste a credit on a bad prompt again. Supports Veo 3, Seedance, Kling, Runway, Wan, Minimax, Higgsfield, Flux, Midjourney, Ideogram, Firefly.",
6
+ "version": "0.1.0",
7
+ "packages": [
8
+ {
9
+ "registryType": "pypi",
10
+ "identifier": "dali-mcp",
11
+ "version": "0.1.0",
12
+ "transport": {
13
+ "type": "stdio"
14
+ }
15
+ }
16
+ ],
17
+ "remotes": [
18
+ {
19
+ "type": "streamable-http",
20
+ "url": "https://dali.getlulu.dev/mcp"
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,115 @@
1
+ # SKILL: Dali Creative Intelligence — Proactive Prompt Scoring
2
+
3
+ You have access to the **Dali MCP** (`dali.getlulu.dev`). Use it BEFORE any image or video generation.
4
+ The golden rule: **never spend a generation credit on an unscored prompt.**
5
+
6
+ ## When to activate
7
+
8
+ Any time the user's intent involves generating, creating, rendering, or making an image or video:
9
+ - Keywords: generate, create, make, draw, render, animate, illustrate, design, produce
10
+ - Media types: image, photo, picture, video, clip, footage, reel, scene, animation
11
+
12
+ Also activate when a user pastes a raw prompt without asking to score it — score it anyway.
13
+
14
+ ## The Flow
15
+
16
+ ### Step 1: Detect model
17
+ If the user doesn't specify a model, infer from context:
18
+
19
+ **Video:**
20
+ - Cinematic brand/narrative → `veo3`
21
+ - UGC, TikTok, social → `seedance`
22
+ - Character animation, facial performance → `kling`
23
+ - VFX, motion-first → `runway`
24
+ - Native audio, 4K → `wan`
25
+ - Cinematic storytelling with camera control → `minimax`
26
+ - Physics-driven (cloth, hair, fluid) → `higgsfield`
27
+
28
+ **Image:**
29
+ - Photorealistic, product photography → `flux`
30
+ - Artistic, editorial, stylized → `midjourney`
31
+ - Typography, logos, text-in-image → `ideogram`
32
+ - IP-safe commercial → `firefly`
33
+
34
+ If still ambiguous: "Which model are you targeting?" and list: `veo3, seedance, kling, runway, wan, minimax, higgsfield, flux, midjourney, ideogram, firefly`
35
+
36
+ ### Step 2: Score immediately
37
+ Call `score_prompt(prompt=<prompt>, model=<model>)`.
38
+
39
+ Present concisely:
40
+ - Grade + score: "**Grade C — 58/100**"
41
+ - 2–3 bullet points of what's missing (from `missing` array)
42
+ - One-line verdict
43
+
44
+ ### Step 3: Decision
45
+
46
+ | Grade | Score | Action |
47
+ |-------|-------|--------|
48
+ | A | 90+ | Confirm and generate |
49
+ | B | 70–89 | Confirm and generate |
50
+ | C | 50–69 | Offer to enhance. If user agrees or doesn't object → enhance |
51
+ | D/F | < 50 | Enhance automatically. Show before/after. Use enhanced prompt. |
52
+
53
+ ### Step 4: Enhance (when triggered)
54
+ Call `enhance_prompt(prompt=<prompt>, model=<model>)`.
55
+
56
+ The tool returns a **rewrite brief** — not a finished prompt. YOU write the enhanced prompt using it.
57
+
58
+ The brief contains:
59
+ - `native_language_rules` — how this model thinks
60
+ - `structure_template` — the prompt format to follow
61
+ - `priority_fixes` — what to add, by weight × gap
62
+ - `length_target` — target word count
63
+ - `what_to_add` — specific missing elements
64
+
65
+ **Your job**: write the enhanced prompt using these rules. Then call `score_prompt` on what you wrote to verify improvement.
66
+
67
+ Show:
68
+ - Score delta: "8 → 91 (+83 pts)"
69
+ - What changed (key additions from the brief)
70
+ - Enhanced prompt in a code block
71
+ - Score verification result
72
+
73
+ ### Step 5: Generate
74
+ Always use the highest-scoring prompt (your enhanced version, not a raw API field).
75
+
76
+ ## Output format (keep it tight)
77
+
78
+ ```
79
+ Scored: **Grade F — 8/100** for Veo3
80
+ Missing: camera move, motion description, lighting · 8 words only
81
+ Verdict: Generic stock footage guaranteed. Enhancing...
82
+
83
+ Brief applied:
84
+ ① camera move first: "Slow orbital push"
85
+ ② physics: "drop falls", "liquid ripples", "glass refracts"
86
+ ③ lighting: "warm backlight", "rim-lit edges"
87
+
88
+ Enhanced prompt:
89
+ ```
90
+ "Slow orbital push around a glass serum bottle on white marble. A single amber
91
+ drop falls in extreme slow motion, catching warm backlight. Macro: liquid gold
92
+ ripples outward from impact. Rim-lit edges, soft studio diffusion. Premium,
93
+ clinical. No text."
94
+ ```
95
+
96
+ Re-scored: **Grade A — 91/100** ✓ Safe to generate.
97
+ Ready to generate with this?
98
+ ```
99
+
100
+ ## Rules
101
+
102
+ - Score FIRST, always — before generating anything
103
+ - Don't ask permission to score — just do it
104
+ - Do ask permission to enhance if grade is C (auto-enhance D/F)
105
+ - Never dump raw JSON — translate to human-readable output
106
+ - Lead with grade + missing — not the full dimension breakdown
107
+ - **You write the enhanced prompt from the brief** — don't look for an `enhanced_prompt` field in the response
108
+ - Always re-score your enhanced version to show the delta
109
+
110
+ ## Community tools (bonus)
111
+
112
+ - Grade C or below → call `community_benchmark(prompt, model)` to show missing A-grade patterns
113
+ - "What makes a good [model] prompt?" → call `creative_patterns(model)` and summarize top 5
114
+ - "Show my history" → call `my_story()`
115
+ - "What models do you support?" → call `list_models()`