@player-devtools/mcp 0.14.3--canary.24.1158 → 0.15.1--canary.28.1248
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 +0 -53
- package/bin/run +8 -20
- package/dist/cjs/index.cjs +1 -1
- package/dist/index.legacy-esm.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -99,59 +99,6 @@ await server.start();
|
|
|
99
99
|
| --- | --- | --- |
|
|
100
100
|
| `host` | `"localhost"` | Flipper server host. |
|
|
101
101
|
| `port` | `52342` | Flipper server WebSocket port. |
|
|
102
|
-
| `open` | `false` | Open a browser/PWA UI once the server is up. Off by default — an agent has no use for a browser tab. |
|
|
103
|
-
| `url` | `http://localhost:{port}` | URL to open when `open` is true. `flipper-server` itself always binds to `localhost`, regardless of this value — it only controls what gets opened in the browser, so a custom host must already resolve to this machine (e.g. via `/etc/hosts`). |
|
|
104
|
-
| `autoEnablePlugin` | `false` | Automatically call `enablePlugin()` for every client that connects (see [Plugin activation](#plugin-activation) below). |
|
|
105
|
-
|
|
106
|
-
The CLI (`player-devtools-mcp` / `bin/run`) reads `open`/`url` from
|
|
107
|
-
`PLAYER_DEVTOOLS_FLIPPER_OPEN` / `PLAYER_DEVTOOLS_FLIPPER_URL`, and sets
|
|
108
|
-
`autoEnablePlugin: true` so every connecting client gets the plugin installed
|
|
109
|
-
(if needed) and activated automatically (see below) — no manual Flipper UI
|
|
110
|
-
interaction is required.
|
|
111
|
-
|
|
112
|
-
### Plugin installation
|
|
113
|
-
|
|
114
|
-
`flipper-server` has no built-in way to auto-fetch a plugin — but it does
|
|
115
|
-
expose the same install RPCs its own desktop UI's "Install Plugin" button
|
|
116
|
-
uses, over the same `exec(...)` mechanism this transport already relies on.
|
|
117
|
-
`FlipperServerTransport.ensurePluginInstalled()` calls
|
|
118
|
-
`plugins-get-installed-plugins` to check whether
|
|
119
|
-
`flipper-plugin-player-ui-devtools` is already installed, and if not, installs
|
|
120
|
-
it from npm via `plugins-install-from-npm` — no filesystem access, no
|
|
121
|
-
dependency on this repo's Bazel/justfile tooling, just Flipper's documented
|
|
122
|
-
plugin-management API:
|
|
123
|
-
|
|
124
|
-
```ts
|
|
125
|
-
const transport = new FlipperServerTransport();
|
|
126
|
-
await transport.connect();
|
|
127
|
-
await transport.ensurePluginInstalled();
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
`enablePlugin()` (below) already calls this internally before every
|
|
131
|
-
activation — the plugin can be installed or removed on the attached
|
|
132
|
-
flipper-server independently of this transport (e.g. a human using the
|
|
133
|
-
desktop UI concurrently), so there's no "already installed" snapshot that
|
|
134
|
-
stays trustworthy across calls. Call `ensurePluginInstalled()` directly only
|
|
135
|
-
if you need the installed version without also activating a client.
|
|
136
|
-
|
|
137
|
-
### Plugin activation
|
|
138
|
-
|
|
139
|
-
Flipper only opens a live connection for a plugin (and starts relaying its
|
|
140
|
-
messages) after sending it an `init` handshake — normally something only the
|
|
141
|
-
Flipper *desktop app* does, either automatically for a small class of
|
|
142
|
-
"background" plugins, or when a human selects that plugin's tab. Neither
|
|
143
|
-
applies to `flipper-plugin-player-ui-devtools` or to a headless MCP session,
|
|
144
|
-
so `FlipperServerTransport` exposes the handshake directly:
|
|
145
|
-
|
|
146
|
-
```ts
|
|
147
|
-
await transport.enablePlugin(); // activate every connected client not already active
|
|
148
|
-
await transport.enablePlugin(id); // or just one, regardless of its active state
|
|
149
|
-
await transport.disablePlugin(id); // release it again, without disconnecting
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Pass `autoEnablePlugin: true` to the constructor to have this happen
|
|
153
|
-
automatically for every client as it connects, instead of calling
|
|
154
|
-
`enablePlugin()` yourself.
|
|
155
102
|
|
|
156
103
|
### Shared `flipper-server` daemon
|
|
157
104
|
|
package/bin/run
CHANGED
|
@@ -1,29 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const { MCPServer } = require("@player-devtools/mcp");
|
|
4
|
-
const {
|
|
4
|
+
const {
|
|
5
|
+
FlipperServerTransport,
|
|
6
|
+
} = require("@player-devtools/client-flipper");
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
// is up (off by default — an agent has no use for a browser tab).
|
|
8
|
-
// PLAYER_DEVTOOLS_FLIPPER_URL overrides the URL that gets opened (defaults to
|
|
9
|
-
// http://localhost:{port}); the host still needs to resolve to this machine.
|
|
10
|
-
const transport = new FlipperServerTransport({
|
|
11
|
-
open: process.env.PLAYER_DEVTOOLS_FLIPPER_OPEN === "true",
|
|
12
|
-
url: process.env.PLAYER_DEVTOOLS_FLIPPER_URL,
|
|
13
|
-
// flipper-server never activates a non-background plugin like ours on its
|
|
14
|
-
// own unless a full Flipper desktop app is attached with our tab selected —
|
|
15
|
-
// we don't want to depend on that, so every connecting device gets the
|
|
16
|
-
// plugin activated for it automatically.
|
|
17
|
-
autoEnablePlugin: true,
|
|
18
|
-
});
|
|
8
|
+
const transport = new FlipperServerTransport();
|
|
19
9
|
const server = new MCPServer(transport);
|
|
20
10
|
|
|
21
|
-
server
|
|
22
|
-
.start
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
process.exit(1);
|
|
26
|
-
});
|
|
11
|
+
server.start().catch((err) => {
|
|
12
|
+
console.error("Failed to start MCP server:", err);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
});
|
|
27
15
|
|
|
28
16
|
process.on("SIGINT", () => {
|
|
29
17
|
server.stop().then(() => process.exit(0));
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -396,7 +396,7 @@ function allowlistEventProperties(event) {
|
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
// ../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/devtools/mcp/src/telemetry/index.ts
|
|
399
|
-
var MCP_VERSION = true ? "0.
|
|
399
|
+
var MCP_VERSION = true ? "0.15.1--canary.28.1248" : "unstamped";
|
|
400
400
|
function createAnalytics(server, deps) {
|
|
401
401
|
try {
|
|
402
402
|
const config = resolveTelemetryConfig();
|
package/dist/index.legacy-esm.js
CHANGED
|
@@ -362,7 +362,7 @@ function allowlistEventProperties(event) {
|
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
// ../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/devtools/mcp/src/telemetry/index.ts
|
|
365
|
-
var MCP_VERSION = true ? "0.
|
|
365
|
+
var MCP_VERSION = true ? "0.15.1--canary.28.1248" : "unstamped";
|
|
366
366
|
function createAnalytics(server, deps) {
|
|
367
367
|
try {
|
|
368
368
|
const config = resolveTelemetryConfig();
|
package/dist/index.mjs
CHANGED
|
@@ -362,7 +362,7 @@ function allowlistEventProperties(event) {
|
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
// ../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/devtools/mcp/src/telemetry/index.ts
|
|
365
|
-
var MCP_VERSION = true ? "0.
|
|
365
|
+
var MCP_VERSION = true ? "0.15.1--canary.28.1248" : "unstamped";
|
|
366
366
|
function createAnalytics(server, deps) {
|
|
367
367
|
try {
|
|
368
368
|
const config = resolveTelemetryConfig();
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"bin"
|
|
6
6
|
],
|
|
7
7
|
"name": "@player-devtools/mcp",
|
|
8
|
-
"version": "0.
|
|
8
|
+
"version": "0.15.1--canary.28.1248",
|
|
9
9
|
"main": "dist/cjs/index.cjs",
|
|
10
10
|
"bin": {
|
|
11
11
|
"player-devtools-mcp": "bin/run"
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"node": "^20.20.0 || >=22.22.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@player-devtools/client": "0.
|
|
18
|
-
"@player-devtools/client-flipper": "0.
|
|
19
|
-
"@player-devtools/messenger": "0.
|
|
20
|
-
"@player-devtools/types": "0.
|
|
17
|
+
"@player-devtools/client": "0.15.1--canary.28.1248",
|
|
18
|
+
"@player-devtools/client-flipper": "0.15.1--canary.28.1248",
|
|
19
|
+
"@player-devtools/messenger": "0.15.1--canary.28.1248",
|
|
20
|
+
"@player-devtools/types": "0.15.1--canary.28.1248",
|
|
21
21
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
22
22
|
"@posthog/mcp": "0.10.8",
|
|
23
23
|
"@types/node": "^24.0.1",
|