Skip to content

Commit 5d8cb89

Browse files
committed
Add default field to input schema and GITHUB_HOST to GitHub definition
- Add `default` property to input schema for optional default values - Add GITHUB_HOST input to GitHub server definition with default "https://api.github.com" - Pass GITHUB_HOST env var through Docker -e flag https://claude.ai/code/session_013AxurW8hPAfnUNvik354Xx
1 parent a8a9371 commit 5d8cb89

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

schemas/server-definition.schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@
223223
"type": "string",
224224
"description": "Help text for this input"
225225
},
226+
"default": {
227+
"type": "string",
228+
"description": "Default value for this input. Used when the user does not provide a value."
229+
},
226230
"placeholder": {
227231
"type": "string",
228232
"description": "Placeholder text"

servers/com.github-mcp.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
"type": "stdio",
1414
"command": "docker",
1515
"args": [
16-
"run", "-i", "--rm", "-e",
17-
"GITHUB_PERSONAL_ACCESS_TOKEN",
16+
"run", "-i", "--rm",
17+
"-e", "GITHUB_PERSONAL_ACCESS_TOKEN",
18+
"-e", "GITHUB_HOST",
1819
"ghcr.io/github/github-mcp-server"
1920
],
2021
"env": {
21-
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:GITHUB_PERSONAL_ACCESS_TOKEN}"
22+
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:GITHUB_PERSONAL_ACCESS_TOKEN}",
23+
"GITHUB_HOST": "${input:GITHUB_HOST}"
2224
},
2325
"metadata": {
2426
"inputs": [
@@ -35,6 +37,16 @@
3537
"instructions": "1. Click 'Generate new token (classic)'\n2. Give it a name like 'McpMux'\n3. Select scopes: repo, read:org\n4. Click 'Generate token'\n5. Copy the token (starts with ghp_)",
3638
"button_label": "Create Token"
3739
}
40+
},
41+
{
42+
"id": "GITHUB_HOST",
43+
"label": "GitHub Host",
44+
"description": "GitHub hostname. Set this for GitHub Enterprise Server or GitHub Enterprise Cloud with data residency. Leave empty for github.com.",
45+
"type": "url",
46+
"required": false,
47+
"secret": false,
48+
"default": "https://api.github.com",
49+
"placeholder": "https://github.example.com"
3850
}
3951
]
4052
}

0 commit comments

Comments
 (0)