Skip to content

Commit 7a97ee8

Browse files
LittleCoinCoinLittleCoinCoin
authored andcommitted
docs(codex): add CLI reference and usage examples
Update CLI reference documentation with Codex-specific arguments: Argument table additions: - --env-vars: Environment variable names to whitelist/forward - --startup-timeout: Server startup timeout in seconds (default: 10) - --tool-timeout: Tool execution timeout in seconds (default: 60) - --enabled: Enable the MCP server flag - --bearer-token-env-var: Bearer token env var name - --env-header: HTTP header from env var (KEY=ENV_VAR_NAME format) Usage examples added: 1. Codex STDIO server with timeouts and tool filtering - Demonstrates env_vars, timeouts, enabled, tool filtering 2. Codex HTTP server with authentication - Demonstrates bearer_token_env_var, env_header, static headers Examples show complete command syntax and expected output format following existing documentation patterns.
1 parent 9cae56c commit 7a97ee8

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

docs/articles/users/CLIReference.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,12 @@ Syntax:
415415
| `--disabled` | flag | Disable the MCP server (Kiro) | false |
416416
| `--auto-approve-tools` | multiple | Tool names to auto-approve (Kiro). Can be used multiple times. | none |
417417
| `--disable-tools` | multiple | Tool names to disable (Kiro). Can be used multiple times. | none |
418+
| `--env-vars` | multiple | Environment variable names to whitelist/forward (Codex). Can be used multiple times. | none |
419+
| `--startup-timeout` | int | Server startup timeout in seconds (Codex, default: 10) | none |
420+
| `--tool-timeout` | int | Tool execution timeout in seconds (Codex, default: 60) | none |
421+
| `--enabled` | flag | Enable the MCP server (Codex) | false |
422+
| `--bearer-token-env-var` | string | Name of env var containing bearer token for Authorization header (Codex) | none |
423+
| `--env-header` | multiple | HTTP header from env var format: KEY=ENV_VAR_NAME (Codex). Can be used multiple times. | none |
418424
| `--dry-run` | flag | Preview configuration without applying changes | false |
419425
| `--auto-approve` | flag | Skip confirmation prompts | false |
420426
| `--no-backup` | flag | Skip backup creation before configuration | false |
@@ -509,6 +515,42 @@ Configure MCP server 'my-server' on host 'kiro'? [y/N]: y
509515
[SUCCESS] Successfully configured MCP server 'my-server' on host 'kiro'
510516
```
511517

518+
**Example - Codex Configuration with Timeouts and Tool Filtering**:
519+
520+
```bash
521+
$ hatch mcp configure context7 --host codex --command npx --args "-y" --args "@upstash/context7-mcp" --env-vars PATH --env-vars HOME --startup-timeout 15 --tool-timeout 120 --enabled --include-tools read --include-tools write --exclude-tools delete
522+
523+
Server 'context7' created for host 'codex':
524+
name: UPDATED None --> 'context7'
525+
command: UPDATED None --> 'npx'
526+
args: UPDATED None --> ['-y', '@upstash/context7-mcp']
527+
env_vars: UPDATED None --> ['PATH', 'HOME']
528+
startup_timeout_sec: UPDATED None --> 15
529+
tool_timeout_sec: UPDATED None --> 120
530+
enabled: UPDATED None --> True
531+
enabled_tools: UPDATED None --> ['read', 'write']
532+
disabled_tools: UPDATED None --> ['delete']
533+
534+
Configure MCP server 'context7' on host 'codex'? [y/N]: y
535+
[SUCCESS] Successfully configured MCP server 'context7' on host 'codex'
536+
```
537+
538+
**Example - Codex HTTP Server with Authentication**:
539+
540+
```bash
541+
$ hatch mcp configure figma --host codex --url https://mcp.figma.com/mcp --bearer-token-env-var FIGMA_OAUTH_TOKEN --env-header "X-Figma-Region=FIGMA_REGION" --header "X-Custom=static-value"
542+
543+
Server 'figma' created for host 'codex':
544+
name: UPDATED None --> 'figma'
545+
url: UPDATED None --> 'https://mcp.figma.com/mcp'
546+
bearer_token_env_var: UPDATED None --> 'FIGMA_OAUTH_TOKEN'
547+
env_http_headers: UPDATED None --> {'X-Figma-Region': 'FIGMA_REGION'}
548+
http_headers: UPDATED None --> {'X-Custom': 'static-value'}
549+
550+
Configure MCP server 'figma' on host 'codex'? [y/N]: y
551+
[SUCCESS] Successfully configured MCP server 'figma' on host 'codex'
552+
```
553+
512554
**Example - Remote Server Configuration**:
513555

514556
```bash

0 commit comments

Comments
 (0)