@createa/meme-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/README.md +83 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +296 -0
- package/dist/index.js.map +1 -0
- package/package.json +46 -0
package/README.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# @createa/meme-mcp
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server for the [Createa Meme API](https://createa.meme). Lets Claude Code, Cursor, Cline, Continue, and any other MCP-compatible client generate memes through natural language.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
You don't install — your MCP client runs it on demand via `npx`.
|
|
8
|
+
|
|
9
|
+
### Claude Code
|
|
10
|
+
|
|
11
|
+
Add to `~/.claude.json` or your project's `.claude/mcp.json`:
|
|
12
|
+
|
|
13
|
+
```jsonc
|
|
14
|
+
{
|
|
15
|
+
"mcpServers": {
|
|
16
|
+
"createa": {
|
|
17
|
+
"command": "npx",
|
|
18
|
+
"args": ["-y", "@createa/meme-mcp"],
|
|
19
|
+
"env": {
|
|
20
|
+
"CAM_API_KEY": "cam_live_xxxxxxxxxxxxxxxxxxxx"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Cursor
|
|
28
|
+
|
|
29
|
+
`~/.cursor/mcp.json`:
|
|
30
|
+
|
|
31
|
+
```jsonc
|
|
32
|
+
{
|
|
33
|
+
"mcpServers": {
|
|
34
|
+
"createa": {
|
|
35
|
+
"command": "npx",
|
|
36
|
+
"args": ["-y", "@createa/meme-mcp"],
|
|
37
|
+
"env": { "CAM_API_KEY": "cam_live_xxxxxxxxxxxxxxxxxxxx" }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Cline / Continue
|
|
44
|
+
|
|
45
|
+
Same shape as the above — both speak standard stdio MCP.
|
|
46
|
+
|
|
47
|
+
## Get an API key
|
|
48
|
+
|
|
49
|
+
Sign up free at <https://dashboard.createa.meme>. The free tier includes 20 generations per month. Replace `cam_live_xxxxxxxxxxxxxxxxxxxx` with the key shown after signup.
|
|
50
|
+
|
|
51
|
+
## Tools exposed
|
|
52
|
+
|
|
53
|
+
| Tool | What it does | Cost |
|
|
54
|
+
|---|---|---|
|
|
55
|
+
| `createa_meme_generate` | Text-to-meme — AI picks template + writes captions | 2 credits |
|
|
56
|
+
| `createa_meme_caption` | Caption a known template with text you supply | 1 credit |
|
|
57
|
+
| `createa_meme_ai_image` | Generate original AI imagery with optional captions | 3 credits |
|
|
58
|
+
| `createa_template_search` | Find templates by keyword or category | free |
|
|
59
|
+
|
|
60
|
+
## Example prompts
|
|
61
|
+
|
|
62
|
+
Once installed, just ask your MCP client:
|
|
63
|
+
|
|
64
|
+
> "Make me a meme about Monday morning meetings."
|
|
65
|
+
|
|
66
|
+
> "Caption the Drake template — top: writing tests, bottom: writing the test that proves the bug exists."
|
|
67
|
+
|
|
68
|
+
> "Generate an AI meme of a confused cat looking at deployment errors, top caption WORKS ON MY MACHINE, bottom MY MACHINE WAS LYING."
|
|
69
|
+
|
|
70
|
+
> "Find me a meme template for celebrating shipping something."
|
|
71
|
+
|
|
72
|
+
## Configuration
|
|
73
|
+
|
|
74
|
+
Environment variables (all optional except `CAM_API_KEY`):
|
|
75
|
+
|
|
76
|
+
| Var | Default | Purpose |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| `CAM_API_KEY` | — | **Required.** Your createa.meme API key. |
|
|
79
|
+
| `CAM_BASE_URL` | `https://api.createa.meme` | Override for self-hosting / staging. |
|
|
80
|
+
|
|
81
|
+
## License
|
|
82
|
+
|
|
83
|
+
Source not currently public. The published npm package is free to use under the [Createa Meme API Terms of Service](https://docs.createa.meme/docs/terms).
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Createa Meme — MCP server (stdio).
|
|
4
|
+
*
|
|
5
|
+
* Lets any MCP client (Claude Code, Cursor, Cline, Continue, ...) call the
|
|
6
|
+
* Createa Meme API directly. Users install with `npx @createa/meme-mcp`
|
|
7
|
+
* and configure their client with their API key in the env.
|
|
8
|
+
*
|
|
9
|
+
* Tools exposed:
|
|
10
|
+
* - createa_meme_generate text -> AI picks template + writes captions
|
|
11
|
+
* - createa_meme_caption overlay your captions on a known template
|
|
12
|
+
* - createa_meme_ai_image generate an original AI image with optional caption
|
|
13
|
+
* - createa_template_search find templates by keyword/category
|
|
14
|
+
*
|
|
15
|
+
* The Bearer key lives in CAM_API_KEY (or the deprecated CREATEA_MEME_API_KEY).
|
|
16
|
+
* No API key = the server still starts but every tool returns a friendly
|
|
17
|
+
* "set your API key" error so MCP clients can show a useful message.
|
|
18
|
+
*/
|
|
19
|
+
export {};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Createa Meme — MCP server (stdio).
|
|
4
|
+
*
|
|
5
|
+
* Lets any MCP client (Claude Code, Cursor, Cline, Continue, ...) call the
|
|
6
|
+
* Createa Meme API directly. Users install with `npx @createa/meme-mcp`
|
|
7
|
+
* and configure their client with their API key in the env.
|
|
8
|
+
*
|
|
9
|
+
* Tools exposed:
|
|
10
|
+
* - createa_meme_generate text -> AI picks template + writes captions
|
|
11
|
+
* - createa_meme_caption overlay your captions on a known template
|
|
12
|
+
* - createa_meme_ai_image generate an original AI image with optional caption
|
|
13
|
+
* - createa_template_search find templates by keyword/category
|
|
14
|
+
*
|
|
15
|
+
* The Bearer key lives in CAM_API_KEY (or the deprecated CREATEA_MEME_API_KEY).
|
|
16
|
+
* No API key = the server still starts but every tool returns a friendly
|
|
17
|
+
* "set your API key" error so MCP clients can show a useful message.
|
|
18
|
+
*/
|
|
19
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
20
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
21
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
22
|
+
import { z } from 'zod';
|
|
23
|
+
const PACKAGE_VERSION = '0.1.0';
|
|
24
|
+
const DEFAULT_BASE = 'https://api.createa.meme';
|
|
25
|
+
const apiKey = process.env.CAM_API_KEY ?? process.env.CREATEA_MEME_API_KEY ?? '';
|
|
26
|
+
const baseUrl = process.env.CAM_BASE_URL ?? DEFAULT_BASE;
|
|
27
|
+
// ---- Tool definitions -----------------------------------------------------
|
|
28
|
+
const TOOLS = [
|
|
29
|
+
{
|
|
30
|
+
name: 'createa_meme_generate',
|
|
31
|
+
description: 'Generate a meme from a text prompt. Picks the best template and writes captions automatically using a frontier LLM. Best when you have an idea but not a specific template in mind. Returns a CDN URL for the rendered meme. Costs 2 credits per meme.',
|
|
32
|
+
inputSchema: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
text: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: 'The idea, joke, or situation to memify.',
|
|
38
|
+
},
|
|
39
|
+
count: {
|
|
40
|
+
type: 'number',
|
|
41
|
+
description: 'Number of meme variations to generate (1-3). Default 1.',
|
|
42
|
+
default: 1,
|
|
43
|
+
minimum: 1,
|
|
44
|
+
maximum: 3,
|
|
45
|
+
},
|
|
46
|
+
tone: {
|
|
47
|
+
type: 'string',
|
|
48
|
+
enum: ['funny', 'sarcastic', 'wholesome', 'dark', 'corporate', 'gen_z'],
|
|
49
|
+
description: 'Optional tone hint. One of: funny, sarcastic, wholesome, dark, corporate, gen_z.',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
required: ['text'],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'createa_meme_caption',
|
|
57
|
+
description: 'Caption a known template with text you provide. Use when you already know which template you want. Cheaper and faster than meme_generate. Costs 1 credit.',
|
|
58
|
+
inputSchema: {
|
|
59
|
+
type: 'object',
|
|
60
|
+
properties: {
|
|
61
|
+
template_id: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
description: 'Template ID, e.g. "tpl_drake". Use createa_template_search to find one.',
|
|
64
|
+
},
|
|
65
|
+
captions: {
|
|
66
|
+
type: 'array',
|
|
67
|
+
items: {
|
|
68
|
+
type: 'object',
|
|
69
|
+
properties: {
|
|
70
|
+
text: { type: 'string' },
|
|
71
|
+
position: {
|
|
72
|
+
type: 'string',
|
|
73
|
+
enum: ['top', 'bottom', 'left', 'right', 'center'],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
required: ['text', 'position'],
|
|
77
|
+
},
|
|
78
|
+
description: 'One or more captions with their positions.',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
required: ['template_id', 'captions'],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'createa_meme_ai_image',
|
|
86
|
+
description: 'Generate an original AI image with optional meme captions. Use when no existing template fits. Slower (~10s) and more expensive (3 credits) than caption/generate, but uniquely flexible.',
|
|
87
|
+
inputSchema: {
|
|
88
|
+
type: 'object',
|
|
89
|
+
properties: {
|
|
90
|
+
prompt: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
description: 'What to draw, e.g. "a confused cat looking at deployment errors".',
|
|
93
|
+
},
|
|
94
|
+
caption_top: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
description: 'Optional top caption. Combine with caption_bottom for a classic meme.',
|
|
97
|
+
},
|
|
98
|
+
caption_bottom: {
|
|
99
|
+
type: 'string',
|
|
100
|
+
description: 'Optional bottom caption.',
|
|
101
|
+
},
|
|
102
|
+
aspect_ratio: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
enum: ['1:1', '4:3', '16:9', '3:4', '9:16'],
|
|
105
|
+
default: '1:1',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
required: ['prompt'],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'createa_template_search',
|
|
113
|
+
description: 'Search the template library by keyword or category. Use to find a template_id before calling createa_meme_caption. Free.',
|
|
114
|
+
inputSchema: {
|
|
115
|
+
type: 'object',
|
|
116
|
+
properties: {
|
|
117
|
+
query: {
|
|
118
|
+
type: 'string',
|
|
119
|
+
description: 'Search keyword, e.g. "drake", "rocket", "monday".',
|
|
120
|
+
},
|
|
121
|
+
category: {
|
|
122
|
+
type: 'string',
|
|
123
|
+
description: 'Optional category filter, e.g. "reactions", "comparison", "animals", "gaming", "tech".',
|
|
124
|
+
},
|
|
125
|
+
limit: {
|
|
126
|
+
type: 'number',
|
|
127
|
+
description: 'Max results (1-20). Default 10.',
|
|
128
|
+
default: 10,
|
|
129
|
+
minimum: 1,
|
|
130
|
+
maximum: 20,
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
];
|
|
136
|
+
async function callApi(path, init = {}) {
|
|
137
|
+
if (!apiKey) {
|
|
138
|
+
return {
|
|
139
|
+
success: false,
|
|
140
|
+
error: {
|
|
141
|
+
code: 'NO_API_KEY',
|
|
142
|
+
message: 'Set CAM_API_KEY in your MCP client config. Get one free at https://dashboard.createa.meme.',
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
const res = await fetch(`${baseUrl}${path}`, {
|
|
147
|
+
...init,
|
|
148
|
+
headers: {
|
|
149
|
+
Authorization: `Bearer ${apiKey}`,
|
|
150
|
+
'Content-Type': 'application/json',
|
|
151
|
+
'User-Agent': `createa-meme-mcp/${PACKAGE_VERSION}`,
|
|
152
|
+
...(init.headers ?? {}),
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
let body;
|
|
156
|
+
try {
|
|
157
|
+
body = (await res.json());
|
|
158
|
+
}
|
|
159
|
+
catch {
|
|
160
|
+
return {
|
|
161
|
+
success: false,
|
|
162
|
+
error: { code: 'INVALID_RESPONSE', message: `Non-JSON response (status ${res.status})` },
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
return body;
|
|
166
|
+
}
|
|
167
|
+
function asTextResult(payload) {
|
|
168
|
+
return {
|
|
169
|
+
content: [
|
|
170
|
+
{
|
|
171
|
+
type: 'text',
|
|
172
|
+
text: typeof payload === 'string' ? payload : JSON.stringify(payload, null, 2),
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
// ---- Tool implementations -------------------------------------------------
|
|
178
|
+
async function handleGenerate(args) {
|
|
179
|
+
const schema = z.object({
|
|
180
|
+
text: z.string().min(1).max(2500),
|
|
181
|
+
count: z.number().int().min(1).max(3).default(1),
|
|
182
|
+
tone: z
|
|
183
|
+
.enum(['funny', 'sarcastic', 'wholesome', 'dark', 'corporate', 'gen_z'])
|
|
184
|
+
.optional(),
|
|
185
|
+
});
|
|
186
|
+
const input = schema.parse(args);
|
|
187
|
+
const res = await callApi('/v1/meme/generate', {
|
|
188
|
+
method: 'POST',
|
|
189
|
+
body: JSON.stringify(input),
|
|
190
|
+
});
|
|
191
|
+
if (!res.success || !res.data)
|
|
192
|
+
return asTextResult(res.error ?? 'Unknown error');
|
|
193
|
+
const lines = res.data.memes.map((m, i) => `${i + 1}. ${m.url}\n Template: ${m.template.name}\n Reasoning: ${m.reasoning ?? '(none)'}`);
|
|
194
|
+
return asTextResult(`Generated ${res.data.memes.length} meme(s):\n\n${lines.join('\n\n')}\n\nCredits remaining: ${res.meta?.credits_remaining ?? 'unknown'}`);
|
|
195
|
+
}
|
|
196
|
+
async function handleCaption(args) {
|
|
197
|
+
const schema = z.object({
|
|
198
|
+
template_id: z.string().min(1),
|
|
199
|
+
captions: z
|
|
200
|
+
.array(z.object({
|
|
201
|
+
text: z.string().min(1).max(500),
|
|
202
|
+
position: z.enum(['top', 'bottom', 'left', 'right', 'center']),
|
|
203
|
+
}))
|
|
204
|
+
.min(1)
|
|
205
|
+
.max(8),
|
|
206
|
+
});
|
|
207
|
+
const input = schema.parse(args);
|
|
208
|
+
const res = await callApi('/v1/meme/caption', {
|
|
209
|
+
method: 'POST',
|
|
210
|
+
body: JSON.stringify(input),
|
|
211
|
+
});
|
|
212
|
+
if (!res.success || !res.data)
|
|
213
|
+
return asTextResult(res.error ?? 'Unknown error');
|
|
214
|
+
return asTextResult(`Captioned: ${res.data.url}\n\nCredits remaining: ${res.meta?.credits_remaining ?? 'unknown'}`);
|
|
215
|
+
}
|
|
216
|
+
async function handleAiImage(args) {
|
|
217
|
+
const schema = z.object({
|
|
218
|
+
prompt: z.string().min(1).max(1000),
|
|
219
|
+
caption_top: z.string().optional(),
|
|
220
|
+
caption_bottom: z.string().optional(),
|
|
221
|
+
aspect_ratio: z.enum(['1:1', '4:3', '16:9', '3:4', '9:16']).default('1:1'),
|
|
222
|
+
});
|
|
223
|
+
const input = schema.parse(args);
|
|
224
|
+
const body = {
|
|
225
|
+
prompt: input.prompt,
|
|
226
|
+
aspect_ratio: input.aspect_ratio,
|
|
227
|
+
model: 'gpt-image',
|
|
228
|
+
output_format: 'png',
|
|
229
|
+
};
|
|
230
|
+
if (input.caption_top || input.caption_bottom) {
|
|
231
|
+
body.caption = { top: input.caption_top, bottom: input.caption_bottom };
|
|
232
|
+
}
|
|
233
|
+
const res = await callApi('/v1/meme/ai-image', {
|
|
234
|
+
method: 'POST',
|
|
235
|
+
body: JSON.stringify(body),
|
|
236
|
+
});
|
|
237
|
+
if (!res.success || !res.data)
|
|
238
|
+
return asTextResult(res.error ?? 'Unknown error');
|
|
239
|
+
return asTextResult(`AI image: ${res.data.url}\n\nCredits remaining: ${res.meta?.credits_remaining ?? 'unknown'}`);
|
|
240
|
+
}
|
|
241
|
+
async function handleTemplateSearch(args) {
|
|
242
|
+
const schema = z.object({
|
|
243
|
+
query: z.string().optional(),
|
|
244
|
+
category: z.string().optional(),
|
|
245
|
+
limit: z.number().int().min(1).max(20).default(10),
|
|
246
|
+
});
|
|
247
|
+
const input = schema.parse(args);
|
|
248
|
+
const params = new URLSearchParams();
|
|
249
|
+
if (input.query)
|
|
250
|
+
params.set('search', input.query);
|
|
251
|
+
if (input.category)
|
|
252
|
+
params.set('category', input.category);
|
|
253
|
+
params.set('limit', String(input.limit));
|
|
254
|
+
const res = await callApi(`/v1/templates?${params}`);
|
|
255
|
+
if (!res.success || !res.data)
|
|
256
|
+
return asTextResult(res.error ?? 'Unknown error');
|
|
257
|
+
if (res.data.templates.length === 0) {
|
|
258
|
+
return asTextResult('No templates found. Try a broader query.');
|
|
259
|
+
}
|
|
260
|
+
const lines = res.data.templates.map((t) => `- ${t.id} — "${t.name}" (${t.category})`);
|
|
261
|
+
return asTextResult(`Found ${res.data.templates.length} templates:\n\n${lines.join('\n')}`);
|
|
262
|
+
}
|
|
263
|
+
// ---- Server wiring --------------------------------------------------------
|
|
264
|
+
const server = new Server({ name: 'createa-meme', version: PACKAGE_VERSION }, { capabilities: { tools: {} } });
|
|
265
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
266
|
+
tools: TOOLS,
|
|
267
|
+
}));
|
|
268
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
269
|
+
const { name, arguments: args = {} } = request.params;
|
|
270
|
+
try {
|
|
271
|
+
switch (name) {
|
|
272
|
+
case 'createa_meme_generate':
|
|
273
|
+
return await handleGenerate(args);
|
|
274
|
+
case 'createa_meme_caption':
|
|
275
|
+
return await handleCaption(args);
|
|
276
|
+
case 'createa_meme_ai_image':
|
|
277
|
+
return await handleAiImage(args);
|
|
278
|
+
case 'createa_template_search':
|
|
279
|
+
return await handleTemplateSearch(args);
|
|
280
|
+
default:
|
|
281
|
+
return asTextResult(`Unknown tool: ${name}`);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
catch (err) {
|
|
285
|
+
if (err instanceof z.ZodError) {
|
|
286
|
+
return asTextResult(`Invalid arguments: ${err.issues.map((i) => i.message).join(', ')}`);
|
|
287
|
+
}
|
|
288
|
+
return asTextResult(`Error calling ${name}: ${err.message}`);
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
const transport = new StdioServerTransport();
|
|
292
|
+
await server.connect(transport);
|
|
293
|
+
// Stdio servers print nothing to stdout (it's the MCP transport). Errors go
|
|
294
|
+
// to stderr so MCP clients can surface them.
|
|
295
|
+
console.error(`[createa-meme-mcp ${PACKAGE_VERSION}] connected via stdio`);
|
|
296
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,eAAe,GAAG,OAAO,CAAA;AAC/B,MAAM,YAAY,GAAG,0BAA0B,CAAA;AAE/C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE,CAAA;AAChF,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,YAAY,CAAA;AAExD,8EAA8E;AAE9E,MAAM,KAAK,GAAG;IACZ;QACE,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EACT,wPAAwP;QAC1P,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,yCAAyC;iBACvD;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAA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.0",
|
|
4
|
+
"description": "MCP server for the Createa Meme API. Lets Claude, Cursor, Cline, and any MCP client generate memes via natural language.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"bin": {
|
|
9
|
+
"createa-meme-mcp": "dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc",
|
|
17
|
+
"dev": "tsc --watch",
|
|
18
|
+
"start": "node dist/index.js",
|
|
19
|
+
"prepublishOnly": "npm run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"mcp",
|
|
23
|
+
"model-context-protocol",
|
|
24
|
+
"claude",
|
|
25
|
+
"cursor",
|
|
26
|
+
"meme",
|
|
27
|
+
"createa",
|
|
28
|
+
"ai"
|
|
29
|
+
],
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
32
|
+
"zod": "^3.23.8"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/node": "^22.0.0",
|
|
36
|
+
"typescript": "^5.6.0"
|
|
37
|
+
},
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=18"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://createa.meme",
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "git+https://github.com/cryptojaz/createa-meme-mcp.git"
|
|
45
|
+
}
|
|
46
|
+
}
|