MCP Server

What is MCP?

The Model Context Protocol (MCP) is an open standard that lets AI assistants interact with external tools and data sources. clarife exposes an MCP endpoint that gives AI agents access to your workspace.

MCP Endpoint

https://my.clarife.app/api/v1/mcp

Uses HTTP Streamable transport (POST). Authentication is the same Bearer token used for the REST API.


Setup

Claude Desktop

Edit your claude_desktop_config.json:

json
{
  "mcpServers": {
    "clarife": {
      "url": "https://my.clarife.app/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer clrf_your_key_here"
      }
    }
  }
}

Restart Claude Desktop to load the new server.

Cursor

Create or edit .cursor/mcp.json in your project root:

json
{
  "mcpServers": {
    "clarife": {
      "url": "https://my.clarife.app/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer clrf_your_key_here"
      }
    }
  }
}

Cursor detects the file and loads the server automatically.

Claude Code

Run this command in your terminal:

bash
claude mcp add clarife \
  --transport http \
  https://my.clarife.app/api/v1/mcp \
  --header "Authorization: Bearer clrf_your_key_here"

Team Workspace

To target a specific workspace, add the X-Workspace-Id header:

json
{
  "mcpServers": {
    "clarife": {
      "url": "https://my.clarife.app/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer clrf_your_key_here",
        "X-Workspace-Id": "a1b2c3d4-5678-90ab-cdef-1234567890ab"
      }
    }
  }
}

Available Tools (36)

The MCP server exposes 36 tools that mirror the REST API. Each tool requires the same scopes as its REST counterpart.

Profile

ToolScopeDescription
get_me-Get your profile, plan, usage stats, and API key permissions

Documents

ToolScopeDescription
list_documentsdocuments:readList documents with pagination and filtering
get_documentdocuments:readGet a document with full content and version number
create_documentdocuments:writeCreate a new document
update_documentdocuments:writeUpdate title, description, or content (optional expected_version)
delete_documentdocuments:writeSoft-delete a document (30-day trash)

πŸ’‘ Tip: update_document accepts an optional expected_version field - the version value from the get_document response. If the document changed in the meantime (editor, another tab, another integration), the update fails with a CONFLICT error instead of silently overwriting - re-read the document, re-apply your changes to the fresh content, and retry. Details: Documents API.

Projects

ToolScopeDescription
list_projectsprojects:readList projects
get_projectprojects:readGet project details with document count
create_projectprojects:writeCreate a project
update_projectprojects:writeUpdate a project
delete_projectprojects:writeDelete a project (documents are unlinked, not deleted)
move_projectprojects:writeMove a project to a folder

Folders

ToolScopeDescription
list_foldersprojects:readList folders (filter by entity_type)
get_folderprojects:readGet folder details
create_folderprojects:writeCreate a folder (max 3 nesting levels)
update_folderprojects:writeUpdate a folder
delete_folderprojects:writeDelete a folder (cascade deletes child folders)

Shares

ToolScopeDescription
list_sharesshares:readList share links
get_shareshares:readGet share with view stats
create_shareshares:writeCreate a share link
update_shareshares:writeUpdate share settings
delete_shareshares:writeDelete a share link

Media

ToolScopeDescription
create_media_uploadmedia:writeGet a presigned upload URL
confirm_media_uploadmedia:writeConfirm a completed upload

Workspace

ToolScopeDescription
get_workspace_infoworkspace:readGet workspace details
list_workspace_membersworkspace:readList workspace members

Brandings

ToolScopeDescription
list_brandingsbrandings:readList branding configurations (Business plan)

Knowledge Base

Knowledge Base tools require the Business plan - on Pro they return a PLAN_LIMIT_REACHED error.

ToolScopeDescription
list_knowledge_baseskb:readList your bases
get_knowledge_basekb:readGet a base with categories and entries
update_knowledge_basekb:writeUpdate base settings
create_kb_categorykb:writeCreate a category (tree up to 3 levels)
update_kb_categorykb:writeUpdate a category
delete_kb_categorykb:writeDelete a category
create_kb_entrykb:writeAdd an entry from a share link
update_kb_entrykb:writeUpdate an entry
delete_kb_entrykb:writeDelete an entry

Resources

The MCP server provides documentation resources that AI clients can read to understand document formats and workflows:

Resource URIDescription
clarife://guides/content-formatComplete guide to block types, required fields, and the image upload workflow
clarife://guides/knowledge-baseKnowledge Base publishing workflow (document β†’ share β†’ entry), categories, and limits

πŸ’‘ Tip: AI clients can read clarife://guides/content-format to learn the exact block schema before creating or updating documents. This resource documents all block types (heading, text, screenshot, image, divider, code, table) with required fields and examples.


Example Prompts

Once connected, you can ask your AI assistant things like:

  • "List all my clarife documents"
  • "Create a new document called 'API Integration Guide' with step-by-step instructions"
  • "Upload this screenshot and add it to the setup guide"
  • "Share the onboarding tutorial with a password"
  • "Show me the members of my workspace"
  • "Publish this tutorial to my Knowledge Base, in the Getting started category"

πŸ’‘ Tip: Grant your MCP API key only the scopes the AI assistant needs. For read-only exploration, documents:read and projects:read are enough.