@pinepaper.studio/mcp-server 1.0.0 → 1.0.1
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/dist/cli.d.ts +1 -1
- package/dist/cli.js +1 -1
- package/dist/server/index.d.ts +5 -15
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +8 -63
- package/dist/server/index.js.map +1 -1
- package/manifest.json +136 -0
- package/package.json +3 -6
package/dist/cli.d.ts
CHANGED
package/dist/cli.js
CHANGED
package/dist/server/index.d.ts
CHANGED
|
@@ -2,23 +2,17 @@
|
|
|
2
2
|
* PinePaper MCP Server - Transport Factory
|
|
3
3
|
*
|
|
4
4
|
* This module provides a unified interface for creating server transports.
|
|
5
|
-
* The public package only includes stdio transport. Cloud transports
|
|
6
|
-
* (SSE/HTTP) are available via the optional @pinepaper/mcp-cloud package.
|
|
7
5
|
*/
|
|
8
|
-
|
|
6
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
7
|
+
export type TransportType = 'stdio';
|
|
9
8
|
export interface TransportConfig {
|
|
10
9
|
type: TransportType;
|
|
11
|
-
port?: number;
|
|
12
|
-
host?: string;
|
|
13
|
-
apiKey?: string;
|
|
14
|
-
corsOrigins?: string[];
|
|
15
10
|
}
|
|
16
11
|
export interface TransportResult {
|
|
17
|
-
transport:
|
|
12
|
+
transport: StdioServerTransport;
|
|
18
13
|
type: TransportType;
|
|
19
14
|
info: {
|
|
20
15
|
description: string;
|
|
21
|
-
connectionInfo?: string;
|
|
22
16
|
};
|
|
23
17
|
}
|
|
24
18
|
/**
|
|
@@ -27,13 +21,9 @@ export interface TransportResult {
|
|
|
27
21
|
* @param config - Transport configuration
|
|
28
22
|
* @returns Transport instance
|
|
29
23
|
*/
|
|
30
|
-
export declare function createTransport(config: TransportConfig):
|
|
31
|
-
/**
|
|
32
|
-
* Check if cloud features are available
|
|
33
|
-
*/
|
|
34
|
-
export declare function isCloudAvailable(): Promise<boolean>;
|
|
24
|
+
export declare function createTransport(config: TransportConfig): TransportResult;
|
|
35
25
|
/**
|
|
36
26
|
* Get available transport types
|
|
37
27
|
*/
|
|
38
|
-
export declare function getAvailableTransports():
|
|
28
|
+
export declare function getAvailableTransports(): TransportType[];
|
|
39
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAMjF,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC;AAEpC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,oBAAoB,CAAC;IAChC,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE;QACJ,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAMD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAYxE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,aAAa,EAAE,CAExD"}
|
package/dist/server/index.js
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
* PinePaper MCP Server - Transport Factory
|
|
3
3
|
*
|
|
4
4
|
* This module provides a unified interface for creating server transports.
|
|
5
|
-
* The public package only includes stdio transport. Cloud transports
|
|
6
|
-
* (SSE/HTTP) are available via the optional @pinepaper/mcp-cloud package.
|
|
7
5
|
*/
|
|
8
6
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
9
7
|
// =============================================================================
|
|
@@ -15,75 +13,22 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
|
15
13
|
* @param config - Transport configuration
|
|
16
14
|
* @returns Transport instance
|
|
17
15
|
*/
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
case 'stdio':
|
|
21
|
-
return {
|
|
22
|
-
transport: new StdioServerTransport(),
|
|
23
|
-
type: 'stdio',
|
|
24
|
-
info: {
|
|
25
|
-
description: 'Standard I/O transport for local use with Claude Desktop',
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
case 'sse':
|
|
29
|
-
return createCloudTransport(config);
|
|
30
|
-
default:
|
|
31
|
-
throw new Error(`Unknown transport type: ${config.type}`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Attempt to create a cloud transport using the optional @pinepaper/mcp-cloud package
|
|
36
|
-
*/
|
|
37
|
-
async function createCloudTransport(config) {
|
|
38
|
-
try {
|
|
39
|
-
// Try to dynamically import the cloud package
|
|
40
|
-
// This will fail gracefully if the package is not installed
|
|
41
|
-
const cloudModule = await import('@pinepaper/mcp-cloud');
|
|
42
|
-
const transport = cloudModule.createSSEServer({
|
|
43
|
-
port: config.port || 3000,
|
|
44
|
-
host: config.host || '0.0.0.0',
|
|
45
|
-
apiKey: config.apiKey,
|
|
46
|
-
corsOrigins: config.corsOrigins || ['*'],
|
|
47
|
-
});
|
|
48
|
-
await transport.start();
|
|
16
|
+
export function createTransport(config) {
|
|
17
|
+
if (config.type === 'stdio') {
|
|
49
18
|
return {
|
|
50
|
-
transport,
|
|
51
|
-
type: '
|
|
19
|
+
transport: new StdioServerTransport(),
|
|
20
|
+
type: 'stdio',
|
|
52
21
|
info: {
|
|
53
|
-
description: '
|
|
54
|
-
connectionInfo: `http://${config.host || '0.0.0.0'}:${config.port || 3000}`,
|
|
22
|
+
description: 'Standard I/O transport for local use with Claude Desktop',
|
|
55
23
|
},
|
|
56
24
|
};
|
|
57
25
|
}
|
|
58
|
-
|
|
59
|
-
if (error.code === 'ERR_MODULE_NOT_FOUND') {
|
|
60
|
-
throw new Error('SSE transport requires the @pinepaper/mcp-cloud package.\n' +
|
|
61
|
-
'This is a Pro tier feature. Visit https://pinepaper.studio/pro for more info.\n\n' +
|
|
62
|
-
'For local development, use the stdio transport with Claude Desktop.');
|
|
63
|
-
}
|
|
64
|
-
throw error;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Check if cloud features are available
|
|
69
|
-
*/
|
|
70
|
-
export async function isCloudAvailable() {
|
|
71
|
-
try {
|
|
72
|
-
await import('@pinepaper/mcp-cloud');
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
catch {
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
26
|
+
throw new Error(`Unknown transport type: ${config.type}`);
|
|
78
27
|
}
|
|
79
28
|
/**
|
|
80
29
|
* Get available transport types
|
|
81
30
|
*/
|
|
82
|
-
export
|
|
83
|
-
|
|
84
|
-
if (await isCloudAvailable()) {
|
|
85
|
-
transports.push('sse');
|
|
86
|
-
}
|
|
87
|
-
return transports;
|
|
31
|
+
export function getAvailableTransports() {
|
|
32
|
+
return ['stdio'];
|
|
88
33
|
}
|
|
89
34
|
//# sourceMappingURL=index.js.map
|
package/dist/server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAoBjF,gFAAgF;AAChF,oBAAoB;AACpB,gFAAgF;AAEhF;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,MAAuB;IACrD,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC5B,OAAO;YACL,SAAS,EAAE,IAAI,oBAAoB,EAAE;YACrC,IAAI,EAAE,OAAO;YACb,IAAI,EAAE;gBACJ,WAAW,EAAE,0DAA0D;aACxE;SACF,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,2BAA2B,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC"}
|
package/manifest.json
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": "0.3",
|
|
3
|
+
"name": "pinepaper-mcp",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"display_name": "PinePaper Studio",
|
|
6
|
+
"description": "Create animated graphics with AI using PinePaper Studio",
|
|
7
|
+
"long_description": "PinePaper MCP Server enables Claude to create, animate, and export graphics through PinePaper Studio. Features include shape creation, relation-based animations (orbits, follows, attached_to), procedural generators, visual effects, and SVG export with animations.",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "PinePaper Studio",
|
|
10
|
+
"url": "https://github.com/pinepaper"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/pinepaper/mcp-server"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://pinepaper.studio",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"keywords": [
|
|
19
|
+
"animation",
|
|
20
|
+
"graphics",
|
|
21
|
+
"canvas",
|
|
22
|
+
"paper.js",
|
|
23
|
+
"design",
|
|
24
|
+
"creative"
|
|
25
|
+
],
|
|
26
|
+
"server": {
|
|
27
|
+
"type": "node",
|
|
28
|
+
"entry_point": "dist/cli.js",
|
|
29
|
+
"mcp_config": {
|
|
30
|
+
"command": "node",
|
|
31
|
+
"args": ["${__dirname}/dist/cli.js"]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"tools": [
|
|
35
|
+
{
|
|
36
|
+
"name": "pinepaper_create_item",
|
|
37
|
+
"description": "Create text, shapes, or graphics on the PinePaper canvas"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "pinepaper_modify_item",
|
|
41
|
+
"description": "Modify an existing item's properties (color, size, position)"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "pinepaper_delete_item",
|
|
45
|
+
"description": "Remove an item from the canvas"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "pinepaper_add_relation",
|
|
49
|
+
"description": "Add animation relations between items (orbits, follows, attached_to)"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "pinepaper_remove_relation",
|
|
53
|
+
"description": "Remove a relation between items"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "pinepaper_query_relations",
|
|
57
|
+
"description": "Query existing relations for an item"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "pinepaper_animate",
|
|
61
|
+
"description": "Apply simple loop animations to items"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "pinepaper_keyframe_animate",
|
|
65
|
+
"description": "Create timed keyframe animations"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "pinepaper_play_timeline",
|
|
69
|
+
"description": "Control animation playback"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "pinepaper_execute_generator",
|
|
73
|
+
"description": "Run procedural background generators"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "pinepaper_list_generators",
|
|
77
|
+
"description": "List available background generators"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "pinepaper_apply_effect",
|
|
81
|
+
"description": "Apply visual effects to items"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "pinepaper_get_items",
|
|
85
|
+
"description": "Get all items on the canvas"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "pinepaper_get_relation_stats",
|
|
89
|
+
"description": "Get statistics about relations"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "pinepaper_set_background_color",
|
|
93
|
+
"description": "Set the canvas background color"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "pinepaper_set_canvas_size",
|
|
97
|
+
"description": "Set canvas dimensions"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "pinepaper_get_canvas_size",
|
|
101
|
+
"description": "Get current canvas dimensions"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "pinepaper_clear_canvas",
|
|
105
|
+
"description": "Remove all items from the canvas"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "pinepaper_refresh_page",
|
|
109
|
+
"description": "Refresh the PinePaper page"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "pinepaper_export_svg",
|
|
113
|
+
"description": "Export canvas as animated SVG"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "pinepaper_export_training_data",
|
|
117
|
+
"description": "Export instruction/code pairs for LLM training"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "pinepaper_browser_connect",
|
|
121
|
+
"description": "Connect to PinePaper Studio in browser"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "pinepaper_browser_disconnect",
|
|
125
|
+
"description": "Disconnect from browser"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "pinepaper_browser_screenshot",
|
|
129
|
+
"description": "Take a screenshot of the canvas"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "pinepaper_browser_status",
|
|
133
|
+
"description": "Check browser connection status"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinepaper.studio/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "MCP Server for PinePaper Studio - Create animated graphics with AI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -54,8 +54,7 @@
|
|
|
54
54
|
"url": "https://github.com/pinepaper/mcp-server"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
|
-
"node": ">=18.0.0"
|
|
58
|
-
"bun": ">=1.0.0"
|
|
57
|
+
"node": ">=18.0.0"
|
|
59
58
|
},
|
|
60
59
|
"dependencies": {
|
|
61
60
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
@@ -70,11 +69,9 @@
|
|
|
70
69
|
"@typescript-eslint/eslint-plugin": "^6.13.0",
|
|
71
70
|
"@typescript-eslint/parser": "^6.13.0"
|
|
72
71
|
},
|
|
73
|
-
"optionalDependencies": {
|
|
74
|
-
"@pinepaper/mcp-cloud": "^1.0.0"
|
|
75
|
-
},
|
|
76
72
|
"files": [
|
|
77
73
|
"dist",
|
|
74
|
+
"manifest.json",
|
|
78
75
|
"README.md",
|
|
79
76
|
"LICENSE"
|
|
80
77
|
]
|