@pixel-normal-edit/mcp 2.0.2 → 2.0.4
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 +14 -3
- package/index.js +8 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -16,6 +16,14 @@ This bridge solves that by using Firebase Firestore as a real-time message bus:
|
|
|
16
16
|
3. **Browser** listens to that Firestore document, executes the command on the canvas, and writes the result back.
|
|
17
17
|
4. **Bridge** reads the result and returns it to the AI Agent.
|
|
18
18
|
|
|
19
|
+
## Security Information
|
|
20
|
+
|
|
21
|
+
You might notice that the Firebase API keys (`VITE_FIREBASE_API_KEY`, etc.) are included directly in the source code of this package. This is completely safe and by design:
|
|
22
|
+
|
|
23
|
+
* **API Keys are Routing Identifiers:** In the context of Firebase Web SDK, these keys are NOT secret passwords. They merely act as a "public address" to tell the bridge which Firebase project to connect to.
|
|
24
|
+
* **Firestore Security Rules:** Real security is enforced on the server-side via `firestore.rules`. The rules ensure that connections can only be established using a valid, unguessable UUID (the Session ID).
|
|
25
|
+
* **Zero User Data Access:** The bridge only has access to its designated `mcp_sessions` sandbox. It is explicitly blocked from reading or writing any user accounts, passwords, or other collections.
|
|
26
|
+
|
|
19
27
|
## Usage (For Users)
|
|
20
28
|
|
|
21
29
|
You do not need to download or clone this repository manually to use it!
|
|
@@ -24,7 +32,7 @@ To connect your AI, simply open Pixel Normal Edit, go to **Settings > Account >
|
|
|
24
32
|
|
|
25
33
|
For example, to run it via `npx`:
|
|
26
34
|
```bash
|
|
27
|
-
npx -y @pixel-normal-edit/mcp YOUR_SESSION_ID
|
|
35
|
+
npx -y @pixel-normal-edit/mcp@latest YOUR_SESSION_ID
|
|
28
36
|
```
|
|
29
37
|
*(Replace `YOUR_SESSION_ID` with the ID provided in your app).*
|
|
30
38
|
|
|
@@ -37,9 +45,12 @@ Add this to your `claude_desktop_config.json`:
|
|
|
37
45
|
"command": "npx",
|
|
38
46
|
"args": [
|
|
39
47
|
"-y",
|
|
40
|
-
"@pixel-normal-edit/mcp",
|
|
48
|
+
"@pixel-normal-edit/mcp@latest",
|
|
41
49
|
"YOUR_SESSION_ID"
|
|
42
|
-
]
|
|
50
|
+
],
|
|
51
|
+
"env": {
|
|
52
|
+
"DOTENV_CONFIG_QUIET": "true"
|
|
53
|
+
}
|
|
43
54
|
}
|
|
44
55
|
}
|
|
45
56
|
}
|
package/index.js
CHANGED
|
@@ -26,12 +26,12 @@ const http = require('http');
|
|
|
26
26
|
dotenv.config({ path: path.join(__dirname, '..', '.env') });
|
|
27
27
|
|
|
28
28
|
const db = getFirestore(initializeApp({
|
|
29
|
-
apiKey:
|
|
30
|
-
authDomain:
|
|
31
|
-
projectId:
|
|
32
|
-
storageBucket:
|
|
33
|
-
messagingSenderId:
|
|
34
|
-
appId:
|
|
29
|
+
apiKey: 'AIzaSyBSrvCt58Jhsh14wbC2bD2KLFUUVbAVim0',
|
|
30
|
+
authDomain: 'pixel-normal-edit.firebaseapp.com',
|
|
31
|
+
projectId: 'pixel-normal-edit',
|
|
32
|
+
storageBucket: 'pixel-normal-edit.firebasestorage.app',
|
|
33
|
+
messagingSenderId: '397075334229',
|
|
34
|
+
appId: '1:397075334229:web:b02eede3fc7b41d02f80dc',
|
|
35
35
|
}));
|
|
36
36
|
|
|
37
37
|
const SESSION = process.argv[2] || process.env.MCP_SESSION || 'default-session';
|
|
@@ -489,9 +489,8 @@ const HTTP_PORT = process.env.HTTP_PORT || (process.argv.includes('--http') ? 34
|
|
|
489
489
|
async function startStdio() {
|
|
490
490
|
const transport = new StdioServerTransport();
|
|
491
491
|
await server.connect(transport);
|
|
492
|
-
console.error
|
|
493
|
-
|
|
494
|
-
console.error(` Editor : http://localhost:5173?mcp_session=${SESSION}`);
|
|
492
|
+
// Disabled console.error output because some MCP clients merge stdout and stderr,
|
|
493
|
+
// causing JSON parsing errors (e.g. invalid character 'â' looking for beginning of value)
|
|
495
494
|
}
|
|
496
495
|
|
|
497
496
|
async function startHttp(port) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixel-normal-edit/mcp",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "MCP server for Pixel Normal Edit canvas - enables AI agents to draw pixel art",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
"jimp": "^1.6.1",
|
|
29
29
|
"zod": "^4.4.3"
|
|
30
30
|
}
|
|
31
|
-
}
|
|
31
|
+
}
|