Skip to content

Commit ea3190a

Browse files
committed
feat: support $: cmd arg1 arg2 syntax in env to execute shell commands
1 parent cbc81ee commit ea3190a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ MCPHub uses a JSON configuration file to define MCP servers. The default locatio
296296
"env": {
297297
"API_KEY": "", // Falls back to process.env.API_KEY
298298
"SERVER_URL": null, // Falls back to process.env.SERVER_URL
299+
"OP_KEY": "$: cmd:op read op://example/secret", // use $: at the beginning to indicate that this is a command
299300
"AUTH_HEADER": "BEARER ${API_KEY}", // ${API_KEY} is replaced with resolved value of API_KEY in the env field falling back to process.env
300301
"DEBUG": "true" // Direct value, no fallback
301302
}
@@ -323,6 +324,7 @@ Configuration file (`~/.config/mcphub/servers.json`) is watched for changes and
323324
- `env`: Optional environment variables. Special values:
324325
- `""` (empty string): Falls back to process.env.[VAR_NAME]
325326
- `null`: Falls back to process.env.[VAR_NAME]
327+
- `$:` values that start with `$:` are executed as shell commands e.g to use op cli `$: cmd:op read op://personal/secret`
326328
- `${ENV_VAR}`: Replaces with the resolved value of ENV_VAR in the env field, falling back to process.env
327329
- Any other value is used as-is
328330

lua/mcphub/utils/version.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
return {
2-
PLUGIN_VERSION = "5.1.0", -- Current plugin version
2+
PLUGIN_VERSION = "5.2.0", -- Current plugin version
33
REQUIRED_NODE_VERSION = { -- Required mcp-hub version
44
major = 3,
55
minor = 1,
6-
patch = 8,
7-
string = "3.1.8",
6+
patch = 9,
7+
string = "3.1.9",
88
},
99
}

0 commit comments

Comments
 (0)