Skip to content
Gustavo Peixoto

Dec 4, 202614 min read

GitHub's official MCP server lets an AI client read and act on repositories, issues, pull requests and Actions, much as a workflow tool like Activepieces acts on whatever accounts you connect to it. You should treat the token you give it as a write-capable credential, not a read-only convenience.

Here's the failure that makes that matter. An agent is asked to "tidy up the open issues," and it does: closes some, comments on others, opens a branch. Nothing errored. The token allowed every one of those calls, so the server made them.

A list of open issues on a repository page, some with closed checkmarks, some with comment bubbles, and a new branch line…

GitHub MCP Server Is GitHub's Official AI Connector

What MCP is in one paragraph

MCP, the Model Context Protocol, is an open standard for how an AI client discovers and calls tools exposed by another program.

The client asks a server what it offers, the server lists named tools with typed inputs, and the model picks one and the client sends the call.

The protocol standardizes only the plumbing. It doesn't say whether a call is wise, who authorized it, or whether the text the model read was an instruction you meant it to follow.

What GitHub says the server does

GitHub maintains the server in the open-source repository github/github-mcp-server. Its documented purpose is to connect AI tools to GitHub so they can:

  • read repository contents
  • manage issues and pull requests
  • work with Actions workflows

Tools are grouped into toolsets, which means you can enable only the areas you need.

Before you rely on any of this, verify tool names, toolsets and authentication options against github/github-mcp-server and GitHub's docs.

This is based on the repository README and GitHub's documentation as of December 2026, and both change.

This takes minutes, not a project: automate it in Activepieces free.

GitHub MCP server's internal workings

You either use the GitHub MCP server as a service GitHub hosts or run it yourself; it is one project, github/github-mcp-server, either way. That choice decides where your token lives and who patches the server.

The takeaway from the table is that the tool surface is the same and the real difference is operational: who runs the process and where the credential sits.

Remote hosted server Local server
Setup effort Add a URL to your client's config Run the server as a Docker container or built binary
Where the token lives Authorized through your client (OAuth or a personal access token) In an environment variable on your machine
Available features Toolsets and read-only mode, set through headers Toolsets and read-only mode, set through flags
Who maintains it GitHub hosts and updates it GitHub writes the code; you run and update it

Two setups side by side: a hosted server cloud joined by one URL cable to a client; and a Docker container box plus a…

If you use Claude, VS Code with Copilot or Cursor, each takes a config entry pointing at the hosted URL.

The cost is that the credential passes through your client's auth flow, so you're trusting that client to hold it properly.

The same clients can instead launch the server as a command. The token sits in GITHUB_PERSONAL_ACCESS_TOKEN in your environment, which means it also sits in whatever shell config or client file defines it.

A laptop shell config file open as a text card with a key tag tucked inside, next to a client config file also holding a…

Toolsets and read-only mode

Turning on every toolset costs 22,524 tokens of tool definitions, according to Nodeflare, loaded before you type a prompt.

1,726 tokens is what a five-tool set costs, roughly 13 times less, which leaves that context for the actual work and gives the model fewer wrong tools to pick from.

Context cost of GitHub MCP tool definitions by setup

Read-only mode removes the tools that change a repository. Start there, and add write tools one at a time.

What the GitHub MCP Server Requires and Costs

The server needs a GitHub credential, either OAuth or a personal access token (PAT). No price is documented for the server itself; the Copilot plan prices below apply only if Copilot is your client.

GitHub MCP server authentication and token scopes

The simplest way in is a PAT, and it is also the riskiest. A classic token grants broad scopes, while a fine-grained token lets you pick specific repositories and permissions.

Use the fine-grained kind, grant read-only first, and widen it only when you add a write toolset.

With OAuth the grant shifts to a consent screen, but the client still holds a credential that can write, so the same scoping applies.

Plan, policy and organisation requirements

Copilot costs $0 on Free, $10 a month on Pro, $19 on Business and $39 on Enterprise, per GitHub Docs.

Ask your organisation owner before you roll it out, because whether organisation policy can block the server for your members is unverified.

GitHub MCP server rate limits by authentication type

Read the table for your hourly budget: authentication type decides it, and the app token expires after an hour on its own.

Authentication REST rate limit per hour Token lifetime Source Check date
Unauthenticated 60 No token GitHub Docs 2026-12-04
PAT 5,000 1–366 days, or none GitHub Docs 2026-12-04
GitHub App token 5,000 1 hour GitHub Docs 2026-12-04

GitHub API hourly rate limits by authentication type

At 60 requests an hour, an unauthenticated agent stalls within a few tool calls, which means multi-step workflows fail to complete. At 5,000, a PAT or app token is enough for most interactive sessions.

An app installed on Enterprise Cloud gets 15,000 an hour, which suits automation more than a person with a chat window.

Set an expiry, because a PAT with no expiry is a write-capable credential that never rotates.

Team use cases for GitHub MCP server

Teams mostly use it for the reading-heavy chores around a repository: triaging issues, summarizing and reviewing pull requests, searching code, and working out why an Actions run failed. They run it from Claude, Cursor or VS Code.

Issue and pull request work

Triage is the most common use. The client lists open issues, reads the thread, and proposes labels or a reply. For pull requests, it reads the diff and the review comments and writes a summary or a first-pass review.

Reading needs only read scopes. Creating an issue, commenting, or opening a pull request needs write access, and that's where your approval step applies.

Code reading and Actions debugging

When you want to know "where is this called," code search and file reads answer it without a local clone. For CI, enable the Actions toolset and the client can pull workflow runs and job logs, so you paste nothing.

What the server does not expose

Only the toolsets you turn on reach the model, and the token's scopes cap what those tools can do. A tool outside an enabled toolset is simply not in the model's list, which is the control you want.

This is a remote API session, not your machine. It doesn't see your uncommitted local changes or run your tests, and it doesn't replace the git CLI in your terminal.

You can follow the rest of this with the builder open. Start free, no card.

The strongest case against AI write access

The objection is serious: a model that can write to GitHub can be steered by any text it reads, and the server can't tell your instructions from an attacker's.

Prompt injection risk in GitHub MCP server

Picture the failure as a tool call you never asked for: create_pull_request against a private repo, triggered by an issue you never wrote. The client is reading a public issue to help you triage it.

Buried in the issue body, maybe in an HTML comment you won't see rendered, is a line telling the assistant to open the private repository and copy something out.

The model has no reliable way to separate "content to summarize" from "instruction to follow," because both arrive as text in the same context.

The sharpest version of the argument is that the server is doing nothing wrong. It exposes tools, the token authorizes them, and the call is valid.

The model has no reliable way to separate "content to summarize" from "instruction to follow," because both arrive as text in the same context.

The hole is in the client's judgment, and no server-side check fixes that. A token that can read private repos and write to public ones turns one poisoned issue into a data path.

Why scoped access still holds up

The objection is strongest against a broad token and an unattended client, and each part of that is something you control. Four settings shrink the exposure:

  • Read-only mode, which removes the write tools from the client entirely, so there's nothing for an injected instruction to call.
  • A fine-grained token limited to the repositories the task needs, so a hijacked call can't reach the private repo at all.
  • A limited set of toolsets, so the client only sees issue tools when it's triaging issues.
  • Approval on every call that changes a repository, so a person reads the destination and the payload before it runs.

Together these turn "the model was fooled" into "the model was fooled and had nothing useful to do with it."

Residual risk remains. Approval fatigue is real: a person clicking through twenty prompts stops reading them.

Read-only access can still leak what it reads into a reply you then paste somewhere. MCP doesn't solve either problem today, so the defaults above reduce the damage rather than remove the attack.

Common GitHub MCP Mistakes and the Monday Setup

