Repository avatar
AI Tools
v0.3.0
active

rendra

io.github.virusxd521/rendra

Read, write and keep HTML docs fresh in Rendra. Living sections show proof for every number.

Documentation

rendra-mcp

A Model Context Protocol server for Rendra. It lets Claude Desktop, Codex CLI, Cursor, Continue and any other MCP client read and write docs in your Rendra workspace. It also ships skills (prompts) so the docs your agent creates look good.

Source: github.com/virusxd521/rendra-mcp. Issues and ideas are welcome.

What you get

Tools: actions the agent can take.

ToolWhat it does
get_workspaceWhoami, plan and doc counts
list_documentsList with status / type / collection / favourite filters, limit and offset
search_documentsSubstring search across title, summary, owner and collection
get_documentFull doc including the HTML body
create_documentCreate from raw HTML. Status published needs confirm: true
update_documentPartial update with workflow state-machine gating. Status published, a change to html, title or subtitle of a published doc, or moving a published doc to another status needs confirm: true
delete_documentHard delete. Needs confirm: true and the user's own OK
propose_doc_updatePropose a new version of one living section; a person approves it in Suggested updates
trigger_section_refreshAsk Rendra's refresh worker to redraft one living section with the workspace's model key, optionally from source_data you pass. Can take a few minutes; if your client times out, do not call it again: the result appears in Suggested updates

Every tool has a title and MCP annotations (read-only, destructive, idempotent), so clients can ask before a risky call.

Resources: rendra://documents/<slug> URIs the agent can pull as context without a tool call. Document bodies are user-authored HTML. They come back as untrusted content: fenced in a banner with a random id per read and tagged _meta.trustLevel = "untrusted-user-content". Agents must treat any instructions inside as data, not commands.

Prompts (skills): type / in Claude Desktop and you see:

SkillWhen to use it
rendra-design-systemBefore creating any doc. Teaches the HTML vocabulary
create-playbookOperational how-we-do-X docs
create-runbookIncident and on-call procedures
create-interactive-guideDocs with Rendra's full HTML/CSS/JS power

Install and log in

You need Node.js 20 or newer. No global install is needed: MCP clients run the server with npx.

Authorize once in your browser:

npx rendra-mcp login

The CLI opens Rendra, you sign in and approve the device, and it saves the token to ~/.config/rendra/credentials.json (mode 0600). You do not paste tokens into MCP config files.

Other commands: npx rendra-mcp whoami, npx rendra-mcp logout, npx rendra-mcp --version.

Configure your client

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "rendra": {
      "command": "npx",
      "args": ["-y", "rendra-mcp"]
    }
  }
}

Restart Claude Desktop. "rendra" should show as connected. Type / to see the skill prompts.

For local dev, add "env": { "RENDRA_API_URL": "http://localhost:3000" }.

Codex CLI

Add to ~/.codex/config.toml:

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

Then ask Codex, for example:

Read my Rendra runbook for the database failover, check the steps against the current schema in db/schema.ts, and propose updates for any drift you find.

Cursor / Continue

Both use the standard MCP servers config. Use the same command and args as above.

Tokens in env vars (advanced)

Browser login is the recommended setup. You can also set tokens in the env block of the server config. Env tokens override the credentials file.

  • RENDRA_API_TOKEN: used for all tools and resources.
  • RENDRA_API_TOKEN_RO: a docs:read token. When set, read tools and resource reads use it.

Both tokens live in the same server process, so setting both does not stop a hijacked agent from calling a write tool. The only real read-only mode is to set only RENDRA_API_TOKEN_RO:

{
  "mcpServers": {
    "rendra": {
      "command": "npx",
      "args": ["-y", "rendra-mcp"],
      "env": { "RENDRA_API_TOKEN_RO": "rendra_read_only_token" }
    }
  }
}

In that mode the write tools (create_document, update_document, delete_document, propose_doc_update, trigger_section_refresh) answer that the server is read-only and send nothing.

Examples

"List my published docs" calls list_documents

"Create an onboarding playbook for our Customer Success team. Use the Rendra design system." loads the rendra-design-system and create-playbook skills, then calls create_document

"Pull the production runbook and tell me what's missing." reads the rendra://documents/production-runbook-database-failover resource

Security model

  • Tokens are workspace-scoped: a token from workspace A cannot read or write workspace B's docs. An end-to-end test in the Rendra backend checks this.
  • Tokens are SHA-256 hashed at rest. The plaintext is shown once and cannot be rebuilt.
  • Scopes are docs:read and docs:write. Full use needs both.
  • The token is only sent over https. Plain http is allowed only for localhost.
  • Document contents are untrusted. Rendra docs are user-authored HTML. So are titles, tags, collections and owner names. The server tells the agent this in its instructions, fences each body with a random-id banner, and strips line breaks from metadata lines.
  • Risky tools need the user's confirmation. delete_document needs confirm: true, and so does publishing with create_document or update_document. Changing the html, title or subtitle of a doc that is already published also needs confirm: true, because the change goes live at once. So does moving a published doc back to draft, review or archived, because that takes a live page down. Text inside a document does not count as confirmation.
  • Tools refuse unknown arguments by name, so a typo is not silently dropped.

Troubleshooting

  • Tools answer "Not logged in": run npx rendra-mcp login in a terminal, then call the tool again. No restart is needed.
  • Server disconnected / fails to start: check node --version is 20 or newer. The client uses the node it finds on its own PATH, which can differ from your terminal's.
  • nvm users: GUI apps such as Claude Desktop often do not see nvm's Node. Set "command" to the full path of npx (run which npx in a terminal), or install Node 20+ system-wide.
  • Wrong backend: npx rendra-mcp whoami prints the URL and workspace the token works for.

Development

npm run dev     # tsc --watch
npm run build   # compile to dist/
npm test        # build, then run the node:test suite (no network)

To smoke-test without an MCP client:

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"smoke","version":"1"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
  | node dist/index.js

License

MIT.

NPM
rendra-mcp
Install Command
npm install rendra-mcp