1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6624],{4564:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>c,toc:()=>a});var t=s(5893),i=s(1151);const r={sidebar_position:14,tags:["business","enterprise"]},o="MCP",c={id:"user-guide/mcp",title:"MCP",description:"Docmost provides a Model Context Protocol (MCP) server that allows AI assistants and tools to interact with your workspace content. Through MCP, AI clients can search, read, create, and update pages, manage spaces, and more.",source:"@site/docs/user-guide/mcp.md",sourceDirName:"user-guide",slug:"/user-guide/mcp",permalink:"/docs/user-guide/mcp",draft:!1,unlisted:!1,editUrl:"https://github.com/docmost/docs/edit/main/docs/user-guide/mcp.md",tags:[{label:"business",permalink:"/docs/tags/business"},{label:"enterprise",permalink:"/docs/tags/enterprise"}],version:"current",sidebarPosition:14,frontMatter:{sidebar_position:14,tags:["business","enterprise"]},sidebar:"tutorialSidebar",previous:{title:"API",permalink:"/docs/user-guide/api"},next:{title:"Multi-Factor Authentication (MFA)",permalink:"/docs/user-guide/mfa"}},d={},a=[{value:"Enabling MCP (Admin)",id:"enabling-mcp-admin",level:2},{value:"Connecting with OAuth",id:"connecting-with-oauth",level:2},{value:"claude.ai",id:"claudeai",level:3},{value:"ChatGPT",id:"chatgpt",level:3},{value:"Claude Code",id:"claude-code",level:3},{value:"Cursor, VS Code, and other clients",id:"cursor-vs-code-and-other-clients",level:3},{value:"Managing authorized applications",id:"managing-authorized-applications",level:2},{value:"Requiring OAuth (Admin)",id:"requiring-oauth-admin",level:2},{value:"Connecting with an API key",id:"connecting-with-an-api-key",level:2},{value:"Claude Desktop",id:"claude-desktop",level:3},{value:"Claude Code",id:"claude-code-1",level:3},{value:"Cursor",id:"cursor",level:3},{value:"Supported Tools",id:"supported-tools",level:2},{value:"Pages",id:"pages",level:3},{value:"Spaces",id:"spaces",level:3},{value:"Comments",id:"comments",level:3},{value:"Other",id:"other",level:3},{value:"Permissions",id:"permissions",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"mcp",children:"MCP"}),"\n",(0,t.jsxs)(n.p,{children:["Docmost provides a ",(0,t.jsx)(n.a,{href:"https://modelcontextprotocol.io/",children:"Model Context Protocol (MCP)"})," server that allows AI assistants and tools to interact with your workspace content. Through MCP, AI clients can search, read, create, and update pages, manage spaces, and more."]}),"\n",(0,t.jsx)(n.p,{children:"Most clients connect with OAuth: you sign in to Docmost, choose what the app may do, and no credentials are copied around. An API key remains available for clients that do not support OAuth, unless your admin has turned that off."}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"A valid Business or Enterprise license is required to unlock this feature."})}),"\n",(0,t.jsx)(n.h2,{id:"enabling-mcp-admin",children:"Enabling MCP (Admin)"}),"\n",(0,t.jsx)(n.p,{children:"MCP must be enabled by a workspace admin before it can be used."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Go to ",(0,t.jsx)(n.strong,{children:"Settings"})," > ",(0,t.jsx)(n.strong,{children:"AI settings"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Click the ",(0,t.jsx)(n.strong,{children:"MCP"})," tab."]}),"\n",(0,t.jsx)(n.li,{children:"Toggle the MCP switch on."}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"MCP Server URL"})," is displayed. It follows the format: ",(0,t.jsx)(n.code,{children:"https://YOUR_DOCMOST_URL.com/mcp"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Once enabled, any workspace member can connect their AI tools to the MCP server."}),"\n",(0,t.jsx)(n.h2,{id:"connecting-with-oauth",children:"Connecting with OAuth"}),"\n",(0,t.jsx)(n.p,{children:"Give your client the MCP server URL and it will handle the rest: it registers itself, sends you to Docmost to sign in, and asks you to authorize it."}),"\n",(0,t.jsx)(n.p,{children:"On the authorization screen you choose what the application may do:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Permission"}),(0,t.jsx)(n.th,{children:"Meaning"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"Read"})}),(0,t.jsx)(n.td,{children:"View content without making changes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"Write"})}),(0,t.jsx)(n.td,{children:"Create and modify content"})]})]})]}),"\n",(0,t.jsxs)(n.p,{children:["Both are selected by default. Clearing ",(0,t.jsx)(n.strong,{children:"Write"})," connects the app in read-only mode, and it will only see the read tools."]}),"\n",(0,t.jsx)(n.p,{children:"An application can never do more than your own account can. It acts as you, so space and page permissions still apply."}),"\n",(0,t.jsx)(n.h3,{id:"claudeai",children:"claude.ai"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Go to ",(0,t.jsx)(n.strong,{children:"Settings"})," > ",(0,t.jsx)(n.strong,{children:"Connectors"})," > ",(0,t.jsx)(n.strong,{children:"Add custom connector"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Enter your MCP server URL: ",(0,t.jsx)(n.code,{children:"https://YOUR_DOCMOST_URL.com/mcp"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Connect"})," and authorize the connector in the Docmost window that opens."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"chatgpt",children:"ChatGPT"}),"\n",(0,t.jsx)(n.p,{children:"Custom MCP plugins require a paid ChatGPT plan and work on the web only."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Go to ",(0,t.jsx)(n.strong,{children:"Settings"})," > ",(0,t.jsx)(n.strong,{children:"Security and login"})," and turn on ",(0,t.jsx)(n.strong,{children:"Developer mode"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Open ",(0,t.jsx)(n.a,{href:"https://chatgpt.com/plugins",children:"chatgpt.com/plugins"})," and click the ",(0,t.jsx)(n.strong,{children:"+"})," button."]}),"\n",(0,t.jsxs)(n.li,{children:["Enter a name and description, set the connection to your MCP server URL: ",(0,t.jsx)(n.code,{children:"https://YOUR_DOCMOST_URL.com/mcp"}),", and set authentication to ",(0,t.jsx)(n.strong,{children:"OAuth"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Create"}),". Docmost opens in a new window for you to sign in and authorize the connection."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"claude-code",children:"Claude Code"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"claude mcp add Docmost --transport http https://YOUR_DOCMOST_URL.com/mcp\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Run ",(0,t.jsx)(n.code,{children:"/mcp"})," inside Claude Code to start the login flow, then authorize Docmost in y
1our browser."]}),"\n",(0,t.jsx)(n.h3,{id:"cursor-vs-code-and-other-clients",children:"Cursor, VS Code, and other clients"}),"\n",(0,t.jsx)(n.p,{children:"Add the MCP server URL to the client's MCP configuration. Any client that supports remote MCP servers with OAuth will prompt you to sign in on first use."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "mcpServers": {\n "docmost": {\n "url": "https://YOUR_DOCMOST_URL.com/mcp"\n }\n }\n}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"managing-authorized-applications",children:"Managing authorized applications"}),"\n",(0,t.jsxs)(n.p,{children:["Applications you authorize appear under ",(0,t.jsx)(n.strong,{children:"Settings"})," > ",(0,t.jsx)(n.strong,{children:"API keys"})," > ",(0,t.jsx)(n.strong,{children:"Authorized apps"}),", showing the permissions granted, when you authorized the app, and when it was last used."]}),"\n",(0,t.jsx)(n.p,{children:"Click the delete icon to revoke access. The application loses access immediately and must be authorized again to reconnect."}),"\n",(0,t.jsx)(n.p,{children:"You stay connected as long as the application keeps using its access. Access tokens are short lived and renewed automatically; an application that goes unused for 30 days must be authorized again. Resetting your password also revokes every application you have authorized."}),"\n",(0,t.jsx)(n.h2,{id:"requiring-oauth-admin",children:"Requiring OAuth (Admin)"}),"\n",(0,t.jsx)(n.p,{children:"Admins can require every MCP client to connect through OAuth."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Go to ",(0,t.jsx)(n.strong,{children:"Settings"})," > ",(0,t.jsx)(n.strong,{children:"AI settings"})," > ",(0,t.jsx)(n.strong,{children:"MCP"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Turn on ",(0,t.jsx)(n.strong,{children:"Enforce OAuth"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"With this on, API keys are rejected by the MCP server. Clients that support OAuth are sent through the sign-in flow instead; clients configured with an API key stop working until they are reconnected."}),"\n",(0,t.jsx)(n.h2,{id:"connecting-with-an-api-key",children:"Connecting with an API key"}),"\n",(0,t.jsxs)(n.p,{children:["For clients that do not support OAuth, you can authenticate with a personal API key. This option is unavailable when ",(0,t.jsx)(n.strong,{children:"Enforce OAuth"})," is on."]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Go to ",(0,t.jsx)(n.strong,{children:"Settings"})," > ",(0,t.jsx)(n.strong,{children:"API keys"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Create API Key"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"Copy the key and store it securely. It cannot be viewed again."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"The key is sent as a Bearer token in the Authorization header. Unlike OAuth, an API key is not limited to read or write permissions; it can do anything your account can do through the API."}),"\n",(0,t.jsx)(n.h3,{id:"claude-desktop",children:"Claude Desktop"}),"\n",(0,t.jsxs)(n.p,{children:["Add the following to your Claude Desktop configuration file (",(0,t.jsx)(n.code,{children:"claude_desktop_config.json"}),"):"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "mcpServers": {\n "docmost": {\n "command": "npx",\n "args": [\n "-y",\n "mcp-remote",\n "https://YOUR_DOCMOST_URL.com/mcp",\n "--header",\n "Authorization: Bearer YOUR_API_KEY"\n ]\n }\n }\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Replace ",(0,t.jsx)(n.code,{children:"https://YOUR_DOCMOST_URL.com"})," with your Docmost instance URL and ",(0,t.jsx)(n.code,{children:"YOUR_API_KEY"})," with your API key."]}),"\n",(0,t.jsx)(n.h3,{id:"claude-code-1",children:"Claude Code"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'claude mcp add Docmost --transport http https://YOUR_DOCMOST_URL.com/mcp --header "Authorization: Bearer YOUR_API_KEY"\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Or using ",(0,t.jsx)(n.code,{children:"mcp-remote"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'claude mcp add docmost -- npx -y mcp-remote https://YOUR_DOCMOST_URL.com/mcp --header "Authorization: Bearer YOUR_API_KEY"\n'})}),"\n",(0,t.jsx)(n.h3,{id:"cursor",children:"Cursor"}),"\n",(0,t.jsxs)(n.p,{children:["Add the following to your Cursor MCP configuration (",(0,t.jsx)(n.code,{children:".cursor/mcp.json"}),"):"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "mcpServers": {\n "docmost": {\n "command": "npx",\n "args": [\n "-y",\n "mcp-remote",\n "https://YOUR_DOCMOST_URL.com/mcp",\n "--header",\n "Authorization: Bearer YOUR_API_KEY"\n ]\n }\n }\n}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"supported-tools",children:"Supported Tools"}),"\n",(0,t.jsx)(n.p,{children:"The MCP server exposes the following tools:"}),"\n",(0,t.jsx)(n.h3,{id:"pages",children:"Pages"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Tool"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"search_pages"})}),(0,t.jsx)(n.td,{children:"Search for pages by keyword"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"get_page"})}),(0,t.jsx)(n.td,{children:"Get the content of a specific page"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"create_page"})}),(0,t.jsx)(n.td,{children:"Create a new page in a space"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"update_page"})}),(0,t.jsx)(n.td,{children:"Update an existing page's title or content"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"list_pages"})}),(0,t.jsx)(n.td,{children:"List recent pages in a space"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"list_child_pages"})}),(0,t.jsx)(n.td,{children:"List child pages of a specific page"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"duplicate_page"})}),(0,t.jsx)(n.td,{children:"Duplicate a page within its space"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"copy_page_to_space"})}),(0,t.jsx)(n.td,{children:"Copy a page to a different space"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"move_page"})}),(0,t.jsx)(n.td,{children:"Move a page to a different position or parent"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"move_page_to_space"})}),(0,t.jsx)(n.td,{children:"Move a page to a different space"})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"spaces",children:"Spaces"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Tool"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"get_space"})}),(0,t.jsx)(n.td,{children:"Get details of a specific space"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"list_space
1s"})}),(0,t.jsx)(n.td,{children:"List all spaces you have access to"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"create_space"})}),(0,t.jsx)(n.td,{children:"Create a new space"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"update_space"})}),(0,t.jsx)(n.td,{children:"Update a space's name or description"})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"comments",children:"Comments"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Tool"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"get_comments"})}),(0,t.jsx)(n.td,{children:"Get comments on a page"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"create_comment"})}),(0,t.jsx)(n.td,{children:"Add a comment to a page"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"update_comment"})}),(0,t.jsx)(n.td,{children:"Update an existing comment"})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"other",children:"Other"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Tool"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"search_attachments"})}),(0,t.jsx)(n.td,{children:"Search for file attachments across the workspace"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"list_workspace_members"})}),(0,t.jsx)(n.td,{children:"List members of the workspace"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"get_current_user"})}),(0,t.jsx)(n.td,{children:"Get details of the authenticated user"})]})]})]}),"\n",(0,t.jsx)(n.p,{children:"Applications authorized with read-only permission see only the tools that read content. API keys have access to all tools."}),"\n",(0,t.jsx)(n.h2,{id:"permissions",children:"Permissions"}),"\n",(0,t.jsx)(n.p,{children:"MCP respects the same permissions as the Docmost web application. The connected user can only access spaces and pages they have permission to view or edit. Actions like creating or updating pages require the appropriate write permissions."})]})}function h(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>c,a:()=>o});var t=s(7294);const i={},r=t.createContext(i);function o(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.