Back to Documentation

API Reference

Complete reference for all tools available in the GitHub MCP Server

Repository Tools

github_repository_info

Get information about a GitHub repository

Parameters:

owner: (Required) Repository owner

repo: (Required) Repository name

Response:

{
  "content": [
    {
      "type": "text",
      "text": "Repository: owner/repo\nDescription: Repository description\nStars: 1250\nForks: 320\nDefault Branch: main\nURL: https://github.com/owner/repo"
    }
  ]
}

github_directory_structure

Get the directory structure of a GitHub repository

Parameters:

owner: (Required) Repository owner

repo: (Required) Repository name

path: (Optional) Directory path (defaults to root)

branch: (Optional) Branch name (defaults to main branch)

Response:

{
  "content": [
    {
      "type": "text",
      "text": "📁 src\n📁 docs\n📁 examples\n📄 README.md\n📄 package.json\n📄 tsconfig.json"
    }
  ]
}

github_read_file

Read a file from a GitHub repository

Parameters:

owner: (Required) Repository owner

repo: (Required) Repository name

path: (Required) File path

branch: (Optional) Branch name (defaults to main branch)

Response:

{
  "content": [
    {
      "type": "text",
      "text": "# File content will appear here\n\nThis is the content of the requested file from the GitHub repository."
    }
  ]
}

github_list_branches

List branches in a GitHub repository

Parameters:

owner: (Required) Repository owner

repo: (Required) Repository name

Response:

{
  "content": [
    {
      "type": "text",
      "text": "main\ndevelop\nfeature/new-api\nbugfix/issue-42"
    }
  ]
}

Issue Tools

github_list_issues

List issues in a GitHub repository

Parameters:

owner: (Required) Repository owner

repo: (Required) Repository name

state: (Optional) Issue state (open, closed, or all, defaults to open)

Response:

{
  "content": [
    {
      "type": "text",
      "text": "#42: Add support for GitHub Projects API v2 (open)\n#37: Improve error handling in MCP server (open)\n#28: Add documentation for SSE transport (closed)"
    }
  ]
}

github_create_issue

Create a new issue in a GitHub repository

Parameters:

owner: (Required) Repository owner

repo: (Required) Repository name

title: (Required) Issue title

body: (Required) Issue body

labels: (Optional) Issue labels

assignees: (Optional) Issue assignees

Response:

{
  "content": [
    {
      "type": "text",
      "text": "Issue created: #43 - Add support for GitHub Actions\nURL: https://github.com/owner/repo/issues/43"
    }
  ]
}

Project Tools

github_list_projects

List GitHub projects

Parameters:

owner: (Required) Repository owner

repo: (Optional) Repository name (optional for organization projects)

Response:

{
  "content": [
    {
      "type": "text",
      "text": "1: MCP Development (open)\n2: Documentation Improvements (open)\n3: Q2 2025 Roadmap (open)"
    }
  ]
}

github_create_project

Create a new GitHub project

Parameters:

owner: (Required) Repository owner or organization

name: (Required) Project name

body: (Required) Project description

repo: (Optional) Repository name (optional for organization projects)

Response:

{
  "content": [
    {
      "type": "text",
      "text": "Project created: 4 - New Feature Development\nURL: https://github.com/owner/repo/projects/4"
    }
  ]
}