Read, create, update and delete gists on a self-hosted Opengist instance
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A Model Context Protocol (MCP) server for Opengist, the self-hosted pastebin powered by Git.
Lets MCP clients like Claude Code, Claude Desktop or Codex read, search, create, update and delete gists on your own Opengist instance: file contents and revisions, commit history, forks and likes, plus your user account.
Fourteen tools is the ceiling, not the floor: OPENGIST_ALLOW_TOOLS=essential
registers a curated seven instead, and a model picks the right tool far more
reliably from seven than from fourteen β see
choosing which tools load.

Note: this server talks to the Opengist REST API under
/api, which is available in recent Opengist releases and enabled by default (api.enabled). A running instance serves its own OpenAPI spec atGET /api/openapi.yamlβ compare it against your version if a tool behaves unexpectedly.
Fourteen tools over one API surface, derived from the Opengist REST API and verified against a live instance: reading, searching, writing, forking and liking gists, including revisions, commit history and raw file access.
Bounded by construction. File contents are capped per file and against an overall budget, binary files are never dumped as text, and every truncation names the call that fetches the rest.
Node.js 22 or newer
An Opengist instance with the REST API enabled
An Opengist Personal Access Token (Settings β Access Tokens). Scopes:
gist:read β read gists, including your private and unlisted onesgist:write β create, update, delete and fork gistsuser:read β read your own accountuser:write β only needed for set_gist_likeA token without gist:read still works, but the API then silently returns only public gists instead of failing.
| Variable | Required | Description |
|---|---|---|
OPENGIST_URL | yes | Base URL of your instance, e.g. https://gist.example.com. A trailing /api is accepted and stripped. |
OPENGIST_TOKEN | yes | Personal Access Token, starts with og_ |
OPENGIST_READ_ONLY | no | true, 1 or yes registers only the read tools; the write tools do not exist at all in that session |
OPENGIST_INSECURE_TLS | no | true accepts self-signed certificates, scoped to the Opengist connection (never process-wide) |
OPENGIST_ALLOW_TOOLS | no | Comma-separated tool names, list_* prefixes, or essential for a curated preset |
OPENGIST_DENY_TOOLS | no | Same syntax; removed from whatever OPENGIST_ALLOW_TOOLS left |
ELICITATION | no | false replaces the approval dialog with the two-call token. Not prefixed |
The token is read once at startup and then removed from
process.env, so it is not visible to child processes. Usehttps://for anything but a loopback address β over plain http the token and every gist travel in cleartext.If your instance's
external-urlis not configured, the URLs Opengist reports (and this server passes through) point atlocalhost. Setexternal-url/OG_EXTERNAL_URLon the instance so links are usable.
OPENGIST_ALLOW_TOOLS and OPENGIST_DENY_TOOLS take comma-separated tool names;
a trailing * matches a whole family. essential is a curated preset of
seven: list_gists, search_gists, get_gist, get_gist_file, create_gist, update_gist, delete_gist.
An entry that matches no tool aborts startup and names it, so a typo cannot
silently hide a tool β an absent tool is not something anyone traces back to an
environment variable. A filtered tool is never registered, so it is absent from
tools/list and unknown to tools/call alike, exactly like a write tool under
OPENGIST_READ_ONLY.
If you run several of these servers at once, mcp-hub
is the other answer β its /hub endpoint replaces every server's tools with six
meta-tools.
claude_desktop_config.json:
~/.codex/config.toml:
-i is required β the transport is stdio. Do not add -t; a TTY corrupts the
protocol stream.
A client that cannot spawn a local process β ChatGPT connectors, Claude on the web,
Cursor, LibreChat β reaches opengist-mcp through mcp-hub: one
container serves many stdio MCP servers over Streamable HTTP, with an OAuth 2.1 login
behind a single password and long-lived tokens for the clients that cannot do OAuth. Its
/hub endpoint puts every server behind six meta-tools, so one connector reaches all of
them without NΓtool schemas in the model's context, and it speaks both protocol revisions
β a question this server asks travels through it to the person at the far end.
Its /config/mcp.json uses Claude Code's format, so the entry is the one you already
have:
allowTools and denyTools there are the hub's own per-server filter, which is not
the same thing as *_ALLOW_TOOLS in env β the difference, and the mistake it invites,
are in the client guide.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/opengist)<a href="https://allmcps.com/mcp/opengist"><img src="https://allmcps.com/api/badge/opengist?style=directory" alt="Opengist on AllMCPs" /></a>