@inliner/mcp-server 1.0.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/README.md ADDED
@@ -0,0 +1,100 @@
1
+ # @inliner/mcp-server
2
+
3
+ MCP server for [Inliner.ai](https://inliner.ai) — gives AI coding agents live access to your image projects, credits, and generation.
4
+
5
+ Works with any [Model Context Protocol](https://modelcontextprotocol.io) compatible tool: Claude Code, OpenAI Codex CLI, GitHub Copilot, Gemini CLI, Cursor, Windsurf, and more.
6
+
7
+ ## Install
8
+
9
+ ### Claude Code
10
+ ```bash
11
+ claude mcp add --transport stdio inliner -- npx @inliner/mcp-server --api-key=YOUR_API_KEY
12
+
13
+ # Or with environment variable
14
+ export INLINER_API_KEY=your-key
15
+ claude mcp add --transport stdio inliner -- npx @inliner/mcp-server
16
+ ```
17
+
18
+ ### OpenAI Codex CLI
19
+ Add to `~/.codex/config.toml`:
20
+ ```toml
21
+ [mcp.inliner]
22
+ command = "npx"
23
+ args = ["@inliner/mcp-server"]
24
+ env = { INLINER_API_KEY = "your-key" }
25
+ ```
26
+
27
+ ### Gemini CLI
28
+ Add to `~/.gemini/settings.json`:
29
+ ```json
30
+ {
31
+ "mcpServers": {
32
+ "inliner": {
33
+ "command": "npx",
34
+ "args": ["@inliner/mcp-server"],
35
+ "env": { "INLINER_API_KEY": "your-key" }
36
+ }
37
+ }
38
+ }
39
+ ```
40
+
41
+ ### VS Code / Cursor / Windsurf
42
+ Add to MCP settings:
43
+ ```json
44
+ {
45
+ "mcpServers": {
46
+ "inliner": {
47
+ "command": "npx",
48
+ "args": ["@inliner/mcp-server"],
49
+ "env": { "INLINER_API_KEY": "your-key" }
50
+ }
51
+ }
52
+ }
53
+ ```
54
+
55
+ ## Tools
56
+
57
+ | Tool | Description |
58
+ |------|-------------|
59
+ | `generate_image_url` | Build a properly formatted Inliner image URL from description, dimensions, and project |
60
+ | `get_projects` | List all your Inliner projects with namespaces and settings |
61
+ | `get_project_details` | Get detailed project config: namespace, custom prompt, reference images |
62
+ | `get_usage` | Check remaining credits (base, premium, edit, infill, enhance) |
63
+ | `get_current_plan` | View current subscription plan and feature allocations |
64
+ | `list_images` | List generated images with optional project filter |
65
+ | `get_image_dimensions` | Get recommended dimensions for common use cases (hero, product, profile, etc.) |
66
+
67
+ ## Resources
68
+
69
+ | Resource | URI | Description |
70
+ |----------|-----|-------------|
71
+ | Inliner Guide | `inliner://guide` | Quick reference for URL format, dimensions, and style hints |
72
+
73
+ ## Example Interaction
74
+
75
+ Once installed, ask your AI agent naturally:
76
+
77
+ > "Add a hero image to the landing page for my acme-corp project"
78
+
79
+ The agent will:
80
+ 1. Call `get_project_details` to get your project config
81
+ 2. Call `generate_image_url` with the right namespace and dimensions
82
+ 3. Output the `<img>` tag with the correct URL, alt text, and loading attributes
83
+
84
+ > "How many image credits do I have left?"
85
+
86
+ The agent calls `get_usage` and reports your remaining credits by type.
87
+
88
+ ## API Key
89
+
90
+ Generate an API key from **Account > API Keys** in the [Inliner dashboard](https://app.inliner.ai/account). Only account owners can create and revoke keys.
91
+
92
+ Pass it via:
93
+ - Environment variable: `INLINER_API_KEY`
94
+ - Command-line argument: `--api-key=YOUR_KEY`
95
+
96
+ ## Links
97
+
98
+ - [Inliner.ai](https://inliner.ai)
99
+ - [Tutorials](https://inliner.ai/tutorial)
100
+ - [Model Context Protocol](https://modelcontextprotocol.io)
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,339 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
5
+ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
6
+ const zod_1 = require("zod");
7
+ const API_BASE = process.env.INLINER_API_URL || "https://app.inliner.ai";
8
+ const IMG_BASE = "https://img.inliner.ai";
9
+ function getApiKey() {
10
+ const key = process.env.INLINER_API_KEY ||
11
+ process.argv.find((a) => a.startsWith("--api-key="))?.split("=")[1];
12
+ if (!key) {
13
+ console.error("Error: INLINER_API_KEY environment variable or --api-key argument required");
14
+ process.exit(1);
15
+ }
16
+ return key;
17
+ }
18
+ async function apiFetch(path, apiKey, options) {
19
+ const url = `${API_BASE}/${path}`;
20
+ const res = await fetch(url, {
21
+ ...options,
22
+ headers: {
23
+ Authorization: `Bearer ${apiKey}`,
24
+ "Content-Type": "application/json",
25
+ ...(options?.headers || {}),
26
+ },
27
+ });
28
+ if (!res.ok) {
29
+ const body = await res.text();
30
+ throw new Error(`API error ${res.status}: ${body}`);
31
+ }
32
+ return res.json();
33
+ }
34
+ // --- Server setup ---
35
+ const server = new mcp_js_1.McpServer({
36
+ name: "inliner",
37
+ version: "1.0.0",
38
+ });
39
+ const apiKey = getApiKey();
40
+ // --- Tools ---
41
+ server.tool("generate_image_url", "Build a properly formatted Inliner.ai image URL from a description, dimensions, and project namespace", {
42
+ project: zod_1.z
43
+ .string()
44
+ .describe("Project namespace from Inliner dashboard (e.g. 'my-project')"),
45
+ description: zod_1.z
46
+ .string()
47
+ .describe("Hyphenated image description (e.g. 'modern-office-team-meeting')"),
48
+ width: zod_1.z
49
+ .number()
50
+ .min(100)
51
+ .max(4096)
52
+ .describe("Image width in pixels (100-4096)"),
53
+ height: zod_1.z
54
+ .number()
55
+ .min(100)
56
+ .max(4096)
57
+ .describe("Image height in pixels (100-4096)"),
58
+ format: zod_1.z
59
+ .enum(["png", "jpg"])
60
+ .default("png")
61
+ .describe("Image format: png (transparency) or jpg (photos)"),
62
+ edit: zod_1.z
63
+ .string()
64
+ .optional()
65
+ .describe("Optional edit instruction to apply to an existing image (e.g. 'make-background-blue')"),
66
+ }, async ({ project, description, width, height, format, edit }) => {
67
+ const sanitized = description
68
+ .toLowerCase()
69
+ .replace(/[^a-z0-9-]/g, "-")
70
+ .replace(/-+/g, "-")
71
+ .replace(/^-|-$/g, "")
72
+ .slice(0, 100);
73
+ let url = `${IMG_BASE}/${project}/${sanitized}_${width}x${height}`;
74
+ if (edit) {
75
+ const sanitizedEdit = edit
76
+ .toLowerCase()
77
+ .replace(/[^a-z0-9-]/g, "-")
78
+ .replace(/-+/g, "-");
79
+ url += `/${sanitizedEdit}`;
80
+ }
81
+ url += `.${format}`;
82
+ const html = `<img src="${url}" alt="${description.replace(/-/g, " ")}" width="${width}" height="${height}" loading="lazy" />`;
83
+ return {
84
+ content: [
85
+ {
86
+ type: "text",
87
+ text: JSON.stringify({ url, html }, null, 2),
88
+ },
89
+ ],
90
+ };
91
+ });
92
+ server.tool("get_projects", "List all Inliner projects for the authenticated account, including namespaces and settings", {}, async () => {
93
+ try {
94
+ const data = await apiFetch("account/projects", apiKey);
95
+ return {
96
+ content: [
97
+ {
98
+ type: "text",
99
+ text: JSON.stringify(data, null, 2),
100
+ },
101
+ ],
102
+ };
103
+ }
104
+ catch (err) {
105
+ return {
106
+ content: [
107
+ {
108
+ type: "text",
109
+ text: `Error fetching projects: ${err.message}`,
110
+ },
111
+ ],
112
+ isError: true,
113
+ };
114
+ }
115
+ });
116
+ server.tool("get_project_details", "Get detailed configuration for a specific project including namespace, custom prompt, and reference images", {
117
+ projectId: zod_1.z.string().describe("Project ID from get_projects"),
118
+ }, async ({ projectId }) => {
119
+ try {
120
+ const data = await apiFetch(`account/projects/${projectId}`, apiKey);
121
+ return {
122
+ content: [
123
+ {
124
+ type: "text",
125
+ text: JSON.stringify(data, null, 2),
126
+ },
127
+ ],
128
+ };
129
+ }
130
+ catch (err) {
131
+ return {
132
+ content: [
133
+ {
134
+ type: "text",
135
+ text: `Error fetching project: ${err.message}`,
136
+ },
137
+ ],
138
+ isError: true,
139
+ };
140
+ }
141
+ });
142
+ server.tool("get_usage", "Check remaining credits by type (base images, premium images, edits, infill, enhancement) for the current billing period", {}, async () => {
143
+ try {
144
+ const data = await apiFetch("account/plan-usage", apiKey);
145
+ return {
146
+ content: [
147
+ {
148
+ type: "text",
149
+ text: JSON.stringify(data, null, 2),
150
+ },
151
+ ],
152
+ };
153
+ }
154
+ catch (err) {
155
+ return {
156
+ content: [
157
+ {
158
+ type: "text",
159
+ text: `Error fetching usage: ${err.message}`,
160
+ },
161
+ ],
162
+ isError: true,
163
+ };
164
+ }
165
+ });
166
+ server.tool("get_current_plan", "Get the current subscription plan and its feature allocations", {}, async () => {
167
+ try {
168
+ const data = await apiFetch("account/current-plan", apiKey);
169
+ return {
170
+ content: [
171
+ {
172
+ type: "text",
173
+ text: JSON.stringify(data, null, 2),
174
+ },
175
+ ],
176
+ };
177
+ }
178
+ catch (err) {
179
+ return {
180
+ content: [
181
+ {
182
+ type: "text",
183
+ text: `Error fetching plan: ${err.message}`,
184
+ },
185
+ ],
186
+ isError: true,
187
+ };
188
+ }
189
+ });
190
+ server.tool("list_images", "List generated images in a project, with optional filtering", {
191
+ projectId: zod_1.z
192
+ .string()
193
+ .optional()
194
+ .describe("Filter by project ID (from get_projects)"),
195
+ limit: zod_1.z
196
+ .number()
197
+ .min(1)
198
+ .max(100)
199
+ .default(20)
200
+ .describe("Number of images to return (1-100, default 20)"),
201
+ }, async ({ projectId, limit }) => {
202
+ try {
203
+ let path = `content/images?limit=${limit}`;
204
+ if (projectId) {
205
+ path += `&projectId=${projectId}`;
206
+ }
207
+ const data = await apiFetch(path, apiKey);
208
+ return {
209
+ content: [
210
+ {
211
+ type: "text",
212
+ text: JSON.stringify(data, null, 2),
213
+ },
214
+ ],
215
+ };
216
+ }
217
+ catch (err) {
218
+ return {
219
+ content: [
220
+ {
221
+ type: "text",
222
+ text: `Error fetching images: ${err.message}`,
223
+ },
224
+ ],
225
+ isError: true,
226
+ };
227
+ }
228
+ });
229
+ server.tool("get_image_dimensions", "Get recommended image dimensions for common use cases", {
230
+ useCase: zod_1.z
231
+ .enum([
232
+ "hero",
233
+ "product",
234
+ "profile",
235
+ "card",
236
+ "thumbnail",
237
+ "social",
238
+ "logo",
239
+ "youtube",
240
+ "banner",
241
+ ])
242
+ .describe("The intended use case for the image"),
243
+ }, async ({ useCase }) => {
244
+ const dimensions = {
245
+ hero: [
246
+ { width: 1920, height: 1080, notes: "Full-width hero, 16:9" },
247
+ { width: 1200, height: 600, notes: "Standard hero, 2:1" },
248
+ ],
249
+ product: [
250
+ { width: 800, height: 800, notes: "Square product shot" },
251
+ { width: 600, height: 400, notes: "Landscape product card" },
252
+ ],
253
+ profile: [
254
+ { width: 400, height: 400, notes: "Standard avatar" },
255
+ { width: 300, height: 300, notes: "Small avatar" },
256
+ ],
257
+ card: [
258
+ { width: 600, height: 400, notes: "Feature card" },
259
+ { width: 800, height: 600, notes: "Large card" },
260
+ ],
261
+ thumbnail: [
262
+ { width: 200, height: 200, notes: "Grid thumbnail" },
263
+ { width: 150, height: 150, notes: "Small thumbnail" },
264
+ ],
265
+ social: [
266
+ { width: 1200, height: 630, notes: "Open Graph / Facebook" },
267
+ { width: 1200, height: 675, notes: "Twitter card" },
268
+ ],
269
+ logo: [
270
+ { width: 200, height: 200, notes: "Square logo, use .png" },
271
+ { width: 100, height: 100, notes: "Small icon, use .png" },
272
+ ],
273
+ youtube: [
274
+ { width: 1280, height: 720, notes: "YouTube thumbnail, 16:9" },
275
+ ],
276
+ banner: [
277
+ { width: 1920, height: 400, notes: "Wide banner" },
278
+ { width: 1200, height: 300, notes: "Standard banner" },
279
+ ],
280
+ };
281
+ return {
282
+ content: [
283
+ {
284
+ type: "text",
285
+ text: JSON.stringify({
286
+ useCase,
287
+ recommended: dimensions[useCase],
288
+ format_hint: useCase === "logo"
289
+ ? "Use .png for transparency support"
290
+ : "Use .jpg for photos, .png for graphics/transparency",
291
+ }, null, 2),
292
+ },
293
+ ],
294
+ };
295
+ });
296
+ // --- Resources ---
297
+ server.resource("inliner-guide", "inliner://guide", async (uri) => ({
298
+ contents: [
299
+ {
300
+ uri: uri.href,
301
+ mimeType: "text/markdown",
302
+ text: `# Inliner.ai Quick Reference
303
+
304
+ ## URL Format
305
+ \`https://img.inliner.ai/{project}/{description}_{WxH}.{png|jpg}\`
306
+
307
+ ## Image Editing
308
+ Append edit instructions: \`/{original-url}/{edit-instruction}.png\`
309
+
310
+ ## Common Dimensions
311
+ - Hero: 1920x1080, 1200x600
312
+ - Product: 800x800, 600x400
313
+ - Profile: 400x400
314
+ - Card: 600x400
315
+ - Social: 1200x630
316
+ - Logo: 200x200 (use .png)
317
+
318
+ ## Style Hints
319
+ Include in description: flat-illustration, 3d-render, watercolor, pixel-art, minimalist, photorealistic
320
+
321
+ ## Tips
322
+ - Hyphenate descriptions: \`modern-office-team-meeting\`
323
+ - Keep under 100 characters
324
+ - Use .png for transparency, .jpg for photos
325
+ - Always include alt text and dimensions in HTML
326
+ `,
327
+ },
328
+ ],
329
+ }));
330
+ // --- Start ---
331
+ async function main() {
332
+ const transport = new stdio_js_1.StdioServerTransport();
333
+ await server.connect(transport);
334
+ }
335
+ main().catch((err) => {
336
+ console.error("Failed to start MCP server:", err);
337
+ process.exit(1);
338
+ });
339
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,oEAAoE;AACpE,wEAAiF;AACjF,6BAAwB;AAExB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,wBAAwB,CAAC;AACzE,MAAM,QAAQ,GAAG,wBAAwB,CAAC;AAE1C,SAAS,SAAS;IAChB,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,CAAC,eAAe;QAC3B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACtE,IAAI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,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;CAwBb;SACM;KACF;CACF,CAAC,CACH,CAAC;AAEF,gBAAgB;AAEhB,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,GAAG,CAAC,CAAC;IAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@inliner/mcp-server",
3
+ "version": "1.0.0",
4
+ "description": "MCP server for Inliner.ai — gives AI coding agents live access to your image projects, credits, and generation",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "inliner-mcp": "./dist/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "start": "node dist/index.js",
12
+ "dev": "ts-node src/index.ts"
13
+ },
14
+ "keywords": [
15
+ "inliner",
16
+ "mcp",
17
+ "model-context-protocol",
18
+ "ai-images",
19
+ "claude-code",
20
+ "codex",
21
+ "copilot",
22
+ "cursor",
23
+ "image-generation"
24
+ ],
25
+ "author": "Inliner <support@inliner.ai>",
26
+ "license": "MIT",
27
+ "homepage": "https://inliner.ai",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "https://github.com/inliner-ai/mcp-server"
31
+ },
32
+ "dependencies": {
33
+ "@modelcontextprotocol/sdk": "^1.0.0"
34
+ },
35
+ "devDependencies": {
36
+ "typescript": "^5.3.0",
37
+ "@types/node": "^20.0.0"
38
+ },
39
+ "files": [
40
+ "dist/",
41
+ "README.md"
42
+ ],
43
+ "engines": {
44
+ "node": ">=18"
45
+ }
46
+ }