@enfyra/mcp-server 0.0.83 → 0.0.85

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 CHANGED
@@ -12,9 +12,9 @@ From your project root:
12
12
  npx @enfyra/mcp-server config
13
13
  ```
14
14
 
15
- The config command can write user-level Codex config plus project config for Claude Code and Cursor. It preserves other MCP servers and replaces only the `enfyra` entry.
15
+ The config command writes project config for Codex, Claude Code, and Cursor. It preserves other MCP servers and replaces only the `enfyra` entry.
16
16
 
17
- Interactive setup asks for `ENFYRA_APP_URL` first, then asks for `ENFYRA_API_TOKEN`. The MCP API base is inferred as `<app>/api`, and the token page is inferred as `<app>/me`. For example, `https://demo.enfyra.io` becomes API base `https://demo.enfyra.io/api` and token page `https://demo.enfyra.io/me`.
17
+ Interactive setup asks for your Enfyra app/admin URL, then guides you to the token page when needed and asks for `ENFYRA_API_TOKEN`.
18
18
 
19
19
  ```bash
20
20
  # Non-interactive, all supported clients
@@ -37,7 +37,7 @@ yarn mcp:config
37
37
 
38
38
  | Client | Command | Project config |
39
39
  |--------|---------|----------------|
40
- | Codex | `npx @enfyra/mcp-server config --codex` | `~/.codex/config.toml` |
40
+ | Codex | `npx @enfyra/mcp-server config --codex` | `.codex/config.toml` |
41
41
  | Claude Code | `npx @enfyra/mcp-server config --claude-code` | `.mcp.json` |
42
42
  | Cursor | `npx @enfyra/mcp-server config --cursor` | `.cursor/mcp.json` |
43
43
  | MCP Inspector / other hosts | Paste the shared STDIO config below | Host-specific `mcpServers` config |
@@ -49,7 +49,7 @@ yarn mcp:config
49
49
  npx @enfyra/mcp-server config --codex
50
50
  ```
51
51
 
52
- Generated user config:
52
+ Generated project config:
53
53
 
54
54
  ```toml
55
55
  [mcp_servers.enfyra]
@@ -61,9 +61,9 @@ ENFYRA_API_URL = "http://localhost:3000/api"
61
61
  ENFYRA_API_TOKEN = "efy_pat_your-token"
62
62
  ```
63
63
 
64
- The writer replaces only `[mcp_servers.enfyra]` and `[mcp_servers.enfyra.env]` in the user-level Codex config. Other Codex config and other MCP servers are preserved.
64
+ The writer replaces only `[mcp_servers.enfyra]` and `[mcp_servers.enfyra.env]`. Other Codex config and other MCP servers are preserved.
65
65
 
66
- Restart Codex or start a new Codex session so user MCP config is loaded. The setup command does not create project `.codex/config.toml`, because project-scoped executable MCP config can trigger Codex workspace safety checks.
66
+ Open this folder in a new Codex session and approve the project MCP config if prompted. The setup command only writes `.codex/config.toml`; it does not ship or create `.codex/skills`.
67
67
 
