Opengist

v0.5.0
io.github.ni-c/opengist-mcp Checked 11 hours ago Published 2 months ago

Read, create, update and delete gists on a self-hosted Opengist instance

Values you need

VariableWhat it is
OPENGIST_URLrequired Base URL of the Opengist instance, e.g. https://gist.example.com
OPENGIST_TOKENrequired secret Opengist Personal Access Token (starts with og_), created under Settings -> Access Tokens
OPENGIST_READ_ONLYoptional Set to true to not register any write tools (create, update, delete, fork, like)
OPENGIST_INSECURE_TLSoptional Set to true to accept self-signed TLS certificates (scoped to the Opengist connection)
OPENGIST_ALLOW_TOOLSoptional Comma-separated tool names or list_* prefixes to register; 'essential' selects a curated preset (default: all tools)
OPENGIST_DENY_TOOLSoptional Comma-separated tool names or list_* prefixes to remove from whatever OPENGIST_ALLOW_TOOLS left

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add opengist-mcp -e 'OPENGIST_TOKEN=<OPENGIST_TOKEN>' -e 'OPENGIST_URL=<OPENGIST_URL>' -- npx -y opengist-mcp@0.5.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "opengist-mcp": {
      "args": [
        "-y",
        "opengist-mcp@0.5.0"
      ],
      "command": "npx",
      "env": {
        "OPENGIST_TOKEN": "<OPENGIST_TOKEN>",
        "OPENGIST_URL": "<OPENGIST_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "opengist-mcp": {
      "args": [
        "-y",
        "opengist-mcp@0.5.0"
      ],
      "command": "npx",
      "env": {
        "OPENGIST_TOKEN": "<OPENGIST_TOKEN>",
        "OPENGIST_URL": "<OPENGIST_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "OPENGIST_TOKEN",
      "id": "opengist-token",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "OPENGIST_URL",
      "id": "opengist-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "opengist-mcp": {
      "args": [
        "-y",
        "opengist-mcp@0.5.0"
      ],
      "command": "npx",
      "env": {
        "OPENGIST_TOKEN": "${input:opengist-token}",
        "OPENGIST_URL": "${input:opengist-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.opengist-mcp]
command = "npx"
args = ["-y", "opengist-mcp@0.5.0"]
env = { "OPENGIST_TOKEN" = "<OPENGIST_TOKEN>", "OPENGIST_URL" = "<OPENGIST_URL>" }

Docker

Requires Docker

Run in a terminal
claude mcp add opengist-mcp -e 'OPENGIST_TOKEN=<OPENGIST_TOKEN>' -e 'OPENGIST_URL=<OPENGIST_URL>' -- docker run -i --rm -e OPENGIST_TOKEN -e OPENGIST_URL ghcr.io/ni-c/opengist-mcp:0.5.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "opengist-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "OPENGIST_TOKEN",
        "-e",
        "OPENGIST_URL",
        "ghcr.io/ni-c/opengist-mcp:0.5.0"
      ],
      "command": "docker",
      "env": {
        "OPENGIST_TOKEN": "<OPENGIST_TOKEN>",
        "OPENGIST_URL": "<OPENGIST_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "opengist-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "OPENGIST_TOKEN",
        "-e",
        "OPENGIST_URL",
        "ghcr.io/ni-c/opengist-mcp:0.5.0"
      ],
      "command": "docker",
      "env": {
        "OPENGIST_TOKEN": "<OPENGIST_TOKEN>",
        "OPENGIST_URL": "<OPENGIST_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "OPENGIST_TOKEN",
      "id": "opengist-token",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "OPENGIST_URL",
      "id": "opengist-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "opengist-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "OPENGIST_TOKEN",
        "-e",
        "OPENGIST_URL",
        "ghcr.io/ni-c/opengist-mcp:0.5.0"
      ],
      "command": "docker",
      "env": {
        "OPENGIST_TOKEN": "${input:opengist-token}",
        "OPENGIST_URL": "${input:opengist-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.opengist-mcp]
command = "docker"
args = ["run", "-i", "--rm", "-e", "OPENGIST_TOKEN", "-e", "OPENGIST_URL", "ghcr.io/ni-c/opengist-mcp:0.5.0"]
env = { "OPENGIST_TOKEN" = "<OPENGIST_TOKEN>", "OPENGIST_URL" = "<OPENGIST_URL>" }

For AI agents

  1. Ask the user for: OPENGIST_URL, OPENGIST_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: list_gists, get_gist, get_gist_file, list_gist_commits, list_gist_forks, search_gists, get_user, check_gist_like, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json