npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@johnkattenhorn/docmost-mcp

v1.0.0

Published

MCP server for Docmost - connects AI assistants to standard Docmost instances

Readme

Docmost MCP Server

CI npm version License: MIT

A Model Context Protocol (MCP) server that connects AI assistants (like Claude, Cursor, etc.) to standard Docmost instances.

Installation

# npm
npm install -g docmost-mcp

# or run directly with npx
npx docmost-mcp

Features

  • Works with any standard Docmost installation (no modifications needed)
  • Full support for spaces, pages, comments, search, and more
  • Cookie-based JWT authentication
  • Docker deployment with auto-restart

Available Tools

Space Tools

| Tool | Description | |------|-------------| | docmost_list_spaces | List all spaces in the workspace | | docmost_get_space | Get details of a specific space | | docmost_create_space | Create a new space | | docmost_update_space | Update an existing space | | docmost_delete_space | Delete a space |

Page Tools

| Tool | Description | |------|-------------| | docmost_list_pages | List pages in a space | | docmost_get_page | Get page details and content | | docmost_create_page | Create a new page | | docmost_update_page | Update page metadata | | docmost_update_page_markdown | Update page content with markdown | | docmost_delete_page | Delete a page | | docmost_get_recent_pages | Get recently updated pages | | docmost_get_page_history | Get page edit history | | docmost_move_page | Move page to new position | | docmost_move_page_to_parent | Move page to different parent or root | | docmost_bulk_create_pages | Create multiple pages at once | | docmost_import_page | Import page from markdown/HTML | | docmost_export_page | Export page as HTML/Markdown/PDF |

Attachment & Embedding Tools

| Tool | Description | |------|-------------| | docmost_upload_attachment | Upload image/file to a page | | docmost_get_attachment_info | Get attachment metadata by ID | | docmost_embed_image | Upload and insert image in one operation | | docmost_embed_from_cdn | Embed image from CDN URL (link or transfer modes) |

Diagram Tools

| Tool | Description | |------|-------------| | docmost_insert_drawio_block | Insert native Draw.io diagram from base64 SVG | | docmost_insert_drawio_from_cdn | Insert Draw.io diagram from CDN URL | | docmost_insert_excalidraw_block | Insert native Excalidraw diagram from base64 SVG | | docmost_insert_excalidraw_from_cdn | Insert Excalidraw diagram from CDN URL |

Search Tools

| Tool | Description | |------|-------------| | docmost_search | Search for pages in a space | | docmost_search_suggest | Get search suggestions |

Comment Tools

| Tool | Description | |------|-------------| | docmost_list_comments | List comments on a page | | docmost_create_comment | Create a comment | | docmost_delete_comment | Delete a comment |

Workspace Tools

| Tool | Description | |------|-------------| | docmost_get_workspace | Get workspace info | | docmost_list_workspace_members | List workspace members | | docmost_get_current_user | Get current user info |

Page Composition Order

Docmost pages are TipTap documents with two flavours of content:

  • Markdown-equivalent nodes — headings, paragraphs, lists, tables, code blocks, blockquotes. These round-trip cleanly through docmost_update_page_markdown.
  • Native TipTap nodesdrawio, excalidraw, and image attachments. These have no markdown equivalent and only exist as structured nodes in the document tree.

When composing a page, build it in this order:

  1. Markdown body first with docmost_update_page_markdown (operation: replace).
  2. Diagram blocks last via docmost_insert_drawio_block, docmost_insert_drawio_from_cdn, docmost_insert_excalidraw_block, or docmost_insert_excalidraw_from_cdn.
  3. Image embeds anywhere with docmost_embed_from_cdn — these correctly append/prepend to existing content of either kind.

Avoid calling docmost_update_page_markdown(replace) after you've inserted diagram blocks. The replace operation rewrites the page from markdown, and since native nodes have no markdown form, they're dropped. Use docmost_update_page_markdown(append) or docmost_update_page_markdown(prepend) to add prose around existing diagram blocks without losing them.

For documents that mix prose and diagrams, the cleanest workflow is:

  1. Build out the markdown body (replace).
  2. prepend any header/title images.
  3. append diagram blocks at the end, in order.
  4. Use append operations on update_page_markdown to add explanatory prose between or after diagram blocks.

Setup

1. Authentication

You can authenticate using either email/password or an auth token:

Option A: Email/Password (recommended)

DOCMOST_URL=https://your-docmost-instance.com
[email protected]
DOCMOST_PASSWORD=your-password

Option B: Auth Token

  1. Log into your Docmost instance in a browser
  2. Open Developer Tools (F12) → Application → Cookies
  3. Copy the authToken cookie value
DOCMOST_URL=https://your-docmost-instance.com
DOCMOST_AUTH_TOKEN=your_auth_token_here

2. Create Environment File

cp .env.example .env
# Edit .env with your credentials

3. Run with Docker

docker compose up -d

Usage with Claude Code

Add to your Claude Code MCP configuration (~/.claude.json or settings):

{
  "mcpServers": {
    "docmost": {
      "command": "node",
      "args": ["/path/to/docmost-mcp/dist/index.js"],
      "env": {
        "DOCMOST_URL": "https://your-docmost-instance.com",
        "DOCMOST_EMAIL": "[email protected]",
        "DOCMOST_PASSWORD": "your-password"
      }
    }
  }
}

Or with Docker:

{
  "mcpServers": {
    "docmost": {
      "command": "docker",
      "args": ["exec", "-i", "docmost-mcp", "node", "dist/index.js"],
      "env": {}
    }
  }
}

Local Development

# Install dependencies
pnpm install

# Build
pnpm run build

# Run in development mode
pnpm run dev

Important Notes

  • The auth token expires after 30 days. You'll need to get a new one periodically.
  • This uses internal Docmost API endpoints which may change with updates.
  • Some operations require specific permissions in Docmost.

License

MIT