GitHub MCP server in Cline wired into VS Code.
Cline can already write code autonomously inside VS Code. Add the official GitHub MCP Server and it can also open PRs, triage issues, and read workflow runs — all through one remote endpoint, no local install.
The GitHub MCP Server (github/github-mcp-server, 30.6k stars) is GitHub's official bridge between AI agents and the GitHub API: repos, issues, pull requests, and Actions workflows exposed as MCP tools. It ships as a hosted remote server, which means Cline talks to it over HTTP instead of spawning a local process.
This guide covers the exact Cline configuration, how to authenticate with a personal access token, and what to check when the server shows up red in the MCP panel.
Why pair GitHub with Cline specifically
Cline is an autonomous agent, not an autocomplete — it plans multi-step tasks and executes them. That makes GitHub tooling unusually valuable: a single prompt like "find the open issues labeled bug in this repo and draft fixes as a PR" needs issue search, branch creation, and PR creation, and the GitHub MCP Server provides all three as callable tools.
Because the server is remote, there is nothing to install or keep updated on your machine. You can see the server's probed tool list on its live Loomal listing at https://loomal.ai/marketplace/github before you wire it up.
Add the server in cline_mcp_settings.json
Open the Cline panel in VS Code, click MCP Servers, then Configure. This opens cline_mcp_settings.json for editing — let Cline open it rather than hunting for the file yourself, because it lives deep inside VS Code's globalStorage (saoudrizwan.claude-dev/settings/cline_mcp_settings.json) and the path is easy to get wrong by hand.
Add the GitHub entry under mcpServers, pointing at the official remote endpoint with your token in the Authorization header:
{
"mcpServers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "Bearer ghp_YOUR_GITHUB_PAT"
},
"disabled": false,
"autoApprove": []
}
}
}Scope the personal access token deliberately
Create the token at github.com/settings/tokens. A fine-grained PAT limited to the repositories Cline will actually touch is the right call here — Cline acts autonomously, so the token's scope is your real permission boundary. Grant read/write on contents, issues, and pull requests only if you want the agent doing those things.
Leave autoApprove empty at first. Cline will then ask before each GitHub tool call, which lets you watch what the agent is doing with your token before you loosen the reins.
Verify the connection
Back in the Cline panel's MCP Servers tab, the github row should show a green status and expand to list its tools (search_issues, create_pull_request, and the rest). Then test it in chat: ask Cline to list the open PRs on one of your repos. If it calls a github tool and returns real data, you're done.
Troubleshooting in Cline
Red status row: click it — Cline surfaces the server's error message inline, which usually names the problem. A 401 means the PAT is wrong, expired, or missing the Bearer prefix in the header value.
Server missing entirely: that's almost always malformed JSON in cline_mcp_settings.json — a trailing comma or unescaped quote. Fix the syntax, then use the Restart button on the server row or run Developer: Reload Window so the extension re-reads the file.
Tools listed but calls failing on a specific repo: your fine-grained PAT probably doesn't include that repository. Edit the token's repository access on GitHub; no Cline-side change is needed.
FAQ
How do I install the GitHub MCP server in Cline?
Open the Cline panel, go to MCP Servers, and click Configure to open cline_mcp_settings.json. Add a github entry with the remote URL https://api.githubcopilot.com/mcp/ and an Authorization header carrying your PAT, then save. Cline picks the server up and shows it in the MCP Servers tab.
Where does Cline keep its MCP configuration?
In cline_mcp_settings.json inside VS Code's globalStorage directory (saoudrizwan.claude-dev/settings/). The path varies by OS and is awkward to locate manually, so use the Configure button in Cline's MCP Servers tab — it opens the right file every time.
Do I need Docker or npx for this server?
No. GitHub's MCP server is hosted remotely at api.githubcopilot.com/mcp/, so Cline connects over HTTP. A local Docker image exists if you prefer self-hosting, but the remote endpoint is the simpler path and gets updates automatically.
Why does the server show an error after I edited the config?
Check the JSON first — trailing commas are the most common breakage. If the syntax is valid, expand the server row to read the actual error: 401 points to the token, while a connection error suggests a typo in the URL. Reload the VS Code window after fixing.
Find more MCP servers for Cline.
Browse live listings with probed tool lists on the Loomal marketplace.