marble-headed-mcp 0.1.42 → 0.1.44
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 +49 -0
- package/dist/index.js +6 -5
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -1 +1,50 @@
|
|
|
1
1
|
# marble-headed-mcp
|
|
2
|
+
|
|
3
|
+
Local-first MCP development setup (no npm publish needed to test).
|
|
4
|
+
|
|
5
|
+
## Config files
|
|
6
|
+
|
|
7
|
+
- `mcp.local.json`: runs local build (`node dist/index.js`)
|
|
8
|
+
- `mcp.prod.json`: runs published npm package (`npx marble-headed-mcp@0.1.42`)
|
|
9
|
+
- `mcp.json`: active config used by your local Codex session
|
|
10
|
+
|
|
11
|
+
## One-command switch for Codex + Claude
|
|
12
|
+
|
|
13
|
+
Use these commands from this repo:
|
|
14
|
+
|
|
15
|
+
- `npm run switch:mcp:dev`
|
|
16
|
+
- `npm run switch:mcp:prod`
|
|
17
|
+
- `npm run switch:mcp:status`
|
|
18
|
+
|
|
19
|
+
What gets updated:
|
|
20
|
+
|
|
21
|
+
- `mcp.json` in this repo
|
|
22
|
+
- `~/.codex/config.toml` (`[mcp_servers.marble-headed]`)
|
|
23
|
+
- `~/.claude.json` (`mcpServers.marble-headed` globally + project entries)
|
|
24
|
+
|
|
25
|
+
After switching, restart active Codex and Claude sessions.
|
|
26
|
+
|
|
27
|
+
## Common workflow
|
|
28
|
+
|
|
29
|
+
1. Install deps once:
|
|
30
|
+
- `npm ci`
|
|
31
|
+
2. Switch to local MCP mode:
|
|
32
|
+
- `npm run use:mcp:local`
|
|
33
|
+
3. Build once (or use watch):
|
|
34
|
+
- `npm run build`
|
|
35
|
+
- or `npm run watch`
|
|
36
|
+
4. Restart Codex session so MCP reloads from `mcp.json`.
|
|
37
|
+
5. Test changes locally without publishing to npm.
|
|
38
|
+
|
|
39
|
+
## Switch back to published MCP
|
|
40
|
+
|
|
41
|
+
- `npm run use:mcp:prod`
|
|
42
|
+
- Restart Codex session.
|
|
43
|
+
|
|
44
|
+
## Publish flow (when ready)
|
|
45
|
+
|
|
46
|
+
1. Keep testing locally until stable.
|
|
47
|
+
2. Bump version:
|
|
48
|
+
- `npm version patch`
|
|
49
|
+
3. Publish:
|
|
50
|
+
- `npm publish --access public`
|
package/dist/index.js
CHANGED
|
@@ -6,9 +6,10 @@ import { promisify } from 'util';
|
|
|
6
6
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
7
7
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
8
8
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
9
|
-
const
|
|
9
|
+
const DEFAULT_BROWSER_APP_BASE_URL = 'http://localhost:3000';
|
|
10
|
+
const DEFAULT_HEADED_SERVER_BASE_URL = 'http://localhost:4000';
|
|
10
11
|
const ENVIRONMENT_BASE_URLS = {
|
|
11
|
-
localhost:
|
|
12
|
+
localhost: DEFAULT_BROWSER_APP_BASE_URL,
|
|
12
13
|
dev: 'https://dev.withmarble.ai',
|
|
13
14
|
production: 'https://withmarble.ai',
|
|
14
15
|
};
|
|
@@ -126,7 +127,7 @@ async function readCodexThreadIdFromLog(filePath) {
|
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
function resolveHeadedServerRawBaseUrl() {
|
|
129
|
-
const base = process.env.HEADED_SERVER_BASE_URL ||
|
|
130
|
+
const base = process.env.HEADED_SERVER_BASE_URL || DEFAULT_HEADED_SERVER_BASE_URL;
|
|
130
131
|
return normalizeBaseUrl(base);
|
|
131
132
|
}
|
|
132
133
|
function resolveHeadedServerAppBaseUrl() {
|
|
@@ -431,7 +432,7 @@ async function saveImageFromUrl({ url, filename }) {
|
|
|
431
432
|
const TOOLS = [
|
|
432
433
|
{
|
|
433
434
|
name: 'set_environment',
|
|
434
|
-
description: 'Set the in-browser app environment used by headed session actions. localhost -> http://localhost:3000, dev -> https://dev.withmarble.ai, production -> https://withmarble.ai. API calls still go to HEADED_SERVER_BASE_URL (default localhost:
|
|
435
|
+
description: 'Set the in-browser app environment used by headed session actions. localhost -> http://localhost:3000, dev -> https://dev.withmarble.ai, production -> https://withmarble.ai. API calls still go to HEADED_SERVER_BASE_URL (default localhost:4000).',
|
|
435
436
|
inputSchema: {
|
|
436
437
|
type: 'object',
|
|
437
438
|
properties: {
|
|
@@ -601,7 +602,7 @@ const TOOLS = [
|
|
|
601
602
|
},
|
|
602
603
|
createProgram: { type: 'boolean', description: 'If true (default), auto-generate program projects before save.' },
|
|
603
604
|
createProgramMessage: { type: 'string', description: 'Optional custom message used for program generation turn.' },
|
|
604
|
-
maxOperatorTurns: { type: 'number', description: 'Max auto-follow-up turns after the initial goal (default:
|
|
605
|
+
maxOperatorTurns: { type: 'number', description: 'Max auto-follow-up turns after the initial goal (default: 5).' },
|
|
605
606
|
workflowRunName: { type: 'string', description: 'Override workflow run name.' },
|
|
606
607
|
},
|
|
607
608
|
required: ['goal'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "marble-headed-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.44",
|
|
4
4
|
"description": "MCP server for Marble headed automation endpoints",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -16,7 +16,13 @@
|
|
|
16
16
|
"build": "tsc",
|
|
17
17
|
"prepare": "npm run build",
|
|
18
18
|
"watch": "tsc --watch",
|
|
19
|
-
"prepublishOnly": "npm run build"
|
|
19
|
+
"prepublishOnly": "npm run build",
|
|
20
|
+
"dev:mcp": "node dist/index.js",
|
|
21
|
+
"use:mcp:local": "cp mcp.local.json mcp.json",
|
|
22
|
+
"use:mcp:prod": "cp mcp.prod.json mcp.json",
|
|
23
|
+
"switch:mcp:dev": "node scripts/switch-mcp-mode.mjs dev",
|
|
24
|
+
"switch:mcp:prod": "node scripts/switch-mcp-mode.mjs prod",
|
|
25
|
+
"switch:mcp:status": "node scripts/switch-mcp-mode.mjs status"
|
|
20
26
|
},
|
|
21
27
|
"keywords": [
|
|
22
28
|
"mcp",
|