Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 67 additions & 16 deletions .github/workflows/mcp-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,35 @@ jobs:
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Build UI
uses: ./.github/actions/build-ui

- name: Generate diff configurations
id: configs
# The generator imports pkg/github so any new entry in
# AllowedFeatureFlags is automatically diffed without touching this
# workflow. See script/print-mcp-diff-configs/main.go.
run: |
{
echo 'configurations<<MCP_DIFF_EOF'
go run ./script/print-mcp-diff-configs
echo 'MCP_DIFF_EOF'
} >> "$GITHUB_OUTPUT"

- name: Run MCP Server Diff
uses: SamMorrowDrums/mcp-server-diff@v2.3.5
with:
setup_go: "true"
setup_go: "false"
install_command: go mod download
start_command: go run ./cmd/github-mcp-server stdio
env_vars: |
GITHUB_PERSONAL_ACCESS_TOKEN=test-token
configurations: |
[
{"name": "default", "args": ""},
{"name": "read-only", "args": "--read-only"},
{"name": "toolsets-repos", "args": "--toolsets=repos"},
{"name": "toolsets-issues", "args": "--toolsets=issues"},
{"name": "toolsets-context", "args": "--toolsets=context"},
{"name": "toolsets-pull_requests", "args": "--toolsets=pull_requests"},
{"name": "toolsets-repos,issues", "args": "--toolsets=repos,issues"},
{"name": "toolsets-issues,context", "args": "--toolsets=issues,context"},
{"name": "toolsets-all", "args": "--toolsets=all"},
{"name": "tools-get_me", "args": "--tools=get_me"},
{"name": "tools-get_me,list_issues", "args": "--tools=get_me,list_issues"},
{"name": "toolsets-repos+read-only", "args": "--toolsets=repos --read-only"}
]
configurations: ${{ steps.configs.outputs.configurations }}

- name: Add interpretation note
if: always()
Expand All @@ -58,3 +61,51 @@ jobs:
echo "- New tools/toolsets added" >> $GITHUB_STEP_SUMMARY
echo "- Tool descriptions updated" >> $GITHUB_STEP_SUMMARY
echo "- Capability changes (intentional improvements)" >> $GITHUB_STEP_SUMMARY

mcp-diff-http:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Build UI
uses: ./.github/actions/build-ui

- name: Generate diff configurations
id: configs
# See script/print-mcp-diff-configs/main.go. The http-headers variant
# points every config at a shared HTTP server started by the action
# and carries per-config settings via X-MCP-* headers, mirroring how
# the remote server is invoked in production (server-side defaults +
# per-user header overrides).
run: |
{
echo 'configurations<<MCP_DIFF_EOF'
go run ./script/print-mcp-diff-configs -transport http-headers
echo 'MCP_DIFF_EOF'
} >> "$GITHUB_OUTPUT"

- name: Run MCP Server Diff (streamable-http)
uses: SamMorrowDrums/mcp-server-diff@v2.3.5
with:
setup_go: "false"
install_command: go mod download
http_start_command: go run ./cmd/github-mcp-server http --port 8082
http_startup_wait_ms: "5000"
configurations: ${{ steps.configs.outputs.configurations }}

- name: Add interpretation note
if: always()
run: |
echo "" >> $GITHUB_STEP_SUMMARY
echo "---" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "ℹ️ **Note:** This job exercises the streamable-http transport against a shared server, with per-config settings supplied via X-MCP-* request headers." >> $GITHUB_STEP_SUMMARY
168 changes: 168 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,21 @@ The following sets of tools are available:
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)

- **add_sub_issue** - Add Sub-Issue
- **Required OAuth Scopes**: `repo`
- `issue_number`: The parent issue number (number, required)
- `owner`: Repository owner (username or organization) (string, required)
- `replace_parent`: If true, reparent the sub-issue if it already has a parent (boolean, optional)
- `repo`: Repository name (string, required)
- `sub_issue_id`: The ID of the sub-issue to add. ID is not the same as issue number (number, required)

