GitHub Gist MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "GITHUB_TOKEN=${GITHUB_TOKEN}" github-gist -- npx -y mcp-server-github-gist
Required:GITHUB_TOKEN+ 1 optional
README.md

Manage Gists from your AI assistant

MCP Server GitHub Gist — Manage Gists from Your AI Assistant

An MCP server to create, read, update, and search GitHub Gists without leaving your AI assistant. The official GitHub MCP server handles repos and issues — this one fills the Gist gap.

You: "Save this code snippet as a gist called 'auth-middleware.ts'"
AI:  ✅ Created secret gist: https://gist.github.com/abc123

Works with Claude Desktop, Cursor, and VS Code Copilot.

MCP server GitHub Gist demo — creating and listing gists from Claude Desktop

Tools

Tool What it does
gist_list List your gists (paginated)
gist_get Get a gist by ID (includes file contents)
gist_create Create a new gist (public or secret)
gist_update Update description or file contents
gist_delete Delete a gist
gist_starred List your starred gists
gist_star Star a gist
gist_unstar Unstar a gist

Quick Start

With Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "github-gist": {
      "command": "npx",
      "args": ["-y", "mcp-server-github-gist"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

With Cursor

Add to your .cursor/mcp.json:

{
  "mcpServers": {
    "github-gist": {
      "command": "npx",
      "args": ["-y", "mcp-server-github-gist"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Authentication

Requires a GitHub personal access token with the gist scope.

  1. Go to GitHub Settings > Tokens
  2. Create a token with the gist scope
  3. Set it as GITHUB_TOKEN or GITHUB_PERSONAL_ACCESS_TOKEN environment variable

Examples

Ask your AI assistant:

  • "List my recent gists"
  • "Create a gist with this code snippet"
  • "Show me gist abc123"
  • "Update the description of gist abc123"
  • "Delete gist abc123"
  • "Star this gist"

Development

npm install
npm test
npm run build

Author


README built with README Builder

License

MIT © Ofer Shapira

Tools (8)

gist_listList your gists (paginated)
gist_getGet a gist by ID (includes file contents)
gist_createCreate a new gist (public or secret)
gist_updateUpdate description or file contents
gist_deleteDelete a gist
gist_starredList your starred gists
gist_starStar a gist
gist_unstarUnstar a gist

Environment Variables

GITHUB_TOKENrequiredGitHub personal access token with gist scope
GITHUB_PERSONAL_ACCESS_TOKENAlternative environment variable for GitHub personal access token

Configuration

claude_desktop_config.json
{"mcpServers": {"github-gist": {"command": "npx", "args": ["-y", "mcp-server-github-gist"], "env": {"GITHUB_TOKEN": "ghp_your_token_here"}}}}

Try it

List my recent gists
Create a gist with this code snippet
Show me the contents of gist abc123
Update the description of gist abc123
Delete gist abc123

Frequently Asked Questions

What are the key features of GitHub Gist?

Create, read, update, and delete GitHub Gists. Search and list existing Gists. Manage Gist stars and starred lists. Supports both public and secret Gist creation. Seamless integration with Claude Desktop and Cursor.

What can I use GitHub Gist for?

Saving code snippets directly from the IDE to GitHub Gists. Quickly retrieving saved configuration or utility scripts. Managing personal code collections without leaving the AI chat interface. Updating documentation or notes stored as Gists.

How do I install GitHub Gist?

Install GitHub Gist by running: npx -y mcp-server-github-gist

What MCP clients work with GitHub Gist?

GitHub Gist works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep GitHub Gist docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare