Docs · Reference

MCP server reference

Redtrail is a remote MCP server that lets an agent read and edit the Word document its user has open on SharePoint or OneDrive, in place, as tracked changes, inside the live co-authoring session. This page is the reference an MCP client or directory needs: endpoint, sign-in, scopes, tools and connect snippets.

Before you connect
  • The server edits through the Redtrail add-in in your own Word session. Your Microsoft 365 tenant must have the add-in deployed (or sideloaded for a trial), and you must have a document open with the task pane connected. Otherwise every tool returns an empty document list. See the quickstart.
  • Sign-in is your Microsoft 365 account, through the server's own OAuth 2.1 flow. No Copilot license is involved. Free tier: one document per session.

Endpoint and sign-in

Endpointhttps://redtrail.ai/mcp
TransportStreamable HTTP (MCP 2025-06-18); JSON responses, SSE for long calls
AuthenticationOAuth 2.1 with PKCE. The server is its own authorization server at https://redtrail.ai; Microsoft Entra is the upstream identity provider, so the consent screen is the Microsoft account picker.
Client registrationDynamic client registration at /oauth/register; redirect URIs must be https, loopback http, or a private-use scheme. Rate limited to five registrations per minute per address.
Discovery/.well-known/oauth-protected-resource/mcp and /.well-known/oauth-authorization-server; an unauthenticated call to the endpoint returns 401 with the resource-metadata challenge.
Scopesdocs.read (reads), docs.write (writes, comments, accept and reject), history.read (history queries). Unknown scopes are refused with invalid_scope; a read-only grant gets insufficient_scope on a write.
TokensOne-hour access tokens, rotating refresh tokens with reuse detection. Grants are named after the device and can be revoked from the task pane or by an admin.

Connect from your client

Claude Code

claude plugin install Redtrail
# or, without the plugin's skill and etiquette rules:
claude mcp add --transport http Redtrail https://redtrail.ai/mcp

Claude.ai, Claude Desktop and Cowork

Settings → Connectors → Add custom connector, URL https://redtrail.ai/mcp. The first tool call opens the Microsoft sign-in.

Cursor

{
  "mcpServers": {
    "Redtrail": { "url": "https://redtrail.ai/mcp" }
  }
}

Visual Studio Code

{
  "servers": {
    "Redtrail": { "type": "http", "url": "https://redtrail.ai/mcp" }
  }
}

Codex, Copilot Studio and other clients

Add a remote (streamable HTTP) MCP server with the endpoint URL and OAuth. Any client that implements the MCP authorization flow, including dynamic client registration, connects without further setup. Tenants on Microsoft Agent 365 can register the server as a bring-your-own MCP server; see the quickstart.

Tools

Eighteen tools. Reads are answered immediately. Writes are applied by Word in the user's session as tracked changes, either at once (auto-apply, only while tracking is on) or after the user clicks Apply in the task pane; the call returns status: pending after a short hold rather than blocking.

ToolScopePurpose
doc_listreadDocuments this user has open with the add-in connected: id, title, location, tracking and auto-apply state
doc_outlinereadHeadings with paths, content-control tags, per-section paragraph counts, comment and change counts
doc_readreadText of a scoped region, by anchor, with inline anchors
doc_searchreadSearch hits with anchors (query, occurrence, context hash) and surrounding text
doc_changesreadTracked changes: id, type, author, date, text, anchor
doc_queue_statusreadWhat actually landed: waves, per-change status, conflicts
doc_replacewriteReplace anchored text as a tracked change; carries the expected before-text
doc_insertwriteInsert before, after or inside an anchor as a tracked change
doc_commentwriteAdd a comment anchored to a range
doc_replywriteReply to a comment thread
doc_resolvewriteResolve a comment thread
doc_acceptwriteAccept a tracked change by id
doc_rejectwriteReject a tracked change by id
doc_history_loghistoryAgent change history for a document: who, which agent, when, operation, anchor, verification
doc_history_showhistoryOne history event in full
doc_history_blamehistoryWhich agent events last touched an anchor, across the fork family
doc_history_revertwriteApply the inverse of one event as a new tracked change
doc_history_replaywriteReplay events onto another document, usually a fork

Anchors and verification

Anchors are never paragraph indices. A write targets a content-control tag, a heading path, a search hit with an occurrence index and context hash, a comment id or a tracked-change id. Every write re-resolves its anchor when it runs and carries the text the agent expects to replace. If the current text differs, the write is reported as a conflict with what was expected and what is there now, and nothing is applied. A missing anchor is not_found. Both are recorded in the history as failed events.

What the server expects from an agent

The Claude Code plugin ships these as a skill. Other clients get the same rules from the tool descriptions.

Data handling

The server is a content-blind relay: it routes on envelope headers and never stores document text. Tool calls are executed by Word in the user's session. The optional change history stores events, not copies of the document, encrypted under a key the tenant can hold. Details on the security page; terms and privacy are linked in the footer.