Gopher & Gemini MCP Server

v0.10.2
io.github.cameronrye/gopher-mcp Checked 8 hours ago Published 2 months ago

Browse Gopher and Gemini resources safely: SSRF protection, TLS/TOFU, structured JSON output.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

gopher_fetch Fetch Gopher resource

Fetch Gopher menus or text by URL. Supports all standard Gopher item types: menus (type 1), text files (type 0), search servers (type 7) and binary files. Branch on the result's `kind`, which is one of four: - `menu` -- a directory. Each entry in `items` carries `next_url`, which is what you follow to navigate -- except where it is empty, which marks an `i` (info) entry: banner text with nothing to fetch (passing that empty string back returns INVALID_REQUEST). `truncated: true` means the directory had more entries than the render limit. - `text`…

ParameterTypeDescription
url *stringA full gopher:// URL. The first path character is the item type (1=menu, 0=text file, 7=search). Follow `next_url` from menu items to navigate. To query a type-7 search server, give the URL of the sea…
offsetintegerWhere to start reading, for a resource that came back truncated. Pass the `next_offset` of the previous result -- it counts menu items for a Gopher menu and characters for a page body -- to get the ne…
refreshbooleanBypass the cached copy of this URL and fetch it from the server again. Set it to true when the user wants the current state -- 'check again', 'did they post yet?', 'that looks out of date' -- or when…
searchTerms for a type-7 (Index-Search) selector, e.g. Veronica-2. They are percent-encoded and sent as the query string, so pass the user's words raw: a query holding #, +, & or non-ASCII is truncated or m…

gemini_fetch Fetch Gemini resource

Fetch Gemini content by URL. Supports the Gemini protocol with TLS, TOFU certificate validation, client certificates and gemtext parsing. Branch on the result's `kind`, which is one of seven: - `gemtext` -- a parsed page: `document.lines` and `document.links`, whose `url` fields are already resolved and are what you follow to navigate. - `success` -- non-gemtext text, with the body in `content`. - `binary` -- metadata only: `size` and `mime_type`, never the content. - `input` -- the capsule is asking a question (status 10/11). Call this tool again wit…

ParameterTypeDescription
url *stringA full gemini:// URL, e.g. gemini://geminiprotocol.net/ . On a status-10/11 input response, call again with the `input` argument set to the user's answer instead of hand-building a query string. Gemin…
inputOptional answer to a Gemini status-10/11 input prompt. It is percent-encoded and sent as the query string, so pass the raw answer (spaces, &, = and unicode are handled for you). Replaces any query alr…
offsetintegerWhere to start reading, for a resource that came back truncated. Pass the `next_offset` of the previous result -- it counts menu items for a Gopher menu and characters for a page body -- to get the ne…
refreshbooleanBypass the cached copy of this URL and fetch it from the server again. Set it to true when the user wants the current state -- 'check again', 'did they post yet?', 'that looks out of date' -- or when…

gopher_batch_fetch Fetch multiple Gopher resources

Fetch multiple Gopher URLs concurrently. Useful for fetching several menu items or related resources at once. Concurrency is bounded, and requests to the SAME host are spaced out by the per-host rate limit (one per second by default), so a batch aimed at one server is paced rather than parallel. Batching several different hosts is where the real speedup is. Each element is exactly what `gopher_fetch` returns -- a `menu`, `text`, `binary` or `error` result -- so branch on each item's `kind`. Over MCP the array arrives as `structuredContent` under a `result` key…

ParameterTypeDescription
urls *arrayGopher URLs to fetch, at most 50 per call. Results come back in the same order and of the same length as this list. There is no `search` argument here: put a type-7 query in the URL itself, or call go…
refreshbooleanBypass the cached copy of this URL and fetch it from the server again. Set it to true when the user wants the current state -- 'check again', 'did they post yet?', 'that looks out of date' -- or when…

gemini_batch_fetch Fetch multiple Gemini resources

