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: docs/server-configuration.md
+54-1Lines changed: 54 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ We currently support the following ways in which the GitHub MCP Server can be co
9
9
|---------------|---------------|--------------|
10
10
| Toolsets |`X-MCP-Toolsets` header or `/x/{toolset}` URL |`--toolsets` flag or `GITHUB_TOOLSETS` env var |
11
11
| Individual Tools |`X-MCP-Tools` header |`--tools` flag or `GITHUB_TOOLS` env var |
12
+
| Exclude Tools |`X-MCP-Exclude-Tools` header |`--exclude-tools` flag or `GITHUB_EXCLUDE_TOOLS` env var |
12
13
| Read-Only Mode |`X-MCP-Readonly` header or `/readonly` URL |`--read-only` flag or `GITHUB_READ_ONLY` env var |
13
14
| Dynamic Mode | Not available |`--dynamic-toolsets` flag or `GITHUB_DYNAMIC_TOOLSETS` env var |
14
15
| Lockdown Mode |`X-MCP-Lockdown` header |`--lockdown-mode` flag or `GITHUB_LOCKDOWN_MODE` env var |
@@ -20,10 +21,12 @@ We currently support the following ways in which the GitHub MCP Server can be co
20
21
21
22
## How Configuration Works
22
23
23
-
All configuration options are **composable**: you can combine toolsets, individual tools, dynamic discovery, read-only mode and lockdown mode in any way that suits your workflow.
24
+
All configuration options are **composable**: you can combine toolsets, individual tools, excluded tools, dynamic discovery, read-only mode and lockdown mode in any way that suits your workflow.
24
25
25
26
Note: **read-only** mode acts as a strict security filter that takes precedence over any other configuration, by disabling write tools even when explicitly requested.
26
27
28
+
Note: **excluded tools** takes precedence over toolsets and individual tools — listed tools are always excluded, even if their toolset is enabled or they are explicitly added via `--tools` / `X-MCP-Tools`.
29
+
27
30
---
28
31
29
32
## Configuration Examples
@@ -170,6 +173,56 @@ Enable entire toolsets, then add individual tools from toolsets you don't want f
170
173
171
174
---
172
175
176
+
### Excluding Specific Tools
177
+
178
+
**Best for:** Users who want to enable a broad toolset but need to exclude specific tools for security, compliance, or to prevent undesired behavior.
179
+
180
+
Listed tools are removed regardless of any other configuration — even if their toolset is enabled or they are individually added.
// Add middlewares. Order matters - for example, the error context middleware should be applied last so that it runs FIRST (closest to the handler) to ensure all errors are captured,
107
+
// and any middleware that needs to read or modify the context should be before it.
0 commit comments