- **create_issue** - Create Issue
- **Required OAuth Scopes**: `repo`
- `body`: Issue body content (optional) (string, optional)
- `owner`: Repository owner (username or organization) (string, required)
- `repo`: Repository name (string, required)
- `title`: Issue title (string, required)

- **get_label** - Get a specific label from a repository
- **Required OAuth Scopes**: `repo`
- `name`: Label name. (string, required)
Expand Down Expand Up @@ -894,6 +909,22 @@ The following sets of tools are available:
- `since`: Filter by date (ISO 8601 timestamp) (string, optional)
- `state`: Filter by state, by default both open and closed issues are returned when not provided (string, optional)

- **remove_sub_issue** - Remove Sub-Issue
- **Required OAuth Scopes**: `repo`
- `issue_number`: The parent issue number (number, required)
- `owner`: Repository owner (username or organization) (string, required)
- `repo`: Repository name (string, required)
- `sub_issue_id`: The ID of the sub-issue to remove. ID is not the same as issue number (number, required)

- **reprioritize_sub_issue** - Reprioritize Sub-Issue
- **Required OAuth Scopes**: `repo`
- `after_id`: The ID of the sub-issue to place this after (either after_id OR before_id should be specified) (number, optional)
- `before_id`: The ID of the sub-issue to place this before (either after_id OR before_id should be specified) (number, optional)
- `issue_number`: The parent issue number (number, required)
- `owner`: Repository owner (username or organization) (string, required)
- `repo`: Repository name (string, required)
- `sub_issue_id`: The ID of the sub-issue to reorder. ID is not the same as issue number (number, required)

- **search_issues** - Search issues
- **Required OAuth Scopes**: `repo`
- `order`: Sort order (string, optional)
Expand All @@ -904,6 +935,13 @@ The following sets of tools are available:
- `repo`: Optional repository name. If provided with owner, only issues for this repository are listed. (string, optional)
- `sort`: Sort field by number of matches of categories, defaults to best match (string, optional)

- **set_issue_fields** - Set Issue Fields
- **Required OAuth Scopes**: `repo`
- `fields`: Array of issue field values to set. Each element must have a 'field_id' (string, the GraphQL node ID of the field) and exactly one value field: 'text_value' for text fields, 'number_value' for number fields, 'date_value' (ISO 8601 date string) for date fields, or 'single_select_option_id' (the GraphQL node ID of the option) for single select fields. Set 'delete' to true to remove a field value. (object[], required)
- `issue_number`: The issue number to update (number, required)
- `owner`: Repository owner (username or organization) (string, required)
- `repo`: Repository name (string, required)

- **sub_issue_write** - Change sub-issue
- **Required OAuth Scopes**: `repo`
- `after_id`: The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified) (number, optional)
Expand All @@ -920,6 +958,57 @@ The following sets of tools are available:
- `repo`: Repository name (string, required)
- `sub_issue_id`: The ID of the sub-issue to add. ID is not the same as issue number (number, required)

- **update_issue_assignees** - Update Issue Assignees
- **Required OAuth Scopes**: `repo`
- `assignees`: GitHub usernames to assign to this issue (string[], required)
- `issue_number`: The issue number to update (number, required)
- `owner`: Repository owner (username or organization) (string, required)
- `repo`: Repository name (string, required)

- **update_issue_body** - Update Issue Body
- **Required OAuth Scopes**: `repo`
- `body`: The new body content for the issue (string, required)
- `issue_number`: The issue number to update (number, required)
- `owner`: Repository owner (username or organization) (string, required)
- `repo`: Repository name (string, required)

- **update_issue_labels** - Update Issue Labels
- **Required OAuth Scopes**: `repo`
- `issue_number`: The issue number to update (number, required)
- `labels`: Labels to apply to this issue. ([], required)
- `owner`: Repository owner (username or organization) (string, required)
- `repo`: Repository name (string, required)

- **update_issue_milestone** - Update Issue Milestone
- **Required OAuth Scopes**: `repo`
- `issue_number`: The issue number to update (number, required)
- `milestone`: The milestone number to set on the issue (integer, required)
- `owner`: Repository owner (username or organization) (string, required)
- `repo`: Repository name (string, required)