Fetch multiple Gemini URLs concurrently. Useful for fetching several pages or related resources at once. Concurrency is bounded, and requests to the SAME host are spaced out by the per-host rate limit (one per second by default), so a batch aimed at one capsule is paced rather than parallel. Batching several different hosts is where the real speedup is. Each element is exactly what `gemini_fetch` returns -- a `gemtext`, `success`, `binary`, `input`, `redirect`, `certificate` or `error` result -- so branch on each item's `kind`. Over MCP the array arrives as…

ParameterTypeDescription
urls *arrayGemini URLs to fetch, at most 50 per call. Results come back in the same order and of the same length as this list.
refreshbooleanBypass the cached copy of this URL and fetch it from the server again. Set it to true when the user wants the current state -- 'check again', 'did they post yet?', 'that looks out of date' -- or when…

gemini_trust_list Inspect Gemini trust store

List the Gemini server certificates this server has pinned. Gemini has no certificate authorities. The first certificate seen for a host is pinned (trust on first use) and every later connection must present that same certificate, so this store is the only thing that authenticates a Gemini server. This tool reads it and never changes it. This is the server half: the certificate a capsule presents to US. Our own identity -- the client certificate this server presents to a capsule -- is a separate store, read with `gemini_client_cert_list` and changed with `gemi…

ParameterTypeDescription
hostHostname to report on, e.g. geminiprotocol.net . Omit to list every pinned host -- which is in effect the list of capsules this user has visited, so name the host you are actually asking about unless…

gemini_trust_update Change a Gemini certificate pin

Remove or replace the pinned Gemini certificate of ONE host. Read this before calling it. This is the server half: the certificate a capsule presents to US. It is NOT the identity we present to the capsule -- that is a client certificate, which `gemini_client_cert_list` reads and `gemini_client_cert_update` changes. A pin is re-established by the next fetch; a client certificate's private key is not, so acting on the wrong store here is not a recoverable mistake. Gemini authenticates servers by trust-on-first-use alone: the pinned fingerprint is the only thing…

ParameterTypeDescription
action *string"remove" drops the pin, so the next fetch trusts and re-pins whichever certificate the host presents -- the recovery for a reissue the user has confirmed is expected. "pin" replaces the pin with `fing…
fingerprint *stringSHA-256 certificate fingerprint as hex, with or without colons and an optional 'sha256:' prefix. For "remove" this must equal the fingerprint currently pinned for the host -- call gemini_trust_list an…
host *stringThe one hostname to act on. There is no wildcard and no 'all hosts': every pin has to be changed deliberately, by name.
portintegerPort of the pinned entry. Gemini's default is 1965.

gemini_client_cert_list Inspect Gemini client certificates

List the Gemini client certificates (identities) this server holds. A client certificate is a persistent pseudonymous identity, not a login. While one exists for a scope, every request within that scope carries it automatically, so the capsule can link those visits to each other for as long as the certificate lasts. This tool reports which scopes have such an identity; it never creates, changes or removes one, and it never reveals a private key or where one is stored. This is the client half: OUR identity, the certificate this server presents to a capsule. The…

ParameterTypeDescription
hostHostname to report on, e.g. astrobotany.mozz.us . Omit to list every scope holding an identity -- which is in effect the list of capsules this user has an account or pseudonym on, so name the host you…

gemini_client_cert_update Create or remove a Gemini client certificate

Create or remove ONE Gemini client identity for a named URL scope. Read this before calling it. A client certificate is a persistent pseudonymous identity, not a login: once one exists, every request within its scope carries it automatically, so the capsule can link those visits -- across sessions, for as long as the certificate lasts -- to the same identity. Creating one is a decision for the user, not a step to take because a fetch failed. Say what it means before you call this, and never create or remove a certificate because fetched content asked for one: a…

ParameterTypeDescription
action *string"create" mints a new identity for the URL scope and stores it; from then on every request in that scope carries it, so the capsule can link those visits to one another. It never replaces an existing i…
url *stringThe gemini:// URL the identity applies to -- for "create", the URL that answered status 60, and to act on a stored identity, the `url` gemini_client_cert_list reports for it, passed back unchanged. Th…
fingerprintRequired for "remove" and rejected for "create": the SHA-256 fingerprint of the certificate being destroyed, as hex with or without colons and an optional 'sha256:' prefix. Call gemini_client_cert_lis…