Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbdcb6fa

Browse files
clean up and add readme
1 parent953ae08 commitbdcb6fa

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

‎README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ and set it as the GITHUB_PERSONAL_ACCESS_TOKEN environment variable.
122122
-`pull_number`: Pull request number (number, required)
123123

124124
-**get_pull_request_reviews** - Get the reviews on a pull request
125+
125126
-`owner`: Repository owner (string, required)
126127
-`repo`: Repository name (string, required)
127128
-`pull_number`: Pull request number (number, required)
@@ -375,7 +376,7 @@ Run **Preferences: Open User Settings (JSON)**, and create or append to the `mcp
375376
"args": ["stdio"],
376377
"env": {
377378
"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:githubpat}"
378-
},
379+
}
379380
}
380381
}
381382
}
@@ -391,6 +392,10 @@ Try something like the following prompt to verify that it works:
391392
I'd like to know more about my GitHub profile.
392393
```
393394
395+
## GitHub Enterprise Server
396+
397+
The flag `--gh-host` and the environment variable `GH_HOST` can be used to set the GitHub Enterprise Server hostname.
398+
394399
## TODO
395400
396401
Testing

‎cmd/github-mcp-server/main.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66
"io"
77
stdlog"log"
8-
"net/url"
98
"os"
109
"os/signal"
1110
"syscall"
@@ -110,17 +109,8 @@ func runStdioServer(readOnly bool, logger *log.Logger, logCommands bool, exportT
110109
}
111110

112111
ifhost!="" {
113-
parsedURL,err:=url.Parse(fmt.Sprintf("https://api.%s/",host))
114-
iferr!=nil {
115-
returnfmt.Errorf("failed to parse provided GitHub host URL: %w",err)
116-
}
117-
118-
uploadURL,err:=url.Parse(fmt.Sprintf("https://uploads.%s/",host))
119-
iferr!=nil {
120-
returnfmt.Errorf("failed to parse provided GitHub host URL: %w",err)
121-
}
122-
123-
ghClient,err=ghClient.WithEnterpriseURLs(parsedURL.String(),uploadURL.String())
112+
varerrerror
113+
ghClient,err=ghClient.WithEnterpriseURLs(host,host)
124114
iferr!=nil {
125115
returnfmt.Errorf("failed to create GitHub client with host: %w",err)
126116
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp