---
title: "GitHub MCP server"
description: "How GitHub tools and GitHub's official MCP server differ in how they're called, approved, scoped and hosted, and when to use each or both."
canonical_url: "https://github-tools.com/compare/github-mcp-server"
---
# GitHub MCP server

> How GitHub tools and GitHub's official MCP server differ in how they're called, approved, scoped and hosted, and when to use each or both.

GitHub tools and the [GitHub MCP server](https://github.com/github/github-mcp-server) both let a model call the GitHub API, in different places: GitHub tools is a TypeScript library whose tools run inside your own agent code, and the GitHub MCP server is a server that any [Model Context Protocol](https://modelcontextprotocol.io) client, such as VS Code, Cursor or Claude Desktop, connects to. Pick GitHub tools when you write the agent, and the MCP server when you want GitHub inside an MCP host you already use.

## What each one is

**GitHub tools** (`@github-tools/sdk`) is an npm package. `createGithubTools()` returns 97 AI SDK tools that you pass to `generateText`, `streamText`, an agent, or one of the [integrations](https://github-tools.com/integrations). Each call runs in your process, with the token you give it, and your code decides which writes wait for a person.

**The GitHub MCP server** is maintained by GitHub and written in Go. GitHub hosts a remote version at `https://api.githubcopilot.com/mcp/`, and you can run it yourself from the `ghcr.io/github/github-mcp-server` Docker image or from source. Its tools are grouped into toolsets, such as `repos`, `issues`, `pull_requests` and `actions`, and an MCP client lists them and calls them over the protocol.

<mcp-vs-sdk>



</mcp-vs-sdk>

## Comparison

<table>
<thead>
  <tr>
    <th>
      
    </th>
    
    <th>
      GitHub tools
    </th>
    
    <th>
      GitHub MCP server
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      What you install
    </td>
    
    <td>
      An npm package in your TypeScript app
    </td>
    
    <td>
      Nothing for the remote server. Docker or a Go binary for the local one
    </td>
  </tr>
  
  <tr>
    <td>
      How the model calls it
    </td>
    
    <td>
      As AI SDK tools in your own agent loop
    </td>
    
    <td>
      Through an MCP client, over HTTP, or over stdio for a local server
    </td>
  </tr>
  
  <tr>
    <td>
      Who decides approval
    </td>
    
    <td>
      Your code: every write asks by default, per tool, or a decision model approves routine writes. See <a href="https://github-tools.com/approval">
        Approval
      </a>
    </td>
    
    <td>
      The MCP host. The <a href="https://modelcontextprotocol.io/specification/2025-06-18/server/tools" rel="nofollow">
        MCP specification
      </a>
      
       recommends that hosts let a person deny tool calls
    </td>
  </tr>
  
  <tr>
    <td>
      Scoping
    </td>
    
    <td>
      <a href="https://github-tools.com/presets">
        Presets
      </a>
      
       for one job, single tools, or <code>
        preset: 'auto'
      </code>
    </td>
    
    <td>
      Toolsets and single tools, with <code>
        --toolsets
      </code>
      
       and <code>
        --tools
      </code>
      
      , or per-toolset URLs on the remote server
    </td>
  </tr>
  
  <tr>
    <td>
      Read-only
    </td>
    
    <td>
      A read-only preset such as <code>
        repo-explorer
      </code>
      
      , or a token without write permissions
    </td>
    
    <td>
      <code>
        --read-only
      </code>
      
      , or a <code>
        /readonly
      </code>
      
       URL on the remote server
    </td>
  </tr>
  
  <tr>
    <td>
      Untrusted content
    </td>
    
    <td>
      <code>
        requireApproval: 'auto'
      </code>
      
       asks a person when the user didn't ask for the write
    </td>
    
    <td>
      Lockdown mode hides public-repository content from users without push access
    </td>
  </tr>
  
  <tr>
    <td>
      Output size
    </td>
    
    <td>
      Shaped results, bodies cut to about 500 characters, diffs off by default, paged lists. See <a href="https://github-tools.com/tools#output-size">
        Tools
      </a>
    </td>
    
    <td>
      Set by each server tool
    </td>
  </tr>
  
  <tr>
    <td>
      Durability
    </td>
    
    <td>
      Each tool call can be a <a href="https://github-tools.com/integrations/workflow">
        Vercel Workflow
      </a>
      
       step that retries and resumes
    </td>
    
    <td>
      A request to the server. Retries are up to the client
    </td>
  </tr>
  
  <tr>
    <td>
      Auth
    </td>
    
    <td>
      A token, a function per call, or <a href="https://github-tools.com/auth#vercel-connect">
        Vercel Connect
      </a>
    </td>
    
    <td>
      OAuth, a personal access token, or a GitHub App
    </td>
  </tr>
  
  <tr>
    <td>
      Coverage
    </td>
    
    <td>
      97 operations: repositories, pull requests, issues, reactions, discussions, notifications, commits, gists, Actions, checks, releases, search and security alerts
    </td>
    
    <td>
      Toolsets for areas GitHub tools doesn't cover, including Projects, organizations, users, Copilot and repository governance
    </td>
  </tr>
</tbody>
</table>

## When to pick GitHub tools

- You write the agent in TypeScript, with the AI SDK, eve, TanStack AI, Vercel Workflow or Chat SDK.
- Your code needs to decide which writes ask a person, show the request in your own UI, or let a model approve routine writes.
- The agent runs unattended, in a webhook, a cron job or a durable workflow, where there is no MCP host to confirm a call.
- You want results shaped for a model's context, and context tools such as `getCiFailureContext` that answer a question in one call.

## When to pick the GitHub MCP server

- You want GitHub inside an MCP host you already use, such as VS Code with Copilot, Cursor or Claude Desktop, without writing code.
- Your agent isn't written in TypeScript, or its framework speaks MCP but not the AI SDK.
- You need an area GitHub tools doesn't cover, such as Projects or organization settings.

## Use both

An AI SDK agent can take tools from both. Connect to the remote server with [`@ai-sdk/mcp`](https://ai-sdk.dev/docs/ai-sdk-core/mcp-tools), and spread its tools next to a GitHub tools preset. This agent reads a GitHub Project through the MCP server, read-only, and labels issues with GitHub tools:

```ts [agent.ts]
import { createMCPClient } from '@ai-sdk/mcp'
import { createGithubTools } from '@github-tools/sdk'
import { generateText, stepCountIs } from 'ai'

const projects = await createMCPClient({
  transport: {
    type: 'http',
    url: 'https://api.githubcopilot.com/mcp/x/projects/readonly',
    headers: { Authorization: `Bearer ${process.env.GITHUB_TOKEN}` },
  },
})

try {
  const { text } = await generateText({
    model: 'anthropic/claude-opus-5.5',
    tools: {
      ...await projects.tools(),
      ...createGithubTools({ preset: 'issue-triage' }),
    },
    stopWhen: stepCountIs(10),
    prompt: 'Which issues in the "Next release" project on my-org have no label? Suggest one for each.',
  })
  console.log(text)
}
finally {
  await projects.close()
}
```

The MCP tools run without approval, which is why the URL limits them to reads. The GitHub tools writes, such as `addLabels`, still return approval requests. Give each tool set only the toolsets or preset the job needs, so the model doesn't see two tools for the same operation.

## FAQ

<accordion>
<accordion-item label="Is GitHub tools an MCP server?">

No. It is a library of AI SDK tools that run in your process. It doesn't open a port or speak MCP.

</accordion-item>

<accordion-item label="Can I expose GitHub tools over MCP?">

Not out of the box. You can register its tools in your own MCP server, but approval then depends on your server and the MCP host, not on `requireApproval`.

</accordion-item>

<accordion-item label="Which one uses fewer tokens?">

It depends on the tools you load and what they return. Both let you narrow the tool list: presets in GitHub tools, toolsets in the MCP server. GitHub tools also trims each result, as described in [Tools](https://github-tools.com/tools#output-size).

</accordion-item>

<accordion-item label="Do both work with GitHub Enterprise?">

The GitHub MCP server documents GitHub Enterprise Server and GitHub Enterprise Cloud with data residency. GitHub tools calls `api.github.com`.

</accordion-item>
</accordion>


## Sitemap

See the full [sitemap](https://github-tools.com/sitemap.md) for all pages.
