The one question before you touch a config file
If you are reading this because you want your AI coding assistant to read, write, and manage pull requests in your GitHub repositories, the first decision is not which client to use. It is whether you run the MCP server yourself or let GitHub host it for you.
Both paths connect a repository to an MCP client. They differ in what you maintain, what you trade away, and which failures show up first.
What MCP actually buys you here
Model Context Protocol is an open standard that lets an LLM call external tools through a shared interface. In practice, an MCP server exposes actions like “list open issues”, “create a pull request”, or “read the latest commit history”. Your coding assistant calls those actions instead of asking you to copy-paste commands.
For indie developers and solo founders, the win is time. You stop narrating repository state into a chat and start letting the assistant act on it. That shift is what separates a clever demo from a daily workflow.
Two ways to connect GitHub to your MCP client
Option A: GitHub’s hosted MCP endpoint
GitHub publishes a managed MCP server that authenticates through OAuth. You sign in once, the platform handles token scopes, and the server receives automatic patches and upgrades. VS Code includes a built-in command: > GitHub MCP: Install Remote Server. After the OAuth flow completes, you restart and the tools appear in chat.
What this removes: Docker maintenance, token rotation, manual upgrade cadence, and the need to keep a local container alive.
What you give up: You must have an active GitHub Copilot or Copilot Enterprise seat. The server is reachable from any IDE or remote dev box as long as your network can reach the hosted endpoint. If you need a fully air-gapped environment, this path is not available.
Option B: Self-host the open-source server
The official GitHub MCP server repository is open source. You can run it locally via Docker, expose it, and manage your own personal access tokens. This gives you full control over updates, permissions, and network boundaries.
What this removes: The dependency on a Copilot seat. You control exactly which scopes are granted and when tokens rotate.
What you take on: You maintain the image, apply upgrades manually, and handle token lifecycle. If the container crashes, your assistant loses repository access until you revive it.
The permission model: where most connections break
Authentication is rarely the hard part. Scoping is.
A common failure mode is connecting the server with write permissions when the workflow only needs read access. Another is granting broad repository access and then wondering why the assistant proposes dangerous PRs. The hosted endpoint includes a built-in read-only switch and per-toolset flags. Self-hosting requires you to configure those boundaries yourself.
Start narrow. Enable the tools your assistant actually needs for the task at hand, then expand only when a new workflow demands it. This reduces both accidental mutations and the noise your assistant produces.
How to choose: a quick decision checklist
Use hosted if:
- You already pay for Copilot or Copilot Enterprise.
- You want the connection working today without managing infrastructure.
- Your primary pain point is setup friction and token maintenance.
Self-host if:
- You need access without a Copilot seat.
- You are operating in a restricted network or require auditability over every update.
- You prefer to control the exact image version and timing of upgrades.
Most indie developers land on hosted because the alternative is a small but real ops burden. If your bottleneck is shipping features, not running containers, the hosted path is the faster route to useful automation.
Step-by-step: connecting the hosted server in VS Code
- Open the command palette and run
> GitHub MCP: Install Remote Server. - Complete the OAuth sign-in flow. This authorizes the server to act on your behalf within the granted scopes.
- Restart the server when prompted.
- Open a repository and test with a simple prompt such as “show recent commits” or “list open issues labeled bug”. If the assistant returns results, the connection is live.
If you encounter an authentication error, the cause is almost always an expired token or a scope mismatch, not a protocol problem. Re-run the install command and let the OAuth flow refresh the credentials.
Where self-hosting actually makes sense
Self-hosting is not a fallback; it is a deliberate choice for specific constraints. It matters when you need a private deployment, when regulatory requirements dictate where authentication data lives, or when you want to expose the same MCP interface to multiple tools without paying per-seat licensing.
A growing number of developers also build lightweight remote wrappers using serverless functions and API gateways. This preserves the hosted experience while routing through your own account. The trade-off is that you become responsible for uptime and secrets management, which re-introduces the very pain the hosted endpoint was designed to eliminate.
Three mistakes that waste the most time
Granting too much too early. Write access is tempting. It feels powerful. It also makes debugging permission errors expensive because the assistant can mutate state you did not expect. Start with read-only, confirm the workflow, then promote access.
Ignoring toolset flags. Many MCP servers ship with dozens of tools. Most developers only need ten. Disable the rest. Fewer tools mean fewer confusion points and a cleaner context window for the assistant.
Assuming the connection is stable after the first install. MCP endpoints rotate versions. Clients update independently. When your assistant suddenly cannot reach a repository, check the server logs before you blame the protocol. In most cases, the fix is a restart or a scope refresh, not a rebuild.
When MCP is the right tool for repository access
MCP is worth adopting when your assistant repeatedly needs the same repository actions: triaging issues, reviewing PRs, reading logs, creating branches, or posting status updates. If you find yourself copying the same commands into a chat every week, an MCP connection pays for itself in saved minutes.
It is not worth adopting when repository access is occasional or exploratory. The configuration overhead outweighs the time savings for rare use cases. In those situations, a direct CLI or the platform’s native interface remains simpler.
FAQ
Do I need Copilot to use the GitHub MCP server? The hosted endpoint requires an active Copilot or Copilot Enterprise seat. The self-hosted open-source variant does not.
Can I connect the same GitHub account to multiple clients? Yes. The OAuth flow authorizes the server, not a single editor. You can use the connection from VS Code, Cursor, Windsurf, or other MCP-capable tools, provided each client trusts the same server endpoint.
What happens if I revoke a token while the server is running? The next tool invocation will fail with an authentication error. Restart the server or re-run the OAuth flow to refresh credentials.
Is the hosted endpoint suitable for production repositories? It is suitable for any repository where you are comfortable granting the chosen scopes. Review the permissions before connecting a repo that contains sensitive data, and prefer read-only modes when possible.







