# Server Configuration Guide This guide helps you choose the right configuration for your use case and shows you how to apply it. For the complete reference of available toolsets and tools, see the [README](../README.md#tool-configuration). ## Quick Reference We currently support the following ways in which the GitHub MCP Server can be configured: | Configuration | Remote Server | Local Server | |---------------|---------------|--------------| | Toolsets | `X-MCP-Toolsets` header or `/x/{toolset}` URL | `--toolsets` flag or `GITHUB_TOOLSETS` env var | | Individual Tools | `X-MCP-Tools` header | `--tools` flag or `GITHUB_TOOLS` env var | | Read-Only Mode | `X-MCP-Readonly` header or `/readonly` URL | `--read-only` flag or `GITHUB_READ_ONLY` env var | | Dynamic Mode | Not available | `--dynamic-toolsets` flag or `GITHUB_DYNAMIC_TOOLSETS` env var | | Lockdown Mode | `X-MCP-Lockdown` header | `--lockdown-mode` flag or `GITHUB_LOCKDOWN_MODE` env var | > **Default behavior:** If you don't specify any configuration, the server uses the **default toolsets**: `context`, `issues`, `pull_requests`, `repos`, `users`. --- ## How Configuration Works 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. 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. --- ## Configuration Examples The examples below use VS Code configuration format to illustrate the concepts. If you're using a different MCP host (Cursor, Claude Desktop, JetBrains, etc.), your configuration might need to look slightly different. See [installation guides](./installation-guides) for host-specific setup. ### Enabling Specific Tools **Best for:** users who know exactly what they need and want to optimize context usage by loading only the tools they will use. **Example:**
| Remote Server | Local Server |
|---|---|
| ```json { "type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { "X-MCP-Tools": "get_file_contents,get_me,pull_request_read" } } ``` | ```json { "type": "stdio", "command": "go", "args": [ "run", "./cmd/github-mcp-server", "stdio", "--tools=get_file_contents,get_me,pull_request_read" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}" } } ``` |
| Remote Server | Local Server |
|---|---|
| ```json { "type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { "X-MCP-Toolsets": "issues,pull_requests" } } ``` | ```json { "type": "stdio", "command": "go", "args": [ "run", "./cmd/github-mcp-server", "stdio", "--toolsets=issues,pull_requests" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}" } } ``` |
| Remote Server | Local Server |
|---|---|
| ```json { "type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { "X-MCP-Toolsets": "repos,issues", "X-MCP-Tools": "get_gist,pull_request_read" } } ``` | ```json { "type": "stdio", "command": "go", "args": [ "run", "./cmd/github-mcp-server", "stdio", "--toolsets=repos,issues", "--tools=get_gist,pull_request_read" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}" } } ``` |
| Remote Server | Local Server |
|---|---|
| **Option A: Header** ```json { "type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { "X-MCP-Toolsets": "issues,repos,pull_requests", "X-MCP-Readonly": "true" } } ``` **Option B: URL path** ```json { "type": "http", "url": "https://api.githubcopilot.com/mcp/x/all/readonly" } ``` | ```json { "type": "stdio", "command": "go", "args": [ "run", "./cmd/github-mcp-server", "stdio", "--toolsets=issues,repos,pull_requests", "--read-only" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}" } } ``` |
| Local Server Only |
|---|
| ```json { "type": "stdio", "command": "go", "args": [ "run", "./cmd/github-mcp-server", "stdio", "--dynamic-toolsets" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}" } } ``` **With some tools pre-enabled:** ```json { "type": "stdio", "command": "go", "args": [ "run", "./cmd/github-mcp-server", "stdio", "--dynamic-toolsets", "--tools=get_me,search_code" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}" } } ``` |
| Remote Server | Local Server |
|---|---|
| ```json { "type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { "X-MCP-Lockdown": "true" } } ``` | ```json { "type": "stdio", "command": "go", "args": [ "run", "./cmd/github-mcp-server", "stdio", "--lockdown-mode" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}" } } ``` |