framlit-mcp 0.1.0 ā 0.2.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 +100 -42
- package/dist/api/client.d.ts +10 -0
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +13 -4
- package/dist/api/client.js.map +1 -1
- package/dist/cli/index.d.ts +26 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +439 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/output.d.ts +15 -0
- package/dist/cli/output.d.ts.map +1 -0
- package/dist/cli/output.js +41 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/core/handlers.d.ts +49 -0
- package/dist/core/handlers.d.ts.map +1 -0
- package/dist/core/handlers.js +148 -0
- package/dist/core/handlers.js.map +1 -0
- package/dist/core/registry.d.ts +25 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +221 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/schemas.d.ts +94 -0
- package/dist/core/schemas.d.ts.map +1 -0
- package/dist/core/schemas.js +69 -0
- package/dist/core/schemas.js.map +1 -0
- package/dist/index.d.ts +3 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -178
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.d.ts +9 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +143 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/tools/credits.js +2 -2
- package/dist/tools/generate.d.ts.map +1 -1
- package/dist/tools/generate.js +10 -2
- package/dist/tools/generate.js.map +1 -1
- package/dist/tools/preview.d.ts +15 -0
- package/dist/tools/preview.d.ts.map +1 -0
- package/dist/tools/preview.js +40 -0
- package/dist/tools/preview.js.map +1 -0
- package/dist/tools/projects.js +2 -2
- package/dist/tools/projects.js.map +1 -1
- package/dist/tools/templates.js +1 -1
- package/package.json +10 -6
package/dist/index.js
CHANGED
|
@@ -1,184 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* MCP server for AI-powered video generation via Framlit.
|
|
7
|
-
* Enables IDE integration for creating Remotion videos.
|
|
4
|
+
* Backward-compatible entry point.
|
|
5
|
+
* Delegates to the MCP server.
|
|
8
6
|
*/
|
|
9
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
|
|
11
|
-
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
12
|
-
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
|
13
|
-
const client_js_1 = require("./api/client.js");
|
|
14
|
-
const generate_js_1 = require("./tools/generate.js");
|
|
15
|
-
const projects_js_1 = require("./tools/projects.js");
|
|
16
|
-
const render_js_1 = require("./tools/render.js");
|
|
17
|
-
const templates_js_1 = require("./tools/templates.js");
|
|
18
|
-
const credits_js_1 = require("./tools/credits.js");
|
|
19
|
-
// Server configuration
|
|
20
|
-
const SERVER_NAME = 'framlit-mcp';
|
|
21
|
-
const SERVER_VERSION = '0.1.0';
|
|
22
|
-
// Initialize server
|
|
23
|
-
const server = new index_js_1.Server({
|
|
24
|
-
name: SERVER_NAME,
|
|
25
|
-
version: SERVER_VERSION,
|
|
26
|
-
}, {
|
|
27
|
-
capabilities: {
|
|
28
|
-
tools: {},
|
|
29
|
-
resources: {},
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
// Initialize API client
|
|
33
|
-
const apiKey = process.env.FRAMLIT_API_KEY;
|
|
34
|
-
if (!apiKey) {
|
|
35
|
-
console.error('Error: FRAMLIT_API_KEY environment variable is required');
|
|
36
|
-
console.error('Get your API key at https://framlit.com/settings/api-keys');
|
|
37
|
-
process.exit(1);
|
|
38
|
-
}
|
|
39
|
-
const client = new client_js_1.FramlitClient(apiKey);
|
|
40
|
-
// List available tools
|
|
41
|
-
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
42
|
-
return {
|
|
43
|
-
tools: [
|
|
44
|
-
generate_js_1.generateCodeTool,
|
|
45
|
-
generate_js_1.modifyCodeTool,
|
|
46
|
-
projects_js_1.listProjectsTool,
|
|
47
|
-
projects_js_1.getProjectTool,
|
|
48
|
-
projects_js_1.createProjectTool,
|
|
49
|
-
projects_js_1.updateProjectTool,
|
|
50
|
-
render_js_1.renderVideoTool,
|
|
51
|
-
render_js_1.getRenderStatusTool,
|
|
52
|
-
templates_js_1.listTemplatesTool,
|
|
53
|
-
credits_js_1.getCreditsTool,
|
|
54
|
-
],
|
|
55
|
-
};
|
|
56
|
-
});
|
|
57
|
-
// Handle tool calls
|
|
58
|
-
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
59
|
-
const { name, arguments: args = {} } = request.params;
|
|
60
|
-
try {
|
|
61
|
-
switch (name) {
|
|
62
|
-
// Code generation
|
|
63
|
-
case 'framlit_generate_code':
|
|
64
|
-
return await (0, generate_js_1.handleGenerateCode)(client, args);
|
|
65
|
-
case 'framlit_modify_code':
|
|
66
|
-
return await (0, generate_js_1.handleModifyCode)(client, args);
|
|
67
|
-
// Projects
|
|
68
|
-
case 'framlit_list_projects':
|
|
69
|
-
return await (0, projects_js_1.handleListProjects)(client);
|
|
70
|
-
case 'framlit_get_project':
|
|
71
|
-
return await (0, projects_js_1.handleGetProject)(client, args);
|
|
72
|
-
case 'framlit_create_project':
|
|
73
|
-
return await (0, projects_js_1.handleCreateProject)(client, args);
|
|
74
|
-
case 'framlit_update_project':
|
|
75
|
-
return await (0, projects_js_1.handleUpdateProject)(client, args);
|
|
76
|
-
// Rendering
|
|
77
|
-
case 'framlit_render_video':
|
|
78
|
-
return await (0, render_js_1.handleRenderVideo)(client, args);
|
|
79
|
-
case 'framlit_get_render_status':
|
|
80
|
-
return await (0, render_js_1.handleGetRenderStatus)(client, args);
|
|
81
|
-
// Templates
|
|
82
|
-
case 'framlit_list_templates':
|
|
83
|
-
return await (0, templates_js_1.handleListTemplates)(client, args);
|
|
84
|
-
// Credits
|
|
85
|
-
case 'framlit_get_credits':
|
|
86
|
-
return await (0, credits_js_1.handleGetCredits)(client);
|
|
87
|
-
default:
|
|
88
|
-
return {
|
|
89
|
-
content: [
|
|
90
|
-
{
|
|
91
|
-
type: 'text',
|
|
92
|
-
text: `Unknown tool: ${name}`,
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
isError: true,
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
catch (error) {
|
|
100
|
-
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
101
|
-
return {
|
|
102
|
-
content: [
|
|
103
|
-
{
|
|
104
|
-
type: 'text',
|
|
105
|
-
text: `Error: ${message}`,
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
isError: true,
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
// List available resources
|
|
113
|
-
server.setRequestHandler(types_js_1.ListResourcesRequestSchema, async () => {
|
|
114
|
-
return {
|
|
115
|
-
resources: [
|
|
116
|
-
{
|
|
117
|
-
uri: 'framlit://user/credits',
|
|
118
|
-
name: 'Credits Balance',
|
|
119
|
-
description: 'Current credit balance and usage',
|
|
120
|
-
mimeType: 'application/json',
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
uri: 'framlit://user/plan',
|
|
124
|
-
name: 'Current Plan',
|
|
125
|
-
description: 'Subscription plan details',
|
|
126
|
-
mimeType: 'application/json',
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
};
|
|
130
|
-
});
|
|
131
|
-
// Read resources
|
|
132
|
-
server.setRequestHandler(types_js_1.ReadResourceRequestSchema, async (request) => {
|
|
133
|
-
const { uri } = request.params;
|
|
134
|
-
try {
|
|
135
|
-
if (uri === 'framlit://user/credits' || uri === 'framlit://user/plan') {
|
|
136
|
-
const userInfo = await client.getUserInfo();
|
|
137
|
-
if (uri === 'framlit://user/credits') {
|
|
138
|
-
return {
|
|
139
|
-
contents: [
|
|
140
|
-
{
|
|
141
|
-
uri,
|
|
142
|
-
mimeType: 'application/json',
|
|
143
|
-
text: JSON.stringify({
|
|
144
|
-
total: userInfo.creditsTotal,
|
|
145
|
-
used: userInfo.creditsUsed,
|
|
146
|
-
remaining: userInfo.creditsRemaining,
|
|
147
|
-
}, null, 2),
|
|
148
|
-
},
|
|
149
|
-
],
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
return {
|
|
154
|
-
contents: [
|
|
155
|
-
{
|
|
156
|
-
uri,
|
|
157
|
-
mimeType: 'application/json',
|
|
158
|
-
text: JSON.stringify({
|
|
159
|
-
plan: userInfo.planTier,
|
|
160
|
-
limits: userInfo.limits,
|
|
161
|
-
}, null, 2),
|
|
162
|
-
},
|
|
163
|
-
],
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
throw new Error(`Unknown resource: ${uri}`);
|
|
168
|
-
}
|
|
169
|
-
catch (error) {
|
|
170
|
-
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
171
|
-
throw new Error(`Failed to read resource: ${message}`);
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
// Start server
|
|
175
|
-
async function main() {
|
|
176
|
-
const transport = new stdio_js_1.StdioServerTransport();
|
|
177
|
-
await server.connect(transport);
|
|
178
|
-
console.error(`${SERVER_NAME} v${SERVER_VERSION} started`);
|
|
179
|
-
}
|
|
180
|
-
main().catch((error) => {
|
|
181
|
-
console.error('Fatal error:', error);
|
|
182
|
-
process.exit(1);
|
|
183
|
-
});
|
|
8
|
+
require("./mcp/server.js");
|
|
184
9
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AACA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AACA;;;GAGG;;AAEH,2BAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":";AACA;;;;;GAKG"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Framlit MCP Server
|
|
5
|
+
*
|
|
6
|
+
* MCP server for AI-powered video generation via Framlit.
|
|
7
|
+
* Enables IDE integration for creating Remotion videos.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
|
|
11
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
12
|
+
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
|
13
|
+
const client_js_1 = require("../api/client.js");
|
|
14
|
+
const registry_js_1 = require("../core/registry.js");
|
|
15
|
+
// Server configuration
|
|
16
|
+
const SERVER_NAME = 'framlit-mcp';
|
|
17
|
+
const SERVER_VERSION = '0.2.0';
|
|
18
|
+
// Initialize server
|
|
19
|
+
const server = new index_js_1.Server({
|
|
20
|
+
name: SERVER_NAME,
|
|
21
|
+
version: SERVER_VERSION,
|
|
22
|
+
}, {
|
|
23
|
+
capabilities: {
|
|
24
|
+
tools: {},
|
|
25
|
+
resources: {},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
// Initialize API client
|
|
29
|
+
const apiKey = process.env.FRAMLIT_API_KEY;
|
|
30
|
+
if (!apiKey) {
|
|
31
|
+
console.error('Error: FRAMLIT_API_KEY environment variable is required');
|
|
32
|
+
console.error('Get your API key at https://framlit.app/settings/api-keys');
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
const client = new client_js_1.FramlitClient(apiKey);
|
|
36
|
+
// List available tools ā built from registry
|
|
37
|
+
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
38
|
+
return {
|
|
39
|
+
tools: registry_js_1.TOOL_REGISTRY.map((entry) => ({
|
|
40
|
+
name: entry.name,
|
|
41
|
+
description: entry.description,
|
|
42
|
+
inputSchema: (0, registry_js_1.zodToJsonSchema)(entry.schema),
|
|
43
|
+
})),
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
// Handle tool calls ā dispatched via registry
|
|
47
|
+
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
48
|
+
const { name, arguments: args = {} } = request.params;
|
|
49
|
+
const entry = (0, registry_js_1.getToolByName)(name);
|
|
50
|
+
if (!entry) {
|
|
51
|
+
return {
|
|
52
|
+
content: [{ type: 'text', text: `Unknown tool: ${name}` }],
|
|
53
|
+
isError: true,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
const result = await entry.handler(client, args);
|
|
58
|
+
return {
|
|
59
|
+
content: [{ type: 'text', text: result.message }],
|
|
60
|
+
...(result.isError ? { isError: true } : {}),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
65
|
+
return {
|
|
66
|
+
content: [{ type: 'text', text: `Error: ${message}` }],
|
|
67
|
+
isError: true,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
// List available resources
|
|
72
|
+
server.setRequestHandler(types_js_1.ListResourcesRequestSchema, async () => {
|
|
73
|
+
return {
|
|
74
|
+
resources: [
|
|
75
|
+
{
|
|
76
|
+
uri: 'framlit://user/credits',
|
|
77
|
+
name: 'Credits Balance',
|
|
78
|
+
description: 'Current credit balance and usage',
|
|
79
|
+
mimeType: 'application/json',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
uri: 'framlit://user/plan',
|
|
83
|
+
name: 'Current Plan',
|
|
84
|
+
description: 'Subscription plan details',
|
|
85
|
+
mimeType: 'application/json',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
// Read resources
|
|
91
|
+
server.setRequestHandler(types_js_1.ReadResourceRequestSchema, async (request) => {
|
|
92
|
+
const { uri } = request.params;
|
|
93
|
+
try {
|
|
94
|
+
if (uri === 'framlit://user/credits' || uri === 'framlit://user/plan') {
|
|
95
|
+
const userInfo = await client.getUserInfo();
|
|
96
|
+
if (uri === 'framlit://user/credits') {
|
|
97
|
+
return {
|
|
98
|
+
contents: [
|
|
99
|
+
{
|
|
100
|
+
uri,
|
|
101
|
+
mimeType: 'application/json',
|
|
102
|
+
text: JSON.stringify({
|
|
103
|
+
total: userInfo.creditsTotal,
|
|
104
|
+
used: userInfo.creditsUsed,
|
|
105
|
+
remaining: userInfo.creditsRemaining,
|
|
106
|
+
}, null, 2),
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
return {
|
|
113
|
+
contents: [
|
|
114
|
+
{
|
|
115
|
+
uri,
|
|
116
|
+
mimeType: 'application/json',
|
|
117
|
+
text: JSON.stringify({
|
|
118
|
+
plan: userInfo.planTier,
|
|
119
|
+
limits: userInfo.limits,
|
|
120
|
+
}, null, 2),
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
throw new Error(`Unknown resource: ${uri}`);
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
130
|
+
throw new Error(`Failed to read resource: ${message}`);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
// Start server
|
|
134
|
+
async function main() {
|
|
135
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
136
|
+
await server.connect(transport);
|
|
137
|
+
console.error(`${SERVER_NAME} v${SERVER_VERSION} started`);
|
|
138
|
+
}
|
|
139
|
+
main().catch((error) => {
|
|
140
|
+
console.error('Fatal error:', error);
|
|
141
|
+
process.exit(1);
|
|
142
|
+
});
|
|
143
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":";;AACA;;;;;GAKG;;AAEH,wEAAmE;AACnE,wEAAiF;AACjF,iEAK4C;AAE5C,gDAAiD;AACjD,qDAAoF;AAEpF,uBAAuB;AACvB,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC,MAAM,cAAc,GAAG,OAAO,CAAC;AAE/B,oBAAoB;AACpB,MAAM,MAAM,GAAG,IAAI,iBAAM,CACvB;IACE,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,cAAc;CACxB,EACD;IACE,YAAY,EAAE;QACZ,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,EAAE;KACd;CACF,CACF,CAAC;AAEF,wBAAwB;AACxB,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;AAC3C,IAAI,CAAC,MAAM,EAAE,CAAC;IACZ,OAAO,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;IACzE,OAAO,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC3E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,MAAM,GAAG,IAAI,yBAAa,CAAC,MAAM,CAAC,CAAC;AAEzC,6CAA6C;AAC7C,MAAM,CAAC,iBAAiB,CAAC,iCAAsB,EAAE,KAAK,IAAI,EAAE;IAC1D,OAAO;QACL,KAAK,EAAE,2BAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACnC,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,WAAW,EAAE,IAAA,6BAAe,EAAC,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B,EAAE,IAAI,EAAE,CAAC,CAAC;yBACZ;qBACF;iBACF,CAAC;YACJ,CAAC;QACH,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;IAC9C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;QACzE,MAAM,IAAI,KAAK,CAAC,4BAA4B,OAAO,EAAE,CAAC,CAAC;IACzD,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,eAAe;AACf,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,GAAG,WAAW,KAAK,cAAc,UAAU,CAAC,CAAC;AAC7D,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/tools/credits.js
CHANGED
|
@@ -27,10 +27,10 @@ async function handleGetCredits(client) {
|
|
|
27
27
|
message += `- Max render duration: ${userInfo.limits.maxRenderDuration}s\n`;
|
|
28
28
|
message += `- Watermark: ${userInfo.limits.hasWatermark ? 'Yes' : 'No'}\n`;
|
|
29
29
|
if (userInfo.creditsRemaining <= 10) {
|
|
30
|
-
message += `\nā ļø Low credits! Get more at https://framlit.
|
|
30
|
+
message += `\nā ļø Low credits! Get more at https://framlit.app/pricing`;
|
|
31
31
|
}
|
|
32
32
|
if (userInfo.planTier === 'free' || userInfo.planTier === 'hobby') {
|
|
33
|
-
message += `\n\nš” Upgrade to Pro for 500 credits/month and no watermark: https://framlit.
|
|
33
|
+
message += `\n\nš” Upgrade to Pro for 500 credits/month and no watermark: https://framlit.app/pricing`;
|
|
34
34
|
}
|
|
35
35
|
return {
|
|
36
36
|
content: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/tools/generate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,gBAAgB,EAAE,IA+B9B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAwB5B,CAAC;AAEF,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/tools/generate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,gBAAgB,EAAE,IA+B9B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAwB5B,CAAC;AAEF,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;GAqB9B;AAED,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;GAqB9B"}
|
package/dist/tools/generate.js
CHANGED
|
@@ -69,11 +69,15 @@ async function handleGenerateCode(client, args) {
|
|
|
69
69
|
const prompt = args.prompt;
|
|
70
70
|
const format = args.format;
|
|
71
71
|
const result = await client.generateCode({ prompt, format });
|
|
72
|
+
let response = `Generated Remotion code (${result.creditsUsed} credit used, ${result.creditsRemaining} remaining):\n\n\`\`\`tsx\n${result.code}\n\`\`\``;
|
|
73
|
+
if (result.previewUrl) {
|
|
74
|
+
response += `\n\nš¬ **Preview:** ${result.previewUrl}\n_Open the link above to see the video preview (expires in 24h)_`;
|
|
75
|
+
}
|
|
72
76
|
return {
|
|
73
77
|
content: [
|
|
74
78
|
{
|
|
75
79
|
type: 'text',
|
|
76
|
-
text:
|
|
80
|
+
text: response,
|
|
77
81
|
},
|
|
78
82
|
],
|
|
79
83
|
};
|
|
@@ -82,11 +86,15 @@ async function handleModifyCode(client, args) {
|
|
|
82
86
|
const code = args.code;
|
|
83
87
|
const instruction = args.instruction;
|
|
84
88
|
const result = await client.modifyCode({ code, instruction });
|
|
89
|
+
let response = `Modified code (${result.creditsUsed} credit used, ${result.creditsRemaining} remaining):\n\n\`\`\`tsx\n${result.code}\n\`\`\``;
|
|
90
|
+
if (result.previewUrl) {
|
|
91
|
+
response += `\n\nš¬ **Preview:** ${result.previewUrl}\n_Open the link above to see the video preview (expires in 24h)_`;
|
|
92
|
+
}
|
|
85
93
|
return {
|
|
86
94
|
content: [
|
|
87
95
|
{
|
|
88
96
|
type: 'text',
|
|
89
|
-
text:
|
|
97
|
+
text: response,
|
|
90
98
|
},
|
|
91
99
|
],
|
|
92
100
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/tools/generate.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAgEH,
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/tools/generate.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAgEH,gDAuBC;AAED,4CAuBC;AA3GY,QAAA,gBAAgB,GAAS;IACpC,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE;;;;;;;;;;;;;gBAaC;IACd,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,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C;AACJ,CAAC;AAEM,KAAK,UAAU,gBAAgB,CACpC,MAAqB,EACrB,IAA6B;IAE7B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAc,CAAC;IACjC,MAAM,WAAW,GAAG,IAAI,CAAC,WAAqB,CAAC;IAE/C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;IAE9D,IAAI,QAAQ,GAAG,kBAAkB,MAAM,CAAC,WAAW,iBAAiB,MAAM,CAAC,gBAAgB,8BAA8B,MAAM,CAAC,IAAI,UAAU,CAAC;IAE/I,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACtB,QAAQ,IAAI,uBAAuB,MAAM,CAAC,UAAU,mEAAmE,CAAC;IAC1H,CAAC;IAED,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;aACf;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preview Tools
|
|
3
|
+
*
|
|
4
|
+
* Tools for creating and viewing Remotion previews.
|
|
5
|
+
*/
|
|
6
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import { FramlitClient } from '../api/client.js';
|
|
8
|
+
export declare const previewCodeTool: Tool;
|
|
9
|
+
export declare function handlePreviewCode(client: FramlitClient, args: Record<string, unknown>): Promise<{
|
|
10
|
+
content: {
|
|
11
|
+
type: string;
|
|
12
|
+
text: string;
|
|
13
|
+
}[];
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/tools/preview.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,eAAe,EAAE,IAiB7B,CAAC;AAEF,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;GAc9B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Preview Tools
|
|
4
|
+
*
|
|
5
|
+
* Tools for creating and viewing Remotion previews.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.previewCodeTool = void 0;
|
|
9
|
+
exports.handlePreviewCode = handlePreviewCode;
|
|
10
|
+
exports.previewCodeTool = {
|
|
11
|
+
name: 'framlit_preview_code',
|
|
12
|
+
description: `Create a temporary preview URL for Remotion code.
|
|
13
|
+
The preview URL can be opened in a browser to see the video.
|
|
14
|
+
|
|
15
|
+
Preview URLs expire after 24 hours.
|
|
16
|
+
No credits are consumed for creating previews.`,
|
|
17
|
+
inputSchema: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
properties: {
|
|
20
|
+
code: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'The Remotion code to preview.',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
required: ['code'],
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
async function handlePreviewCode(client, args) {
|
|
29
|
+
const code = args.code;
|
|
30
|
+
const result = await client.createPreview(code);
|
|
31
|
+
return {
|
|
32
|
+
content: [
|
|
33
|
+
{
|
|
34
|
+
type: 'text',
|
|
35
|
+
text: `Preview created!\n\nš¬ **Preview URL:** ${result.previewUrl}\n\nOpen the link above in your browser to see the video preview.\n\n_Expires in 24 hours_`,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../../src/tools/preview.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAwBH,8CAgBC;AAnCY,QAAA,eAAe,GAAS;IACnC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE;;;;+CAIgC;IAC7C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+BAA+B;aAC7C;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;CACF,CAAC;AAEK,KAAK,UAAU,iBAAiB,CACrC,MAAqB,EACrB,IAA6B;IAE7B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAc,CAAC;IAEjC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAEhD,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,2CAA2C,MAAM,CAAC,UAAU,4FAA4F;aAC/J;SACF;KACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/projects.js
CHANGED
|
@@ -124,7 +124,7 @@ async function handleCreateProject(client, args) {
|
|
|
124
124
|
content: [
|
|
125
125
|
{
|
|
126
126
|
type: 'text',
|
|
127
|
-
text: `Project created!\n\n**${project.name}** (${project.id})\n\nView at: https://framlit.
|
|
127
|
+
text: `Project created!\n\n**${project.name}** (${project.id})\n\nView at: https://framlit.app/dashboard?project=${project.id}`,
|
|
128
128
|
},
|
|
129
129
|
],
|
|
130
130
|
};
|
|
@@ -138,7 +138,7 @@ async function handleUpdateProject(client, args) {
|
|
|
138
138
|
content: [
|
|
139
139
|
{
|
|
140
140
|
type: 'text',
|
|
141
|
-
text: `Project updated!\n\n**${project.name}** (${project.id})\n\nView at: https://framlit.
|
|
141
|
+
text: `Project updated!\n\n**${project.name}** (${project.id})\n\nView at: https://framlit.app/dashboard?project=${project.id}`,
|
|
142
142
|
},
|
|
143
143
|
],
|
|
144
144
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA8EH,gDA0BC;AAED,4CAeC;AAED,kDAkBC;AAED,kDAkBC;AA5JY,QAAA,gBAAgB,GAAS;IACpC,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,iCAAiC;IAC9C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;KACb;CACF,CAAC;AAEW,QAAA,cAAc,GAAS;IAClC,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,uDAAuD;IACpE,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iBAAiB;aAC/B;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;CACF,CAAC;AAEW,QAAA,iBAAiB,GAAS;IACrC,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE;2DAC4C;IACzD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uBAAuB;aACrC;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iCAAiC;aAC/C;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,QAAQ,CAAC;gBACzC,WAAW,EAAE,sCAAsC;aACpD;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;CACF,CAAC;AAEW,QAAA,iBAAiB,GAAS;IACrC,IAAI,EAAE,wBAAwB;IAC9B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ACZ,IAAI,EAAE,yBAAyB,OAAO,CAAC,IAAI,OAAO,OAAO,CAAC,EAAE,uDAAuD,OAAO,CAAC,EAAE,EAAE;aAChI;SACF;KACF,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,mBAAmB,CACvC,MAAqB,EACrB,IAA6B;IAE7B,MAAM,SAAS,GAAG,IAAI,CAAC,SAAmB,CAAC;IAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,IAA0B,CAAC;IAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,IAA0B,CAAC;IAE7C,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAEtE,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,yBAAyB,OAAO,CAAC,IAAI,OAAO,OAAO,CAAC,EAAE,uDAAuD,OAAO,CAAC,EAAE,EAAE;aAChI;SACF;KACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/templates.js
CHANGED
|
@@ -47,7 +47,7 @@ async function handleListTemplates(client, args) {
|
|
|
47
47
|
content: [
|
|
48
48
|
{
|
|
49
49
|
type: 'text',
|
|
50
|
-
text: `Found ${templates.length} template(s):\n\n${list}\n\nš” View all templates at https://framlit.
|
|
50
|
+
text: `Found ${templates.length} template(s):\n\n${list}\n\nš” View all templates at https://framlit.app/marketplace`,
|
|
51
51
|
},
|
|
52
52
|
],
|
|
53
53
|
};
|
package/package.json
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framlit-mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "MCP server for Framlit - AI-powered video generation",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "MCP server and CLI for Framlit - AI-powered video generation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"bin": {
|
|
8
|
-
"framlit-mcp": "./dist/
|
|
8
|
+
"framlit-mcp": "./dist/mcp/server.js",
|
|
9
|
+
"framlit": "./dist/cli/index.js"
|
|
9
10
|
},
|
|
10
11
|
"scripts": {
|
|
11
|
-
"dev": "tsx watch src/
|
|
12
|
+
"dev": "tsx watch src/mcp/server.ts",
|
|
13
|
+
"dev:cli": "tsx src/cli/index.ts",
|
|
12
14
|
"build": "tsc",
|
|
13
|
-
"start": "node dist/
|
|
15
|
+
"start": "node dist/mcp/server.js",
|
|
16
|
+
"start:cli": "node dist/cli/index.js",
|
|
14
17
|
"lint": "eslint src/",
|
|
15
18
|
"prepublishOnly": "npm run build"
|
|
16
19
|
},
|
|
@@ -20,7 +23,8 @@
|
|
|
20
23
|
"remotion",
|
|
21
24
|
"video",
|
|
22
25
|
"ai",
|
|
23
|
-
"cursor"
|
|
26
|
+
"cursor",
|
|
27
|
+
"cli"
|
|
24
28
|
],
|
|
25
29
|
"author": "Framlit",
|
|
26
30
|
"license": "MIT",
|