- **update_issue_state** - Update Issue State
- **Required OAuth Scopes**: `repo`
- `issue_number`: The issue number to update (number, required)
- `owner`: Repository owner (username or organization) (string, required)
- `repo`: Repository name (string, required)
- `state`: The new state for the issue (string, required)
- `state_reason`: The reason for the state change (only for closed state) (string, optional)

- **update_issue_title** - Update Issue Title
- **Required OAuth Scopes**: `repo`
- `issue_number`: The issue number to update (number, required)
- `owner`: Repository owner (username or organization) (string, required)
- `repo`: Repository name (string, required)
- `title`: The new title for the issue (string, required)

- **update_issue_type** - Update Issue Type
- **Required OAuth Scopes**: `repo`
- `issue_number`: The issue number to update (number, required)
- `issue_type`: The issue type to set (string, required)
- `owner`: Repository owner (username or organization) (string, required)
- `rationale`: One concise sentence explaining what specifically about the issue led you to choose this type. State the concrete signal (e.g. 'Reports a crash when saving' → bug, 'Asks for dark mode support' → feature). (string, optional)
- `repo`: Repository name (string, required)

</details>

<details>
Expand Down Expand Up @@ -1072,6 +1161,19 @@ The following sets of tools are available:
- `startSide`: For multi-line comments, the starting side of the diff that the comment applies to. LEFT indicates the previous state, RIGHT indicates the new state (string, optional)
- `subjectType`: The level at which the comment is targeted (string, required)

- **add_pull_request_review_comment** - Add Pull Request Review Comment
- **Required OAuth Scopes**: `repo`
- `body`: The comment body (string, required)
- `line`: The line number in the diff to comment on (optional) (number, optional)
- `owner`: Repository owner (username or organization) (string, required)
- `path`: The relative path of the file to comment on (string, required)
- `pullNumber`: The pull request number (number, required)
- `repo`: Repository name (string, required)
- `side`: The side of the diff to comment on (optional) (string, optional)
- `startLine`: The start line of a multi-line comment (optional) (number, optional)
- `startSide`: The start side of a multi-line comment (optional) (string, optional)
- `subjectType`: The subject type of the comment (string, required)

- **add_reply_to_pull_request_comment** - Add reply to pull request comment
- **Required OAuth Scopes**: `repo`
- `body`: The text of the reply (string, required)
Expand All @@ -1091,6 +1193,21 @@ The following sets of tools are available:
- `repo`: Repository name (string, required)
- `title`: PR title (string, required)

- **create_pull_request_review** - Create Pull Request Review
- **Required OAuth Scopes**: `repo`
- `body`: The review body text (optional) (string, optional)
- `commitID`: The SHA of the commit to review (optional, defaults to latest) (string, optional)
- `event`: The review action to perform. If omitted, creates a pending review. (string, optional)
- `owner`: Repository owner (username or organization) (string, required)
- `pullNumber`: The pull request number (number, required)
- `repo`: Repository name (string, required)

- **delete_pending_pull_request_review** - Delete Pending Pull Request Review
- **Required OAuth Scopes**: `repo`
- `owner`: Repository owner (username or organization) (string, required)
- `pullNumber`: The pull request number (number, required)
- `repo`: Repository name (string, required)

- **list_pull_requests** - List pull requests
- **Required OAuth Scopes**: `repo`
- `base`: Filter by base branch (string, optional)
Expand Down Expand Up @@ -1143,6 +1260,17 @@ The following sets of tools are available:
- `repo`: Repository name (string, required)
- `threadId`: The node ID of the review thread (e.g., PRRT_kwDOxxx). Required for resolve_thread and unresolve_thread methods. Get thread IDs from pull_request_read with method get_review_comments. (string, optional)

