Skip to Content
Sharing & Access

Sharing & Access Control

MarkDocs uses handle-based authentication and per-document access control.

Authentication

Users sign up with a handle (e.g. @john) and password. Authentication uses JWT tokens stored in HTTP-only cookies.

New users need an invite link to register:

  1. Go to Settings in the dashboard
  2. Click Create Invite to generate a link
  3. Share the link — it expires after 7 days
  4. The recipient signs up using the invite code

Document Access

Documents are visible to:

  • The creator (owner) — full control
  • Collaborators — explicitly shared with editor or viewer role

Roles

RoleCan ViewCan EditCan ShareCan Delete
OwnerYesYesYesYes
EditorYesYesNoNo
ViewerYesNoNoNo

Sharing Documents

From the Dashboard

  1. Click the share icon on any document you own
  2. Search for users by handle
  3. Check the users you want to share with
  4. Click Save

From the Editor

  1. Click the Share button in the toolbar
  2. Same multi-select user interface as the dashboard

From the CLI

# List all users markdocs users # Share a document markdocs share add <doc-id> @john markdocs share add <doc-id> @jane --role viewer # List who has access markdocs share list <doc-id> # Remove access markdocs share remove <doc-id> <collaborator-id>

From an AI Agent (MCP)

AI agents with MCP access can use the share_document, unshare_document, list_collaborators, and list_users tools.

API Keys

API keys authenticate CLI and MCP requests. They are scoped to the user who created them.

  1. Go to Settings
  2. Click Create API Key
  3. Copy the key — it’s only shown once
  4. Set it as MARKDOCS_API_KEY in your environment
Last updated on