Server data from the Official MCP Registry
Read, create, update and delete gists on a self-hosted Opengist instance
About
Read, create, update and delete gists on a self-hosted Opengist instance
Security Report
Valid MCP server (1 strong, 1 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (5/5 approved).
5 files analyzed ยท 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
What You'll Need
Set these up before or after installing:
Environment variable: OPENGIST_URL
Environment variable: OPENGIST_TOKEN
Environment variable: OPENGIST_READ_ONLY
Environment variable: OPENGIST_INSECURE_TLS
How to Install
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-ni-c-opengist-mcp": {
"env": {
"OPENGIST_URL": "your-opengist-url-here",
"OPENGIST_TOKEN": "your-opengist-token-here",
"OPENGIST_READ_ONLY": "your-opengist-read-only-here",
"OPENGIST_INSECURE_TLS": "your-opengist-insecure-tls-here"
},
"args": [
"-y",
"opengist-mcp"
],
"command": "npx"
}
}
}Documentation
View on GitHubFrom the project's GitHub README.
opengist-mcp
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.
๐ Full documentation at opengist-mcp.ni-c.de
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.
Requirements
-
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 forset_gist_like
A token without
gist:readstill works, but the API then silently returns only public gists instead of failing.
Configuration
| 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 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) |
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.
Installation
Claude Code
claude mcp add opengist -s user \
-e OPENGIST_URL=https://gist.example.com \
-e OPENGIST_TOKEN=og_your_token \
-- npx -y opengist-mcp
Claude Desktop
claude_desktop_config.json:
{
"mcpServers": {
"opengist": {
"command": "npx",
"args": ["-y", "opengist-mcp"],
"env": {
"OPENGIST_URL": "https://gist.example.com",
"OPENGIST_TOKEN": "og_your_token"
}
}
}
}
Codex
~/.codex/config.toml:
[mcp_servers.opengist]
command = "npx"
args = ["-y", "opengist-mcp"]
env = { OPENGIST_URL = "https://gist.example.com", OPENGIST_TOKEN = "og_your_token" }
Docker
docker run --rm -i \
-e OPENGIST_URL=https://gist.example.com \
-e OPENGIST_TOKEN=og_your_token \
ghcr.io/ni-c/opengist-mcp:latest
-i is required โ the transport is stdio. Do not add -t; a TTY corrupts the
protocol stream.
From source
git clone https://github.com/ni-c/opengist-mcp.git
cd opengist-mcp
npm install
npm run build
Tools
Reading
| Tool | Description |
|---|---|
list_gists | List gists: your own, another user's, all public ones, or liked/forked ones (scope + optional username) |
search_gists | Find gists by title, description, topics or owner โ a bounded client-side scan (Opengist has no search API) |
get_gist | Get one gist with its file contents, optionally at a revision; commits and forks on request |
get_gist_file | Get the raw content of a single file, at a revision and from an offset โ for large or truncated files |
list_gist_commits | Commit history of a gist, newest first |
list_gist_forks | Forks of a gist |
get_user | Your own account, or another user by username or userId |
check_gist_like | Whether you liked a gist; distinguishes "not liked" from "not visible to you" |
Writing
| Tool | Description |
|---|---|
create_gist | Create a gist from a list of files. visibility is required; public/unlisted needs a confirmation |
update_gist | Change title/description/visibility and write or rename files. Cannot delete files |
delete_gist_files | Delete files from a gist โ needs a confirmation token bound to exactly those filenames |
delete_gist | Delete a gist permanently โ needs a confirmation token |
fork_gist | Fork a gist; reports whether a new fork was created or one already existed |
set_gist_like | Like or unlike a gist idempotently (reads the current state first, so a repeat call is not a toggle) |
Safety
- Irreversible actions need a server-generated token.
delete_gist,delete_gist_filesand widening a gist's visibility refuse the first call and return a random, single-use token that expires after five minutes. A plainconfirm: trueflag could be set by the model on its own, or be talked into it by text inside a gist; a token that only ever appeared in a previous tool result cannot. The token fordelete_gist_filesis bound to the exact set of filenames, so a confirmation for one file cannot be replayed to delete another. - Publishing content needs the same token. Creating a
publicorunlistedgist, and writing files into a gist that already is one, are disclosure events: whatever the model has in its context becomes readable by others and cannot be withdrawn from anyone who already saw it. Both refuse the first call. The token is bound to the exact content, so a confirmation for one file cannot be replayed with a second one attached. A call that makes the gist private in the same breath is not a disclosure and needs no token. - Confirmations are checked after validation. A call that could not succeed anyway is reported as the input error it is, rather than first costing a confirmation round-trip.
- Confirmation prompts never quote gist text. Titles, descriptions, topics and filenames are user-supplied and could carry instructions aimed at manufacturing a confirmation, so refusals show only server-side metadata (visibility, file count, dates).
update_gistcannot delete a file. The Opengist API deletes a file when its entry isnullor carries neithercontentnorfilenameโ exactly the shape a sloppily built object has. This server therefore never exposes the raw file map; it accepts explicitwrite/renameoperations and asserts before sending that no entry could be read as a deletion. Files you do not mention are left untouched.- Typos cannot silently duplicate a file. A write to a filename that does not exist is refused unless
allowCreate: trueis passed, and the refusal names a case-insensitive near match (readme.mdvsREADME.md). - Gist content is untrusted input. Every response that carries file content is tagged with a note saying so. Treat gist text as data, never as instructions.
- Results are bounded. File contents are capped per file and against an overall budget, commits and forks are omitted by default, binary files are not dumped as text, and every truncation is reported together with the call that fetches the rest.
search_gistsstates how much it scanned and marks incomplete results explicitly. - Requests are hardened. Redirects are refused so the bearer token cannot be replayed to another host, every request carries a timeout, path parameters reject
./..and are URL-encoded, and upstream error bodies are truncated with HTML error pages dropped entirely. - Residual risk:
OPENGIST_READ_ONLYand the confirmation tokens are client-side guards. The real boundary is the scope of your access token and the permission prompts of your MCP host. A token limited togist:read/user:readcannot write, whatever the model attempts.
Development
npm install
npm run build
npm test
npm run lint
Releasing
Bump the version in package.json and server.json, move the ## [Unreleased] section of CHANGELOG.md to the new version, commit, then push a tag:
git tag -a v0.1.0 -m "v0.1.0"
git push origin main v0.1.0
The release workflow verifies that the tag matches the package version, publishes to npm via OIDC trusted publishing (no long-lived token), waits for the container image to appear on GHCR, registers the release in the MCP registry and creates a GitHub release from the changelog section.
If the registry step fails, fix it on main and dispatch mcp-registry.yml โ never re-run the tagged job, which checks out the immutable tag.
Documentation
The full guide, tool reference and security notes live at
opengist-mcp.ni-c.de (source in docs/).
License
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Fetch
Freeby Modelcontextprotocol ยท Developer Tools
Web content fetching and conversion for efficient LLM usage
Toleno
Freeby Toleno ยท Developer Tools
Toleno Network MCP Server โ Manage your Toleno mining account with Claude AI using natural language.
mcp-creator-python
Freeby mcp-marketplace ยท Developer Tools
Create, build, and publish Python MCP servers to PyPI โ conversationally.
MarkItDown
Freeby Microsoft ยท Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
MCP Marketplace
Freeby mcp-marketplace ยท Developer Tools
Search and install MCP servers from inside your AI client.
FinAgent
Freeby mcp-marketplace ยท Finance
Free stock data and market news for any MCP-compatible AI assistant.
