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
Or use the Codex CLI to add it (see "Add via Codex CLI" section below).
96
-
97
-
## Add via Codex CLI (STDIO)
98
-
99
-
The Codex CLI supports adding STDIO MCP servers with `codex mcp add`. This launches the server command when Codex starts. Remote (streamable HTTP) servers like the hosted GitHub MCP (`url = "https://api.githubcopilot.com/mcp/"`) must currently be added by editing `~/.codex/config.toml` directly (the CLI add flow does not set `url`).
Use this if you prefer a local, self-hosted instance instead of the remote HTTP server, please refer to the [OpenAI documentaiton for configuration](https://developers.openai.com/codex/mcp).
149
42
150
43
## Verification
151
44
@@ -155,8 +48,6 @@ After starting Codex (CLI or IDE):
- Inspect tools: use `/mcp` then expand server details.
213
-
- Manual Docker test:
214
-
```bash
215
-
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
216
-
```
217
-
218
100
## Security Best Practices
219
101
1. Never commit tokens into version control
220
102
2. Prefer environment variables or secret managers
221
103
3. Rotate tokens periodically
222
104
4. Restrict scopes up front; expand only when required
223
105
5. Remove unused PATs from your GitHub account
224
106
225
-
## Important Notes
226
-
227
-
-**npm package deprecation**: The npm package `@modelcontextprotocol/server-github` is deprecated as of April 2025. Use the official Docker image `ghcr.io/github/github-mcp-server` or build from source.
228
-
-**Remote server**: GitHub's hosted MCP server at `https://api.githubcopilot.com/mcp/` is the recommended setup for most users (no Docker needed).
229
-
-**Token security**: Never commit `config.toml` with embedded tokens to version control. Use `.gitignore` and rotate tokens regularly.
230
-
-**CLI help**: Run `codex mcp --help` to see all available MCP management commands.
231
-
-**Configuration sharing**: The `~/.codex/config.toml` file is shared between Codex CLI and IDE extension—configure once, use everywhere.
232
-
-**Advanced features**: See the [main README](../../README.md) for toolsets, read-only mode, and dynamic tool discovery options.
233
-
234
107
## References
235
108
- Remote server URL: `https://api.githubcopilot.com/mcp/`
We intentionally omit OAuth configuration because it requires the experimental RMCP client and is not applicable to the GitHub MCP server in this guide.
0 commit comments