# GitHub Gists AI Agent Connect

> GitHub Gists MCP lets your AI client interact with your GitHub Gists. You can browse public snippets without any setup, or provide a GitHub token to let your agent create, edit, fork, and delete Gists on your own account. It turns your agent into a specialized tool for managing code fragments, configuration files, and scripts.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_5xj49hpb9hCS2AB5WT3ylyHhX3oQwXbqr007WQSr/ai-agent-connect
- **Tags:** github, gists, code-snippets, code-sharing, version-control, scripts, developer-tools

## Description

You can now treat GitHub Gists as a native part of your AI agent's workspace. Instead of manually copying and pasting code, you can tell your agent to find a specific snippet, read a configuration file, or publish a new script directly to your GitHub account. If you just need to grab something public, you don't even need to provide credentials. If you want to manage your own private snippets, just add a GitHub token. This MCP handles the heavy lifting, including streaming large files over 1 MB and providing clear retry hints if you hit GitHub's rate limits. Whether you are pulling a Docker compose file to inspect it or forking a teammate's snippet to make your own version, your agent handles the API calls while you focus on the code.

## Tools

### fork_gist
This tool creates a copy of a Gist in your own account. Use it to modify someone else's code without changing the original.

### create_gist
This tool publishes new Gists to GitHub. You can send one or multiple files and choose to keep them secret or make them public.

### delete_gist
This tool permanently removes a Gist and all its files. It requires a token and you should confirm before your agent runs it.

### get_gist
This tool fetches a specific Gist and its contents. Public Gists are accessible without a token, but private ones require authentication.

### list_user_gists
This tool retrieves a list of Gists belonging to a specific GitHub user. Providing a token allows your agent to see private Gists as well.

### get_gist_file
This tool reads a single file from a Gist as plain text. It handles large files by streaming them from their raw URL.

### list_public_gists
This tool lets your agent browse recently updated public Gists across all of GitHub without needing any credentials.

### update_gist
This tool modifies an existing Gist. You can use it to change the description, toggle visibility, or update file contents.

## Prompt Examples

**Prompt:** 
```
List the most recently updated public Gists and tell me what each one is about.
```

**Response:** 
```
I listed the 10 most recently updated public Gists. They include a CI pipeline tweak, a Docker compose snippet, a SQL migration and a few Python utilities. The top ones: owner-a/abc (Kubernetes config, updated today) and owner-b/def (bash deploy script). Want me to open any of them in full?
```

**Prompt:** 
```
Create a private Gist from this bash script with the description "deploy helper".
```

**Response:** 
```
I created a secret Gist "deploy helper" with your script (2.1 KB, deploy.sh). It is not public. You can make it public or add more files with update_gist whenever you like.
```

**Prompt:** 
```
Fork this Gist so I can edit my own copy without touching the original.
```

**Response:** 
```
I forked the Gist to your account (new id ...). It has 4 files: main.py, config.json, README.md and test_main.py. You can now edit your copy, the original stays unchanged.
```

## Capabilities

### Public Discovery
Your agent can browse and read public Gists without any GitHub credentials.

### Private Management
With a GitHub token, your agent can access and edit your private Gists.

### File Streaming
The MCP streams files larger than 1 MB directly from their raw URLs to your agent.

### Content Modification
Your agent can update descriptions, change visibility, or wipe file contents in a single call.

### Version Control Lite
You can fork existing Gists to create independent copies for your own use.

## Use Cases

### Snippet Management
Ask your agent to save a new Python function as a secret Gist for later use.

### Config Inspection
Have your agent read a specific YAML config file from a public Gist to verify settings.

### Code Iteration
Fork a public bash script to your own account so you can modify it safely.

### Rapid Deployment
Use your agent to publish a new deployment script to GitHub in seconds.

## Benefits

- Read public code snippets without setting up GitHub credentials.
- Manage private Gists using a single GitHub token.
- Handle large files through automated raw URL streaming.
- Get clear retry hints when hitting GitHub rate limits.

## How It Works

Setting up this MCP takes seconds and works with any compatible client.

1. Subscribe to the GitHub Gists MCP on Vinkius.
2. Provide a GitHub token if you need to manage private Gists or write data.
3. Connect your preferred client like Claude, Cursor, or Windsurf.
4. Ask your agent to find, read, or publish Gists using natural language.

## Frequently Asked Questions

**Do I need a GitHub token to use this MCP?**
No, you can use it keyless to read public Gists. You only need a token to access private Gists or to create, edit, and delete Gists.

**What is the rate limit for keyless requests?**
Without a token, you are limited to about 60 requests per hour per IP. With a token, you get an authenticated budget of about 5000 requests per hour.

**Can my agent create public Gists?**
Yes, when using the create tool, you can set the visibility to public.

**How does the MCP handle large files?**
For files larger than 1 MB, the MCP streams the content directly from the raw GitHub URL to ensure your agent receives the full file.

**Is deleting a Gist permanent?**
Yes, deleting a Gist is irreversible. The agent should confirm with you before executing a delete command.

**Do I need a GitHub token to use this?**
No. Public Gists can be listed, read and opened as files without any credential. A token is only required for your private Gists and for write operations (create, update, fork, delete).

**What permissions does the token need?**
Only the "gist" permission — a classic personal access token with gist scope, or a fine-grained token with access to Gists. No repo access is required. Create the token under Settings > Developer settings > Personal access tokens.

**Can I read large Gist files in full?**
Yes. The Gist payload includes up to 1 MB of content per file; get_gist_file transparently downloads larger files in full from their raw URL. For Gists whose files exceed 10 MB, clone them with the git URL (git_pull_url) returned by get_gist.

**How does rate limiting work?**
Keyless (public reads) is limited to about 60 requests/hour per IP; with a token the budget is about 5000 requests/hour. When a limit is hit the tool returns a clear error with the time to wait and when the budget resets, instead of failing silently.
