
Github Mcp
- 79 installs
- 36 repo stars
- Updated July 14, 2026
- oimiragieo/agent-studio
Helps with ai & agent building tasks.
About
github-mcp is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- github-mcp
- AI & Agent Building
- AI-coding skill
Github Mcp by the numbers
- 79 all-time installs (skills.sh)
- Ranked #5,262 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/oimiragieo/agent-studio --skill github-mcpAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 79 |
|---|---|
| repo stars | ★ 36 |
| Last updated | July 14, 2026 |
| Repository | oimiragieo/agent-studio ↗ |
What it does
Helps with ai & agent building tasks.
Files
Mode: Cognitive/Prompt-Driven — No standalone utility script; use via agent context.
GitHub Skill
Overview
This skill provides access to the official GitHub MCP server with progressive disclosure for optimal context usage.
Context Savings: ~95% reduction
- MCP Mode: ~50,000 tokens always loaded (80+ tools)
- Skill Mode: ~500 tokens metadata + on-demand loading
Requirements
- Docker installed and running
GITHUB_PERSONAL_ACCESS_TOKENenvironment variable set
Toolsets
The server provides 80+ tools across 19 toolsets:
| Toolset | Description |
|---|---|
actions | Workflow management, runs, jobs, artifacts |
code_security | Scanning alerts, code analysis |
discussions | Forum interactions |
gists | Code snippets management |
issues | Issue creation, updates, commenting |
labels | Label management and filtering |
projects | GitHub Projects board management |
pull_requests | PR creation, review, merging |
repos | Code search, commits, releases, branches |
users | User search and management |
orgs | Organization and team management |
notifications | Notification management |
secret_scanning | Secret scanning alerts |
context | Context about the user |
Quick Reference
Use the gh CLI for GitHub operations:
# Get repository info
gh repo view anthropics/claude-code
# List issues
gh issue list --repo anthropics/claude-code
# Search code
gh search code "language:python MCP"
# Create issue
gh issue create --repo me/myrepo --title "Bug" --body "Description"
# List pull requests
gh pr list --repo anthropics/claude-codeCommon Tools (Default Toolsets: 40 tools)
Repository Operations
search_repositories- Search for repositoriescreate_repository- Create a new repositoryfork_repository- Fork a repositorylist_commits- List repository commitsget_commit- Get commit detailsget_file_contents- Get file contents from a repositorycreate_or_update_file- Create or update a filedelete_file- Delete a filepush_files- Push multiple filessearch_code- Search for code across GitHublist_branches- List repository branchescreate_branch- Create a new branchlist_tags- List repository tagsget_tag- Get tag detailslist_releases- List releasesget_latest_release- Get latest releaseget_release_by_tag- Get release by tag
Issue Operations
list_issues- List repository issuesissue_read- Read issue detailsissue_write- Create/update issuesadd_issue_comment- Add a comment to an issuesearch_issues- Search for issueslist_issue_types- List issue types (for organizations)get_label- Get label detailssub_issue_write- Manage sub-issuesassign_copilot_to_issue- Assign Copilot to an issue
Pull Request Operations
list_pull_requests- List repository pull requestspull_request_read- Read PR detailscreate_pull_request- Create a new PRupdate_pull_request- Update a PRupdate_pull_request_branch- Update PR branchmerge_pull_request- Merge a PRsearch_pull_requests- Search for pull requestspull_request_review_write- Create/submit PR reviewsadd_comment_to_pending_review- Add comments to pending reviewrequest_copilot_review- Request Copilot review
User & Team Operations
get_me- Get current authenticated usersearch_users- Search for usersget_teams- Get organization teamsget_team_members- Get team members
Configuration
The skill uses Docker to run the official GitHub MCP server:
- Image:
ghcr.io/github/github-mcp-server - Auth:
GITHUB_PERSONAL_ACCESS_TOKENenvironment variable
Environment Variables
| Variable | Required | Description |
|---|---|---|
GITHUB_PERSONAL_ACCESS_TOKEN | Yes | GitHub PAT for authentication |
GITHUB_HOST | No | For GitHub Enterprise (default: github.com) |
GITHUB_TOOLSETS | No | Comma-separated toolsets to enable |
GITHUB_READ_ONLY | No | Set to 1 for read-only mode |
Limiting Toolsets
When using MCP, configure toolsets via environment variables:
# Only repos and issues
GITHUB_TOOLSETS=repos,issues
# Only pull requests and code security
GITHUB_TOOLSETS=pull_requests,code_securityError Handling
If operations fail:
1. Verify Docker is running: docker ps 2. Check GitHub token is set: echo $GITHUB_PERSONAL_ACCESS_TOKEN 3. Ensure token has required permissions for the operation 4. Use gh auth status to verify authentication
Related
- Official GitHub MCP Server: <https://github.com/github/github-mcp-server>
- GitHub API Documentation: <https://docs.github.com/en/rest>
Memory Protocol (MANDATORY)
Before starting: Read .claude/context/memory/learnings.md
After completing:
- New pattern ->
.claude/context/memory/learnings.md - Issue found ->
.claude/context/memory/issues.md - Decision made ->
.claude/context/memory/decisions.md
ASSUME INTERRUPTION: If it's not in memory, it didn't happen.
Invoke the github-mcp skill and follow it exactly as presented to you
#!/usr/bin/env node
'use strict';
/**
* github-mcp - Post-Execute Hook
* Records execution result and logs completion of GitHub MCP operations.
*/
const { safeParseJSON } = require('../../../lib/utils/safe-json.cjs');
// ─── Result parsing ────────────────────────────────────────────────────────────
function parseResult() {
const raw = process.argv.length > 2 ? process.argv.slice(2).join(' ') : '{}';
try {
return safeParseJSON(raw) || {};
} catch (_err) {
return {};
}
}
// ─── Result assessment ─────────────────────────────────────────────────────────
function assessResult(result) {
const warnings = [];
const payload = result && typeof result === 'object' ? result : {};
// Warn if the operation reported errors
if (payload.error) {
warnings.push(`GitHub MCP reported an error: ${payload.error}`);
}
// Warn if authentication issues detected
if (payload.authError || payload.statusCode === 401 || payload.statusCode === 403) {
warnings.push('GitHub authentication issue detected; verify GITHUB_PERSONAL_ACCESS_TOKEN');
}
// Warn if rate-limited
if (payload.statusCode === 429 || payload.rateLimited) {
warnings.push('GitHub API rate limit reached; consider waiting before retrying');
}
return warnings;
}
// ─── Main ──────────────────────────────────────────────────────────────────────
const result = parseResult();
const warnings = assessResult(result);
console.log('[GITHUB-MCP] Post-execute processing...');
if (warnings.length > 0) {
for (const w of warnings) {
console.warn(`[GITHUB-MCP] Warning: ${w}`);
}
}
console.log('[GITHUB-MCP] Post-processing complete');
process.exit(0);
#!/usr/bin/env node
'use strict';
/**
* github-mcp - Pre-Execute Hook
* Validates prerequisites before the GitHub MCP skill executes.
*
* Checks:
* 1. GITHUB_PERSONAL_ACCESS_TOKEN environment variable is set
* 2. Input context is valid JSON (if provided)
*/
const path = require('node:path');
const { safeParseJSON } = require('../../../lib/utils/safe-json.cjs');
// ─── Input parsing ─────────────────────────────────────────────────────────────
function parseInput() {
const raw = process.argv.length > 2 ? process.argv.slice(2).join(' ') : '{}';
try {
return safeParseJSON(raw) || {};
} catch (_err) {
return {};
}
}
// ─── Validation ────────────────────────────────────────────────────────────────
function validateInput(input) {
const errors = [];
const warnings = [];
// Check GitHub token is available (required for MCP server)
if (!process.env.GITHUB_PERSONAL_ACCESS_TOKEN) {
warnings.push('GITHUB_PERSONAL_ACCESS_TOKEN is not set; GitHub MCP operations may fail');
}
// Validate context shape if provided
if (input && typeof input === 'object') {
// If toolsets are specified, validate they are an array or string
if (input.toolsets !== undefined) {
const ts = input.toolsets;
if (!Array.isArray(ts) && typeof ts !== 'string') {
errors.push('toolsets must be an array or comma-separated string');
}
}
// If readOnly mode is specified, validate it's a boolean
if (input.readOnly !== undefined && typeof input.readOnly !== 'boolean') {
errors.push('readOnly must be a boolean');
}
}
return { errors, warnings };
}
// ─── Main ──────────────────────────────────────────────────────────────────────
const input = parseInput();
const { errors, warnings } = validateInput(input);
console.log('[GITHUB-MCP] Pre-execute validation...');
if (warnings.length > 0) {
for (const w of warnings) {
console.warn(`[GITHUB-MCP] Warning: ${w}`);
}
}
if (errors.length > 0) {
console.error('[GITHUB-MCP] Validation failed:');
for (const e of errors) {
console.error(` - ${e}`);
}
process.exit(1);
}
console.log('[GITHUB-MCP] Validation passed');
process.exit(0);
github-mcp Research Requirements
Generated: 2026-02-28
Skill Description
GitHub API operations - repositories, issues, pull requests, actions, code security, discussions, gists, and more. Use for GitHub-related tasks like managing PRs, issues, searching code, and monitoring workflows.
Research Areas
- Current best practices for github-mcp
- Industry standards and tooling
- Integration patterns
Source References
- To be populated by skill-updater research phase
github-mcp Rules
Purpose
GitHub API operations - repositories, issues, pull requests, actions, code security, discussions, gists, and more. Use for GitHub-related tasks like managing PRs, issues, searching code, and monitoring workflows.
Best Practices
- Use gh CLI for most operations
- Verify authentication before operations
- Check rate limits for bulk operations
Integration Points
See SKILL.md for complete documentation.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "github-mcp Input Schema",
"description": "Input validation schema for github-mcp skill",
"type": "object",
"required": [],
"properties": {},
"additionalProperties": true
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "github-mcp Output Schema",
"description": "Output validation schema for github-mcp skill",
"type": "object",
"required": ["success"],
"properties": {
"success": {
"type": "boolean",
"description": "Whether the skill executed successfully"
},
"result": {
"type": "object",
"description": "The skill execution result",
"additionalProperties": true
},
"error": {
"type": "string",
"description": "Error message if execution failed"
}
},
"additionalProperties": true
}
#!/usr/bin/env node
/**
* Github Mcp - Main Script
* GitHub API operations - repositories, issues, pull requests, actions, code security, discussions, gists, and more. Use for GitHub-related tasks like managing PRs, issues, searching code, and monitoring workflows.
*
* Usage:
* node main.cjs [options]
*
* Options:
* --help Show this help message
*/
const fs = require('fs');
const path = require('path');
// Find project root
function findProjectRoot() {
let dir = __dirname;
while (dir !== path.parse(dir).root) {
if (fs.existsSync(path.join(dir, '.claude'))) {
return dir;
}
dir = path.dirname(dir);
}
return process.cwd();
}
const PROJECT_ROOT = findProjectRoot();
// Parse command line arguments
const args = process.argv.slice(2);
const options = {};
for (let i = 0; i < args.length; i++) {
if (args[i].startsWith('--')) {
const key = args[i].slice(2);
const value = args[i + 1] && !args[i + 1].startsWith('--') ? args[++i] : true;
options[key] = value;
}
}
/**
* Main execution
*/
function main() {
if (options.help) {
console.log(`
Github Mcp - Main Script
Usage:
node main.cjs [options]
Options:
--help Show this help message
`);
process.exit(0);
}
console.log(
'GitHub MCP skill provides in-context guidance; configure GitHub MCP for full functionality. Invoke via the agent; no standalone script.'
);
process.exit(0);
}
main();
github-mcp Implementation Template
Goal
- Define target outcome and acceptance criteria.
TDD
1. Red 2. Green 3. Refactor
Verification
- lint
- format
- targeted tests