68
68
  Official reference: [Codex config](https://developers.openai.com/codex/config-reference).
69
69
 
@@ -142,7 +142,7 @@ npx @enfyra/mcp-server config [options]
142
142
 
143
143
  | Option | Use |
144
144
  |--------|-----|
145
- | `--app-url` | Set the Enfyra app/admin URL; setup writes `<app>/api` to MCP config |
145
+ | `--app-url` | Set the Enfyra app/admin URL |
146
146
  | `--api-token`, `-t` | Set `ENFYRA_API_TOKEN` |
147
147
  | `--yes` | Non-interactive mode for CI/scripts |
148
148
  | `--global` | Write global/user config instead of project config |
@@ -158,8 +158,8 @@ Without a target flag, interactive mode asks which client to configure. Non-inte
158
158
 
159
159
  | Variable | Description | Default |
160
160
  |----------|-------------|---------|
161
- | `ENFYRA_APP_URL` | App/admin URL used by setup to derive `ENFYRA_API_URL=<app>/api` and token page `<app>/me` | `http://localhost:3000` |
162
- | `ENFYRA_API_URL` | Runtime API base written into MCP client config | Derived from `ENFYRA_APP_URL` |
161
+ | `ENFYRA_APP_URL` | App/admin URL used by setup | `http://localhost:3000` |
162
+ | `ENFYRA_API_URL` | Runtime API base written into MCP client config | Generated by setup |
163
163
  | `ENFYRA_API_TOKEN` | Programmatic token from the Enfyra admin UI `/me` | Required |
164
164
 
165
165
  For normal apps and demos, enter the app/admin URL such as `http://localhost:3000` or `https://demo.enfyra.io`. Treat the direct Enfyra backend host as private infrastructure unless you are debugging Enfyra core/server internals.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enfyra/mcp-server",
3
- "version": "0.0.83",
3
+ "version": "0.0.85",
4
4
  "description": "MCP server for Enfyra - manage Enfyra instances from MCP-compatible coding tools",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -23,7 +23,7 @@ const style = {
23
23
  const clients = {
24
24
  codex: {
25
25
  label: 'Codex',
26
- path: '~/.codex/config.toml',
26
+ path: './.codex/config.toml',
27
27
  color: style.green,
28
28
  },
29
29
  claude: {
@@ -61,7 +61,7 @@ ${style.bold('Usage')}
61
61
  npx @enfyra/mcp-server config [options]
62
62
 
63
63
  ${style.bold('Supported clients')}
64
- Codex ~/.codex/config.toml
64
+ Codex ./.codex/config.toml
65
65
  Claude Code ./.mcp.json
66
66
  Cursor ./.cursor/mcp.json
67
67
  Other MCP hosts can use the shared stdio JSON from the README.
@@ -69,7 +69,7 @@ ${style.bold('Supported clients')}
69
69
  ${style.bold('Options')}
70
70
  --app-url <url> Enfyra app/admin URL, for example https://demo.enfyra.io
71
71
  --api-token, -t <secret> ENFYRA_API_TOKEN
72
- --global Write Claude Code/Cursor global config instead of project config; Codex is always user-level
72
+ --global Write global/user config for selected clients instead of project config
73
73
  --reconfig Always choose target again in interactive mode and replace the old enfyra config for that target
74
74
  --yes Non-interactive: no prompts (CI / scripts); use CLI, env, existing file, then defaults
75
75
 
@@ -78,14 +78,13 @@ ${style.bold('Client selection')}
78
78
 
79
79
  --claude-code, --claude, --claude-only Only ./.mcp.json (Claude Code project scope)
80
80
  --cursor, --cursor-only Only ./.cursor/mcp.json (Cursor)
81
- --codex, --codex-only Only ~/.codex/config.toml (Codex user scope)
81
+ --codex, --codex-only Only ./.codex/config.toml (Codex project scope)
82
82
  Passing multiple target flags writes each selected target.
83
83
 
84
84
  -h, --help Show this help
85
85
 
86
86
  ${style.bold('Interactive mode')}
87
87
  Choose Codex, Claude Code, Cursor, or all clients; then enter ENFYRA_APP_URL and ENFYRA_API_TOKEN.
88
- The API base is inferred by appending /api to the app URL.
89
88
  Existing Enfyra config and environment variables are used as defaults. Re-run anytime to update.
90
89
 
91
90
  ${style.bold('Examples')}
@@ -287,7 +286,7 @@ async function readCodexEnfyraEnv(absPath) {
287
286
  }
288
287
 
289
288
  function getCodexConfigPath(root, globalScope) {
290
- return join(homedir(), '.codex', 'config.toml');
289
+ return globalScope ? join(homedir(), '.codex', 'config.toml') : join(root, '.codex', 'config.toml');
291
290
  }
292
291
 
293
292
  function getClaudeConfigPath(root, globalScope) {
@@ -361,7 +360,7 @@ async function promptTargetChoice() {
361
360
  const rl = createInterface({ input, output });
362
361
  const line = (await rl.question(
363
362
  'Where should Enfyra MCP config be written?\n'
364
- + ' [1] Codex ~/.codex/config.toml\n'
363
+ + ' [1] Codex ./.codex/config.toml\n'
365
364
  + ' [2] Claude Code ./.mcp.json\n'
366
365
  + ' [3] Cursor ./.cursor/mcp.json\n'
367
366
  + ' [4] All [default]\n'
@@ -485,7 +484,7 @@ async function promptConfig(opts, existing) {
485
484
  const defaultAppUrl = resolveDefaultAppUrl(opts, existing);
486
485
  if (!appUrl) {
487
486
  console.log(`${style.cyan('◆')} ${style.bold('Connect to Enfyra')}`);
488
- console.log(`${style.dim('│')} Enter the Enfyra app URL. The API base will be inferred as ${style.bold('<app>/api')}.`);
487
+ console.log(`${style.dim('│')} Enter the Enfyra app URL.`);
489
488
  const line = (await q(`${style.dim('└')} ENFYRA_APP_URL ${style.dim(`[${defaultAppUrl}]`)}: `)).trim();
490
489
  appUrl = normalizeAppUrl(line || defaultAppUrl);
491
490
  }
@@ -497,8 +496,7 @@ async function promptConfig(opts, existing) {
497
496
  const meUrl = deriveMeUrl(appUrl);
498
497
  console.log('');
499
498
  console.log(`${style.cyan('◆')} ${style.bold('API token')}`);
500
- console.log(`${style.dim('│')} If you do not have a token yet, open: ${style.cyan(meUrl)}`);
501
- console.log(`${style.dim('│')} In the Enfyra admin UI, open ${style.bold('/me')} and create/copy a programmatic API token.`);
499
+ console.log(`${style.dim('│')} If you do not have a token yet, create one here: ${style.cyan(meUrl)}`);
502
500
  const line = (await q(`${style.dim('└')} ENFYRA_API_TOKEN${hint}: `)).trim();
503
501
  apiToken = line !== '' ? line : defaultApiToken;
504
502
  }
@@ -595,14 +593,7 @@ export async function runLocalConfig(argv) {
595
593
  written.push({ client: 'cursor', path: p });
596
594
  }
597
595
 
598
- const hasProjectConfig = writeClaude || writeCursor;
599
- const scopeLabel = opts.global
600
- ? 'global/user'
601
- : writeCodex && hasProjectConfig
602
- ? 'project + Codex user'
603
- : writeCodex
604
- ? 'Codex user'
605
- : 'project';
596
+ const scopeLabel = opts.global ? 'global/user' : 'project';
606
597
  console.log(`${statusIcon('success')} ${style.bold(style.green('Enfyra MCP config updated'))} ${style.dim(`(${scopeLabel})`)}\n`);
607
598
  for (const entry of written) {
608
599
  const meta = clients[entry.client];
@@ -613,7 +604,7 @@ export async function runLocalConfig(argv) {
613
604
  const selectedClients = new Set(written.map(entry => entry.client));
614
605
  console.log(`\n${style.bold(style.blue('Next steps'))}`);
615
606
  if (selectedClients.has('codex')) {
616
- console.log(' - Codex: restart Codex or start a new Codex session so user MCP config is loaded.');
607
+ console.log(' - Codex: open this folder in a new Codex session and approve the project MCP config if prompted.');
617
608
  }
618
609
  if (selectedClients.has('claude')) {
619
610
  console.log(' - Claude Code: open this folder; approve project MCP if prompted.');