- **request_pull_request_reviewers** - Request Pull Request Reviewers
- **Required OAuth Scopes**: `repo`
- `owner`: Repository owner (username or organization) (string, required)
- `pullNumber`: The pull request number (number, required)
- `repo`: Repository name (string, required)
- `reviewers`: GitHub usernames to request reviews from (string[], required)

- **resolve_review_thread** - Resolve Review Thread
- **Required OAuth Scopes**: `repo`
- `threadID`: The node ID of the review thread to resolve (e.g., PRRT_kwDOxxx) (string, required)

- **search_pull_requests** - Search pull requests
- **Required OAuth Scopes**: `repo`
- `order`: Sort order (string, optional)
Expand All @@ -1153,6 +1281,18 @@ The following sets of tools are available:
- `repo`: Optional repository name. If provided with owner, only pull requests for this repository are listed. (string, optional)
- `sort`: Sort field by number of matches of categories, defaults to best match (string, optional)

- **submit_pending_pull_request_review** - Submit Pending Pull Request Review
- **Required OAuth Scopes**: `repo`
- `body`: The review body text (optional) (string, optional)
- `event`: The review action to perform (string, required)
- `owner`: Repository owner (username or organization) (string, required)
- `pullNumber`: The pull request number (number, required)
- `repo`: Repository name (string, required)

- **unresolve_review_thread** - Unresolve Review Thread
- **Required OAuth Scopes**: `repo`
- `threadID`: The node ID of the review thread to unresolve (e.g., PRRT_kwDOxxx) (string, required)

- **update_pull_request** - Edit pull request
- **Required OAuth Scopes**: `repo`
- `base`: New base branch name (string, optional)
Expand All @@ -1166,13 +1306,41 @@ The following sets of tools are available:
- `state`: New state (string, optional)
- `title`: New title (string, optional)

- **update_pull_request_body** - Update Pull Request Body
- **Required OAuth Scopes**: `repo`
- `body`: The new body content for the pull request (string, required)
- `owner`: Repository owner (username or organization) (string, required)
- `pullNumber`: The pull request number (number, required)
- `repo`: Repository name (string, required)

- **update_pull_request_branch** - Update pull request branch
- **Required OAuth Scopes**: `repo`
- `expectedHeadSha`: The expected SHA of the pull request's HEAD ref (string, optional)
- `owner`: Repository owner (string, required)
- `pullNumber`: Pull request number (number, required)
- `repo`: Repository name (string, required)

- **update_pull_request_draft_state** - Update Pull Request Draft State
- **Required OAuth Scopes**: `repo`
- `draft`: Set to true to convert to draft, false to mark as ready for review (boolean, required)
- `owner`: Repository owner (username or organization) (string, required)
- `pullNumber`: The pull request number (number, required)
- `repo`: Repository name (string, required)

- **update_pull_request_state** - Update Pull Request State
- **Required OAuth Scopes**: `repo`
- `owner`: Repository owner (username or organization) (string, required)
- `pullNumber`: The pull request number (number, required)
- `repo`: Repository name (string, required)
- `state`: The new state for the pull request (string, required)

- **update_pull_request_title** - Update Pull Request Title
- **Required OAuth Scopes**: `repo`
- `owner`: Repository owner (username or organization) (string, required)
- `pullNumber`: The pull request number (number, required)
- `repo`: Repository name (string, required)
- `title`: The new title for the pull request (string, required)

</details>

<details>
Expand Down
8 changes: 8 additions & 0 deletions cmd/github-mcp-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ var (
}
}

var enabledFeatures []string
if viper.IsSet("features") {
if err := viper.UnmarshalKey("features", &enabledFeatures); err != nil {
return fmt.Errorf("failed to unmarshal features: %w", err)
}
}

ttl := viper.GetDuration("repo-access-cache-ttl")
httpConfig := ghhttp.ServerConfig{
Version: version,
Expand All @@ -144,6 +151,7 @@ var (
EnabledToolsets: enabledToolsets,
EnabledTools: enabledTools,
ExcludeTools: excludeTools,
EnabledFeatures: enabledFeatures,
InsidersMode: viper.GetBool("insiders"),
}

Expand Down
Loading
Loading