MCP

Guides

MCP

The CLI is the better way to connect an agentOver MCP, every read and write is a call to the server. There is no local sync: no folder of your docs on disk, so an agent can't search them in milliseconds with grep or read whole files straight from disk, and nothing works offline. If your agent runs on a machine where it can use the sharedoc CLI and a synced folder (Claude Code, or any agent with a shell), use that. MCP is for where the CLI can't go: Claude in claude.ai or Cowork, whose sandbox can't reach share-doc and starts fresh each task.

share-doc is an MCP server. Add https://sharedoc.brightmotion.io/mcp as a connector and Claude can list, read, write, comment, post and search in your workspaces, with no CLI installed. You sign in once, and the connection stays with your Claude account.

claude.ai, Claude Desktop and Cowork#

  1. Open Settings → Connectors and choose Add custom connector.
  2. Name it share-doc and paste https://sharedoc.brightmotion.io/mcp as the URL. Leave the OAuth fields empty.
  3. Choose Connect. A share-doc page opens: tick the workspaces Claude may use, pick read or write, and choose Connect.

On a Team or Enterprise plan an owner adds the connector once; each member then connects their own share-doc account.

Claude Code#

claude mcp add --transport http sharedoc https://sharedoc.brightmotion.io/mcp

Then run /mcp in Claude Code and choose Authenticate. For CI and headless runs, pass a CLI token instead of signing in (mint one under Settings → CLI access):

claude mcp add --transport http sharedoc https://sharedoc.brightmotion.io/mcp --header "Authorization: Bearer sdcli_…"

What a connection may do#

  • It is you, in the workspaces you ticked. Every call runs with your permissions, as the CLI's do. A read connection never sees a tool that writes; reconnect with write ticked to change that.
  • Deleting asks twice. Claude asks you before the delete tool runs, and the tool itself only says what it would do until it is called again with confirm: true.
  • Its writes say so. A doc edit, a comment or a post reads you · via Claude (opus-5.5), and the doc's history marks it as made through MCP.
  • You can see and end it. Each connection is listed under Settings → CLI access (and in sharedoc tokens list), with when it was last used. Revoke it there.

Usage data: the consent page asks whether to share which tools are used and whether they worked. Never the names, paths or text in a call.

Tools#

One tool per area; an action argument names the CLI command, spelled as the CLI spells it (files_get { action: "files history", project, path }). Each command's arguments and output are the ones in the CLI reference.

ToolKindActions
whoami
Who am I
readwhoami · tokens list · status · schema
workspaces_get
Read workspaces and projects
readworkspaces list · workspaces show · projects list · projects show · statuses list
people_get
Read members and access
readmembers list · invites list · invite links · invite copy · access list · access shared
files_cat
Read a file
readfiles cat
files_get
List files and history
readfiles list · files links · files history · files diff · files url · files backlinks
docs_find
Find docs by property
readdocs list · docs query
search
Search
readsearch
threads_get
Read threads
readthreads list · thread show
chat_get
Read channels
readchannels list · channel history · channel invites · huddles list
drafts_get
Read drafts
readdrafts list · draft show · draft set show
activity
Read activity
readevents tail · unread
slack_get
Read Slack connections
readslack list · slack status · slack people · slack file
sync_get
Read sync connections
readsync endpoints · devices list
files_put
Write a file
writefiles put
files_edit
Edit a doc
writeReplace exact text in a markdown doc: old_string must match once (or pass replace_all). The hub merges it into concurrent edits.
files_update
Update files
writefiles status · files assign · files mv · files reopen
workspaces_update
Manage workspaces and projects
writeprojects create · projects rename · projects visibility · workspaces rename · workspaces icon · statuses add · statuses rm · statuses mv · statuses edit · statuses inherit
people_update
Manage members and access
writemembers add · members invite · members role · invites resend · invite link · access set · access invite · status set · status clear
thread_create
Start a thread
writethread create
thread_reply
Reply in a thread
writethread reply
threads_update
Update threads
writethread relabel · thread resolve · thread reopen · thread follow · thread unfollow · thread edit · react
channel_post
Post a message
writechannel post · dm
channels_update
Manage channels
writechannels create · channels add · channels join · channels leave · channel share · channel accept · channel approve
drafts_update
Write drafts
writedraft create · draft edit · draft variant add
notifications_update
Update notifications
writeunread read · unread ack · notify prefs
slack_update
Manage Slack links
writeslack links · slack dm
sync_update
Manage sync connections
writesync pause · sync resume · sync approve · sync discard · sync undo · sync folders · folders settings · devices rename
sharedoc_delete
Delete or archive
asks firstfiles archive · projects delete · workspaces delete · members remove · invites revoke · invite revoke · invite replace · access remove · thread delete · channels archive · channels delete · channel disconnect · draft delete · draft set dismiss · draft variant rm · sync disconnect · devices disconnect · slack disconnect · tokens revoke

Limits#

  • A long doc comes back in pieces: the result says which lines it holds and where to go on (from_line).
  • A picture comes back as its thumbnail; other files as a link to download.
  • files_put takes up to 5 MB; bigger files need the CLI.
  • Anything that works on a folder on your machine — sync add, connect, share — stays in the CLI.