Because the attack stays open, the mistakes that hurt are the ones that hand it more reach than it needs, and each has a fix that costs a few minutes.

  • A broad classic token reaches every repository you can touch, so swap it for a fine-grained token limited to the repos the task needs.
  • With every toolset on, the model sees tools for issues, workflows and settings it will never need. Enable only the toolsets the job calls for, and start read-only.
  • Auto-approving calls removes the one checkpoint between an injected instruction and a push. Keep approval on for anything that writes, and only auto-approve reads.
  • A token pasted into a committed config file ends up in git history, and public MCP configs are already being scraped for secrets (24,008 were found). Load it from an environment variable or secret store, and rotate any token that has ever been committed.
  • Mixing public and private repos in one session lets a malicious public issue steer a call that reads private code. Keep separate tokens and separate sessions for each.
  1. Revoke the classic token and create a fine-grained one scoped to named repositories.
  2. Set the toolsets explicitly and turn on read-only mode.
  3. Move the token out of any file in a repo and into an environment variable.
  4. Turn off auto-approve for every write tool in your client.
  5. Check that no session mixes public and private repositories.

When a multi-app MCP gateway fits

If your agent also needs Slack, a ticket tracker or a database, running a separate server per app means a separate token on each laptop. A gateway that fronts several apps keeps those credentials in one place, which helps when you have to rotate them.

A gateway adds one more component to trust and doesn't remove the need for scoped tokens and human approval. For GitHub alone, the official server is simpler.

What Activepieces does about this

Activepieces doesn't replace the official server for repository work. What it addresses is the part of the problem that grows once an agent needs more than GitHub: a write-capable token on every laptop.

Each integration you connect in a project is served as a tool on that project's own MCP server, so Claude, ChatGPT, Cursor or an agent you built can call it, and the credential is held in the project instead of in each client's config file.

Activepieces MCP Server setup page with client configuration instructions and code example.

That helps with the mistakes listed above. A fine-grained token limited to named repositories gets created once, stored in one place, and rotated there, instead of being pasted into several environment variables and client files.

The tool is the same action that runs as a step in a flow, so nothing is published or wired up a second time.

You can check the claim yourself. The repository is MIT-licensed, the integrations live in packages/integrations, and that directory counts 751 of them. The mechanism is documented under the Integrations Framework and MCP Server pages.

The Activepieces MCP Server configuration interface with setup instructions for Claude, Cursor, Windsurf and other clients.

Because the code is open, you can read what a tool does before you hand it a token.

The limits are worth stating plainly. Its GitHub action set is narrower than GitHub's own server, so it suits flows that cross apps, such as a new issue that should also reach Slack or a ticket tracker.

For work inside a repository, use the official server. A gateway also doesn't remove the need to scope the token, limit what's enabled, or have a person approve what changes a repository.

It only keeps the credential in one place, so those controls are easier to apply and to revoke.

Frequently asked questions

Is the GitHub MCP server free to use?

Yes, the server itself costs nothing: it's open source and you can run it without paying GitHub for it.

What you still pay for is everything around it, meaning the AI client you connect it to and whatever plan your GitHub account or organization is on.

When it makes API calls, they count against your account's normal GitHub rate limits, so a chatty agent can run into those. Source and docs are in the github/github-mcp-server repository.

Does the GitHub MCP server work with GitHub Enterprise Server?

Yes, through the local server, which you point at your own GitHub host with a configuration setting instead of the default github.com. Don't assume the hosted remote server does the same job for a self-hosted instance.

If your code lives on Enterprise Server, plan on running the server yourself, and check the repository README for the exact host setting before you rely on it.

Can I use it with ChatGPT or Claude Desktop?

Claude Desktop, yes: it runs local servers, so the usual setup is the local server started from its config file with a token you supply. ChatGPT is the harder one, because it connects to remote servers over HTTP, not to a process on your laptop.

The hosted remote server is the realistic path there, and the available connection options depend on your ChatGPT plan. Whichever client you pick, the token it holds can write to repositories, so scope it before you paste it in.

Is the remote or local server better for a team?

The remote server is easier for most teams, because nobody has to install or update anything and authorization can go through OAuth instead of a long-lived token on each machine.

The local server earns its place when you need your own host, such as Enterprise Server, or tighter control over what runs where.

Either way, the controls from earlier in this article apply: limited toolsets, a narrow token, and a human approving anything that changes a repository.

Share

Build it

Set this up in minutes.

No code required. Connect your accounts, and Activepieces runs it from there.

Start free Talk to sales