# sharedoc-mcp

Publishes agent-written Markdown as a shareable link, using a secret gist through gh or a local SQLite server with passwords and expiry.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 13
- Author: AugustusW
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/AugustusW/sharedoc-mcp
- Updated: 2026-09-01
- HTML: https://affpapa.org/en/nevibecode/mcp/sharedoc-mcp

## What it does

Agents keep producing Markdown: reports, digests, meeting notes. Handing that to someone else usually means dumping a wall of text into chat. This stdio server exposes nine tools so the agent can create a document, append to it, rewrite the content, extend the deadline, change the password, rename, revoke, delete and search by text.

One interface, two backends, chosen by an environment variable. The `gist` mode needs no setup: the document lands in a secret gist via a `gh` CLI you already signed into, and the unguessable URL is the only protection. The `selfhost` mode keeps everything on your disk in SQLite, checks passwords with bcrypt, throttles failed attempts and enforces expiry. A backend that cannot honour a parameter reports an error rather than ignoring it.

Node.js 22.13 or newer is required; the gist path also needs `gh auth login`. The viewer answers on `127.0.0.1` only, so exposing a link externally takes a tunnel you set up. A daemon mode, `sharedoc-mcp serve`, keeps selfhost links alive once the MCP client exits.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `SHAREDOC_BACKEND`, `SHAREDOC_PUBLIC_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env SHAREDOC_BACKEND=<SHAREDOC_BACKEND> --env SHAREDOC_PUBLIC_URL=<SHAREDOC_PUBLIC_URL> --transport stdio sharedoc-mcp -- npx -y sharedoc-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add sharedoc-mcp --env SHAREDOC_BACKEND=<SHAREDOC_BACKEND> --env SHAREDOC_PUBLIC_URL=<SHAREDOC_PUBLIC_URL> -- npx -y sharedoc-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "sharedoc-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "sharedoc-mcp"
            ],
            "env": {
                "SHAREDOC_BACKEND": "<SHAREDOC_BACKEND>",
                "SHAREDOC_PUBLIC_URL": "<SHAREDOC_PUBLIC_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "sharedoc-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "sharedoc-mcp"
            ],
            "env": {
                "SHAREDOC_BACKEND": "<SHAREDOC_BACKEND>",
                "SHAREDOC_PUBLIC_URL": "<SHAREDOC_PUBLIC_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e SHAREDOC_BACKEND=<SHAREDOC_BACKEND> -e SHAREDOC_PUBLIC_URL=<SHAREDOC_PUBLIC_URL> sharedoc-mcp npx -y sharedoc-mcp
```
Replace <…> with your own values

## When to use it
- hand off an agent report as one link instead of pasted text
- append new sections to a document that is already published
- lock a draft behind a password and an expiry date
- locate an old share link by its contents rather than its title
- rotate the password or revoke a document that went to the wrong person

## Example prompts
- Publish this report as a document and give me the link
- Find the document where I wrote up that incident
- Put a password on this document and set it to expire in a week

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
