You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-7Lines changed: 29 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -247,7 +247,7 @@ To keep your GitHub PAT secure and reusable across different MCP hosts:
247
247
The flag `--gh-host` and the environment variable `GITHUB_HOST` can be used to set
248
248
the hostname for GitHub Enterprise Server or GitHub Enterprise Cloud with data residency.
249
249
250
-
- For GitHub Enterprise Server, prefix the hostname with the `https://` URI scheme, as it otherwise defaults to `http://`, which GitHub Enterprise Server does not support.
250
+
- For GitHub Enterprise Server, prefix the hostname with the `https://` URI scheme. HTTPS is required and enforced: non-HTTPS hosts are refused so that credentials are never sent over cleartext (the only exception is a loopback host such as `http://localhost` for local development).
251
251
- For GitHub Enterprise Cloud with data residency, use `https://YOURSUBDOMAIN.ghe.com` as the hostname.
252
252
253
253
```json
@@ -895,7 +895,7 @@ The following sets of tools are available:
895
895
-**add_issue_comment** - Add comment to issue or pull request
896
896
-**Required OAuth Scopes**: `repo`
897
897
-`body`: Comment content. Required unless reaction is provided. (string, optional)
898
-
-`comment_id`: The numeric ID of the issue or pull request comment to react to. Use this for reactions to comments; omit it to react to the issue or pull request itself. Cannot be combined with body. (number, optional)
898
+
-`comment_id`: The numeric ID of the issue or pull request comment to react to. Use this for reactions to comments; omit it to react to the issue or pull request itself. Cannot be combined with body. (integer, optional)
899
899
-`issue_number`: Issue or pull request number to comment on or react to. (number, required)
900
900
-`owner`: Repository owner (string, required)
901
901
-`reaction`: Emoji reaction to add. Required unless body is provided. (string, optional)
@@ -912,7 +912,7 @@ The following sets of tools are available:
912
912
-`issue_number`: The number of the issue (number, required)
913
913
-`method`: The read operation to perform on a single issue.
914
914
Options are:
915
-
1. get - Get issue details. Also returns best-effort hierarchy flags (`has_parent`, `has_children`); `parent` and `sub_issues_summary` are optional relationship summaries.
915
+
1. get - Get issue details. Also returns best-effort hierarchy flags (`has_parent`, `has_children`); `parent` and `sub_issues_summary` are optional relationship summaries, and `closed_by_pull_requests` summarizes the pull requests configured to close the issue as `total_count` plus up to 5 `references`.
916
916
2. get_comments - Get issue comments.
917
917
3. get_sub_issues - Get sub-issues (children) of the issue.
918
918
4. get_parent - Get the parent issue, if this issue is a sub-issue of another.
@@ -927,7 +927,7 @@ The following sets of tools are available:
927
927
-**Required OAuth Scopes**: `repo`
928
928
-`assignees`: Usernames to assign to this issue (string[], optional)
929
929
-`body`: Issue body content (string, optional)
930
-
-`duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
930
+
-`duplicate_of`: Issue number that this issue is a duplicate of. Required when state_reason is 'duplicate'. (number, optional)
931
931
-`issue_fields`: Issue field values to set or clear. Each item requires 'field_name' and exactly one of 'value', 'field_option_name', or 'delete: true'. (object[], optional)
932
932
-`issue_number`: Issue number to update (number, optional)
933
933
-`labels`: Labels to apply to this issue (string[], optional)
@@ -942,7 +942,7 @@ The following sets of tools are available:
942
942
-`state`: New state (string, optional)
943
943
-`state_reason`: Reason for the state change. Ignored unless state is changed. (string, optional)
944
944
-`title`: Issue title (string, optional)
945
-
-`type`: Type of this issue. Only use if issue types are enabled for this repository. Use list_issue_types tool to get valid type values for this repository or its owner organization. If the repository doesn't support issue types, omit this parameter. (string, optional)
945
+
-`type`: Type of this issue. For updates, pass null to remove the current type. Only use if issue types are enabled for this repository. Use list_issue_types to get valid type values for this repository or its owner organization. If the repository doesn't support issue types, omit this parameter. (string | null, optional)
@@ -977,7 +977,7 @@ The following sets of tools are available:
977
977
-`owner`: Optional repository owner. If provided with repo, only issues for this repository are listed. (string, optional)
978
978
-`page`: Page number for pagination (min 1) (number, optional)
979
979
-`perPage`: Results per page for pagination (min 1, max 100) (number, optional)
980
-
-`query`: Search query using GitHub issues search syntax (string, required)
980
+
-`query`: The search query, as natural language. When the user gives alternative wordings, include them as plain words rather than joining them with OR. (string, required)
981
981
-`repo`: Optional repository name. If provided with owner, only issues for this repository are listed. (string, optional)
982
982
-`sort`: Sort field by number of matches of categories, defaults to best match (string, optional)
983
983
@@ -1100,6 +1100,7 @@ The following sets of tools are available:
1100
1100
-`owner_type`: Owner type (user or org). If not provided, will be automatically detected. (string, optional)
1101
1101
-`project_number`: The project's number. (number, optional)
1102
1102
-`status_update_id`: The node ID of the project status update. Required for 'get_project_status_update' method. (string, optional)
1103
+
-`view_id`: The node ID of the project view. Required for 'get_project_view' method. (string, optional)
1103
1104
1104
1105
-**projects_list** - List GitHub Projects resources
1105
1106
-**Required OAuth Scopes**: `read:project`
@@ -1112,13 +1113,14 @@ The following sets of tools are available:
1112
1113
-`owner`: The owner (user or organization login). The name is not case sensitive. (string, required)
1113
1114
-`owner_type`: Owner type (user or org). If not provided, will automatically try both. (string, optional)
1114
1115
-`per_page`: Results per page (max 50) (number, optional)
1115
-
-`project_number`: The project's number. Required for 'list_project_fields', 'list_project_items', and 'list_project_status_updates' methods. (number, optional)
1116
+
-`project_number`: The project's number. Required for 'list_project_fields', 'list_project_items', 'list_project_views', and 'list_project_status_updates' methods. (number, optional)
1116
1117
-`query`: Filter/query string. For list_projects: filter by title text and state (e.g. "roadmap is:open"). For list_project_items: advanced filtering using GitHub's project filtering syntax. (string, optional)
1117
1118
1118
1119
-**projects_write** - Manage GitHub Projects
1119
1120
-**Required OAuth Scopes**: `project`
1120
1121
-`body`: The body of the status update (markdown). Used for 'create_project_status_update' method. (string, optional)
1121
1122
-`field_name`: The name of the iteration field (e.g. 'Sprint'). Required for 'create_iteration_field' method. (string, optional)
1123
+
-`filter`: Saved view filter; omit on update to preserve it, or pass null to clear it. (string | null, optional)
1122
1124
-`issue_number`: The issue number. Required for 'add_project_item' when item_type is 'issue'. Also accepted by 'update_project_item' to resolve the item by issue number (combine with item_owner and item_repo). (number, optional)
1123
1125
-`item_id`: The project item ID. Required for 'delete_project_item'. For 'update_project_item', provide either item_id, or (item_owner + item_repo + issue_number) to resolve the item by issue. (number, optional)
1124
1126
-`item_owner`: The owner (user or organization) of the repository containing the issue or pull request. Required for 'add_project_item' method. Also accepted by 'update_project_item' when resolving the item by issue number. (string, optional)
@@ -1127,7 +1129,9 @@ The following sets of tools are available:
1127
1129
-`items`: The items to update with the top-level 'updated_field'. Required for 'update_project_items'; prefer it over calling 'update_project_item' in a loop. Each entry must match exactly one reference variant: 'node_id', numeric 'item_id', or 'item_owner' + 'item_repo' + 'issue_number'. Limit: 50 items per call. (object[], optional)
1128
1130
-`iteration_duration`: Duration in days for iterations of the field (e.g. 7 for weekly, 14 for bi-weekly). Required for 'create_iteration_field' method. (number, optional)
1129
1131
-`iterations`: Custom iterations for 'create_iteration_field' method. Only set this when you need iterations with varying durations, breaks between them, or specific titles. Otherwise omit it: GitHub auto-creates three iterations of 'iteration_duration' days starting on 'start_date', which is the right choice for most cases. (object[], optional)
1132
+
-`layout`: View layout; required when creating a view. (string, optional)
1130
1133
-`method`: The method to execute (string, required)
1134
+
-`name`: View name; required when creating a view. (string, optional)
1131
1135
-`owner`: The project owner (user or organization login). The name is not case sensitive. (string, required)
1132
1136
-`owner_type`: Owner type (user or org). Required for 'create_project' method. If not provided for other methods, will be automatically detected. (string, optional)
1133
1137
-`project_number`: The project's number. Required for all methods except 'create_project'. (number, optional)
@@ -1137,6 +1141,9 @@ The following sets of tools are available:
1137
1141
-`target_date`: The target date of the status update in YYYY-MM-DD format. Used for 'create_project_status_update' method. (string, optional)
1138
1142
-`title`: The project title. Required for 'create_project' method. (string, optional)
1139
1143
-`updated_field`: The field/value to apply, using {"id": 123, "value": ...} or {"name": "Status", "value": ...}; null clears the field. Required for 'update_project_item' and 'update_project_items', where one top-level field/value applies to every item in a batch. For 'update_project_item' SINGLE_SELECT fields, the name form accepts option names; the ID form expects an option ID. (object, optional)
1144
+
-`view_id`: Project view node ID for update or delete; must belong to owner/project_number. (string, optional)
1145
+
-`visible_field_names`: Ordered project field names to show on create or replace on update; omit on update to preserve, or pass [] to reset. Mutually exclusive with visible_fields. Roadmap accepts only []. (string[], optional)
1146
+
-`visible_fields`: Ordered project field database IDs to show on create or replace on update; omit on update to preserve, or pass [] to reset. Mutually exclusive with visible_field_names. Roadmap accepts only []. (string[], optional)
1140
1147
1141
1148
</details>
1142
1149
@@ -1278,6 +1285,7 @@ The following sets of tools are available:
1278
1285
1279
1286
-**create_or_update_file** - Create or update file
1280
1287
-**Required OAuth Scopes**: `repo`
1288
+
-`allow_symlink_write`: Set true to update a symbolic link itself; content must be its new target path. (boolean, optional)
1281
1289
-`branch`: Branch to create/update the file in (string, required)
1282
1290
-`content`: Content of the file, exactly as it should appear once written. Do not base64-encode it; this server does that before calling the REST API. (string, required)
1283
1291
-`message`: Commit message (string, required)
@@ -1302,6 +1310,11 @@ The following sets of tools are available:
1302
1310
-`path`: Path to the file to delete (string, required)
-`owner`: Repository owner (username or organization) (string, required)
1316
+
-`repo`: Repository name (string, required)
1317
+
1305
1318
-**fork_repository** - Fork repository
1306
1319
-**Required OAuth Scopes**: `repo`
1307
1320
-`organization`: Organization to fork to (string, optional)
@@ -1601,6 +1614,10 @@ docker run -i --rm \
1601
1614
1602
1615
Lockdown mode limits the content that the server will surface from public repositories. When enabled, the server checks whether the author of each item has push access to the repository. Private repositories are unaffected, and collaborators keep full access to their own content.
1603
1616
1617
+
Lockdown mode is a best-effort content filter intended to reduce the risk of prompt injection from untrusted repository content (issues, pull requests, comments, commits, etc.). It is **not** an authorization boundary: it does not change what the underlying GitHub credential can read or write, and content withheld from a filtered tool response may still be reachable through other tools or direct GitHub API access with the same credential.
1618
+
1619
+
As an intentional exception, content authored by a small set of trusted bot accounts (currently `github-actions[bot]` and `copilot`) is always treated as safe, regardless of push access. This avoids filtering routine automation output (e.g. CI-generated commits or comments) that would otherwise be withheld under lockdown mode.
1620
+
1604
1621
```bash
1605
1622
./github-mcp-server --lockdown-mode
1606
1623
```
@@ -1614,12 +1631,17 @@ docker run -i --rm \
1614
1631
ghcr.io/github/github-mcp-server
1615
1632
```
1616
1633
1634
+
In HTTP mode, this flag (or `GITHUB_LOCKDOWN_MODE`) is an upper bound: the `X-MCP-Lockdown` request header can enable lockdown mode when the operator has not, but it cannot disable lockdown mode the operator has already enabled. See the [Server Configuration Guide](docs/server-configuration.md#lockdown-mode) for details.
1635
+
1617
1636
The behavior of lockdown mode depends on the tool invoked.
1618
1637
1619
1638
Following tools will return an error when the author lacks the push access:
1620
1639
1621
1640
-`issue_read:get`
1622
1641
-`pull_request_read:get`
1642
+
-`pull_request_read:get_diff`
1643
+
-`pull_request_read:get_files`
1644
+
-`pull_request_read:get_commits`
1623
1645
1624
1646
Following tools will filter out content from users lacking the push access:
0 commit comments