Updated Github
This commit is contained in:
parent
cc8495407f
commit
1a45f95a7c
2 changed files with 15 additions and 31 deletions
|
|
@ -2,6 +2,14 @@
|
||||||
|
|
||||||
MCP Server for the GitHub API, enabling file operations, repository management, and more.
|
MCP Server for the GitHub API, enabling file operations, repository management, and more.
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- **Automatic Branch Creation**: When creating/updating files or pushing changes, branches are automatically created if they don't exist
|
||||||
|
- **Comprehensive Error Handling**: Clear error messages for common issues
|
||||||
|
- **Git History Preservation**: Operations maintain proper Git history without force pushing
|
||||||
|
- **Batch Operations**: Support for both single-file and multi-file operations
|
||||||
|
|
||||||
|
|
||||||
## Tools
|
## Tools
|
||||||
|
|
||||||
1. `create_or_update_file`
|
1. `create_or_update_file`
|
||||||
|
|
@ -96,12 +104,15 @@ MCP Server for the GitHub API, enabling file operations, repository management,
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
1. Create a GitHub Personal Access Token with appropriate permissions:
|
### Personal Access Token
|
||||||
- Go to GitHub Settings > Developer settings > Personal access tokens
|
[Create a GitHub Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with appropriate permissions:
|
||||||
- Create a token with required permissions (e.g., repo, workflow)
|
- Go to [Personal access tokens](https://github.com/settings/tokens) (in GitHub Settings > Developer settings)
|
||||||
|
- Create a token with the `repo` scope ("Full control of private repositories")
|
||||||
|
- Alternatively, if working only with public repositories, select only the `public_repo` scope
|
||||||
- Copy the generated token
|
- Copy the generated token
|
||||||
|
|
||||||
2. To use this with Claude Desktop, add the following to your `claude_desktop_config.json`:
|
### Usage with Claude Desktop
|
||||||
|
To use this with Claude Desktop, add the following to your `claude_desktop_config.json`:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"mcp-server-github": {
|
"mcp-server-github": {
|
||||||
|
|
@ -112,26 +123,3 @@ MCP Server for the GitHub API, enabling file operations, repository management,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
- **Automatic Branch Creation**: When creating/updating files or pushing changes, branches are automatically created if they don't exist
|
|
||||||
- **Comprehensive Error Handling**: Clear error messages for common issues
|
|
||||||
- **Git History Preservation**: Operations maintain proper Git history without force pushing
|
|
||||||
- **Batch Operations**: Support for both single-file and multi-file operations
|
|
||||||
|
|
||||||
## Error Handling
|
|
||||||
|
|
||||||
The server provides detailed error messages for common scenarios:
|
|
||||||
- Branch doesn't exist
|
|
||||||
- File not found
|
|
||||||
- Authentication issues
|
|
||||||
- API rate limiting
|
|
||||||
- Invalid input parameters
|
|
||||||
|
|
||||||
## Limitations
|
|
||||||
|
|
||||||
- Maximum file size limit of 100MB (GitHub limitation)
|
|
||||||
- API rate limits apply based on your GitHub account
|
|
||||||
- Some operations may require specific repository permissions
|
|
||||||
- Binary files must be base64 encoded
|
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,6 @@ if (!GITHUB_PERSONAL_ACCESS_TOKEN) {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GitHub API helper functions
|
|
||||||
|
|
||||||
// Add these helper functions to your existing code
|
|
||||||
|
|
||||||
async function forkRepository(
|
async function forkRepository(
|
||||||
owner: string,
|
owner: string,
|
||||||
repo: string,
|
repo: string,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue