Back to Browse

Rustpad MCP Server

by Ni C
Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

MCP server for Rustpad, the self-hosted collaborative text editor

About

MCP server for Rustpad, the self-hosted collaborative text editor

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (2 strong, 1 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (23/23 approved).

6 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.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

network_websocket

Check that this permission is expected for this type of plugin.

HTTP Network Access

Connects to external APIs or services over the internet.

file_system

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Base URL of the Rustpad instance, e.g. https://rustpad.example.netOptional

Environment variable: RUSTPAD_URL

Exactly 'true' registers only the 3 read toolsOptional

Environment variable: RUSTPAD_READ_ONLY

Exactly 'true' accepts a self-signed certificate, scoped to this connectionOptional

Environment variable: RUSTPAD_INSECURE_TLS

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-ni-c-rustpad-mcp": {
      "env": {
        "RUSTPAD_URL": "your-rustpad-url-here",
        "RUSTPAD_READ_ONLY": "your-rustpad-read-only-here",
        "RUSTPAD_INSECURE_TLS": "your-rustpad-insecure-tls-here"
      },
      "args": [
        "-y",
        "rustpad-mcp"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

rustpad-mcp

CI npm downloads container node license docs

A Model Context Protocol server for Rustpad, the efficient, minimal, self-hosted collaborative text editor.

It gives an AI assistant read and write access to the pads of a Rustpad instance. Reads go through Rustpad's HTTP API; writes speak the operational-transformation WebSocket protocol, so targeted edits (append_to_document, replace_in_document) merge cleanly with what human collaborators type at the same time instead of overwriting it. While the server edits a pad, it is visible to everyone in the pad as a collaborator named rustpad-mcp.

šŸ“– Full documentation at rustpad-mcp.ni-c.de

Demo of rustpad-mcp over the MCP inspector

Requirements

  • A reachable Rustpad instance (self-hosted; the server is stateless and needs no credentials — Rustpad has no authentication)
  • Node.js >= 22, or Docker

Configuration

VariableRequiredDescription
RUSTPAD_URLyesBase URL of the instance, e.g. https://rustpad.example.net
RUSTPAD_READ_ONLYnotrue registers only the read tools
RUSTPAD_INSECURE_TLSnotrue accepts self-signed certificates (scoped to this connection only)

The same URL serves the HTTP API, the WebSocket endpoint and the share links returned by the tools (<RUSTPAD_URL>/#<pad-id>). Booleans must be exactly true. The server starts and lists its tools without configuration; every call then fails with setup instructions.

Keep in mind what Rustpad is: pads are ephemeral (lost on server restart and after 24 hours of inactivity, unless the instance is run with SQLITE_URI) and anyone who knows a pad id can read and write it. Do not put secrets in pads.

Installation

Claude Code

claude mcp add rustpad --env RUSTPAD_URL=https://rustpad.example.net -- npx rustpad-mcp

Claude Desktop

{
  "mcpServers": {
    "rustpad": {
      "command": "npx",
      "args": ["rustpad-mcp"],
      "env": {
        "RUSTPAD_URL": "https://rustpad.example.net"
      }
    }
  }
}

Codex

~/.codex/config.toml:

[mcp_servers.rustpad]
command = "npx"
args = ["-y", "rustpad-mcp"]

[mcp_servers.rustpad.env]
RUSTPAD_URL = "https://rustpad.example.net"

Docker

docker run -i --rm -e RUSTPAD_URL=https://rustpad.example.net ghcr.io/ni-c/rustpad-mcp

Tools

ToolDescription
get_documentRead the plain-text content of a pad
get_document_infoContent length, revision, language and the users editing right now
get_statsServer statistics (uptime, number of documents)
create_documentCreate a pad (random or chosen id), optionally with content and language
set_documentReplace the entire content — non-empty pads require a confirmation token
append_to_documentAppend text; concurrent edits elsewhere survive
replace_in_documentExact search & replace via OT; unique match required unless replace_all
set_languageSet the Monaco syntax-highlighting language

With RUSTPAD_READ_ONLY=true only the first three are registered.

Safety

  • Pad content is world-writable and therefore untrusted: every read result is prefixed with a marker telling the model to treat it as data, never as instructions.
  • Replacing a non-empty pad is irreversible and guarded by a single-use confirmation token that only ever appears in a previous tool result.
  • Tool results are size-capped; upstream error bodies are sanitized before they reach the model.
  • RUSTPAD_INSECURE_TLS relaxes certificate validation only for the configured connection, never process-wide.

Development

npm install
npm run lint && npm run build && npm test

The test suite talks to an in-memory fake of rustpad-server (including OT transformation of concurrent edits) over the real MCP protocol; no live instance is needed. The architecture diagram and social card are generated — edit docs/assets/architecture.source.svg and run npm run assets, never the rendered copies.

Releasing

Releases are tag-driven. Bump package.json, move the [Unreleased] notes in CHANGELOG.md under the new version, commit, then:

git tag -s vX.Y.Z -m "vX.Y.Z"
git push origin main vX.Y.Z

The release workflow publishes to npm via Trusted Publishing (OIDC, with provenance), pushes the multi-arch container image to GHCR, creates the GitHub release from the CHANGELOG section, and updates the entry in the official MCP registry.

License

MIT Ā© Willi Thiel

Reviews

No reviews yet

Be the first to review this server!