@pinn-ai/mcp 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 +60 -0
- package/bin/cli.js +59 -0
- package/package.json +21 -0
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# @pinn-ai/mcp
|
|
2
|
+
|
|
3
|
+
Generate images and videos from AI assistants using [pinn.ai](https://pinn.ai).
|
|
4
|
+
|
|
5
|
+
Works with Claude Desktop, Cursor, VS Code, and any MCP-compatible client.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
### Claude Desktop
|
|
10
|
+
|
|
11
|
+
Add to your `claude_desktop_config.json`:
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"mcpServers": {
|
|
16
|
+
"pinn": {
|
|
17
|
+
"command": "npx",
|
|
18
|
+
"args": ["-y", "@pinn-ai/mcp"]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
This opens a browser for OAuth login on first use.
|
|
25
|
+
|
|
26
|
+
### With API Key (no browser)
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"mcpServers": {
|
|
31
|
+
"pinn": {
|
|
32
|
+
"command": "npx",
|
|
33
|
+
"args": ["-y", "@pinn-ai/mcp"],
|
|
34
|
+
"env": {
|
|
35
|
+
"PINN_API_KEY": "pk_your_key_here"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Get your API key at [pinn.ai/profile](https://pinn.ai/profile).
|
|
43
|
+
|
|
44
|
+
### Cursor / VS Code
|
|
45
|
+
|
|
46
|
+
These support remote MCP directly — just add the URL `https://pinn.ai/mcp` in settings.
|
|
47
|
+
|
|
48
|
+
## Tools
|
|
49
|
+
|
|
50
|
+
| Tool | Description |
|
|
51
|
+
|------|-------------|
|
|
52
|
+
| `text2image` | Generate images from text prompts |
|
|
53
|
+
| `image2image` | Edit/transform existing images |
|
|
54
|
+
| `text2video` | Generate videos from text prompts |
|
|
55
|
+
| `image2video` | Animate images into videos |
|
|
56
|
+
| `list_models` | Browse available AI models |
|
|
57
|
+
|
|
58
|
+
## License
|
|
59
|
+
|
|
60
|
+
MIT
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @pinn/mcp — Pinn.ai MCP server client
|
|
5
|
+
*
|
|
6
|
+
* Wraps mcp-remote to connect Claude Desktop / Cursor / VS Code
|
|
7
|
+
* to pinn.ai's remote MCP server with zero config.
|
|
8
|
+
*
|
|
9
|
+
* Usage in claude_desktop_config.json:
|
|
10
|
+
*
|
|
11
|
+
* Option A — OAuth login (opens browser):
|
|
12
|
+
* {
|
|
13
|
+
* "mcpServers": {
|
|
14
|
+
* "pinn": { "command": "npx", "args": ["-y", "@pinn/mcp"] }
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
*
|
|
18
|
+
* Option B — API key (no browser needed):
|
|
19
|
+
* {
|
|
20
|
+
* "mcpServers": {
|
|
21
|
+
* "pinn": {
|
|
22
|
+
* "command": "npx",
|
|
23
|
+
* "args": ["-y", "@pinn/mcp"],
|
|
24
|
+
* "env": { "PINN_API_KEY": "pk_your_key_here" }
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
* }
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
const { spawn } = require('child_process');
|
|
31
|
+
const path = require('path');
|
|
32
|
+
|
|
33
|
+
const MCP_URL = 'https://pinn.ai/mcp';
|
|
34
|
+
|
|
35
|
+
// Resolve mcp-remote's proxy binary
|
|
36
|
+
const mcpRemotePkg = require.resolve('mcp-remote/package.json');
|
|
37
|
+
const proxyBin = path.join(path.dirname(mcpRemotePkg), 'dist', 'proxy.js');
|
|
38
|
+
|
|
39
|
+
// Build args: URL + optional auth header + any extra CLI args
|
|
40
|
+
const args = [proxyBin, MCP_URL];
|
|
41
|
+
|
|
42
|
+
const apiKey = process.env.PINN_API_KEY;
|
|
43
|
+
if (apiKey) {
|
|
44
|
+
args.push('--header', `Authorization:Bearer ${apiKey}`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Pass through any extra args (e.g. --transport)
|
|
48
|
+
args.push(...process.argv.slice(2));
|
|
49
|
+
|
|
50
|
+
const child = spawn(process.execPath, args, {
|
|
51
|
+
stdio: 'inherit',
|
|
52
|
+
env: process.env,
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
child.on('exit', (code) => process.exit(code ?? 1));
|
|
56
|
+
child.on('error', (err) => {
|
|
57
|
+
console.error('Failed to start mcp-remote:', err.message);
|
|
58
|
+
process.exit(1);
|
|
59
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pinn-ai/mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Pinn.ai MCP server — generate images & videos from Claude Desktop, Cursor, and VS Code",
|
|
5
|
+
"bin": {
|
|
6
|
+
"pinn-mcp": "bin/cli.js"
|
|
7
|
+
},
|
|
8
|
+
"keywords": ["mcp", "pinn", "ai", "image-generation", "claude", "cursor"],
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/pinn-ai/mcp"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://pinn.ai",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"mcp-remote": "^0.1.38"
|
|
17
|
+
},
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=18"
|
|
20
|
+
}
|
|
21
|
+
}
|