Model Context Protocol (MCP) bridge for Outline (getoutline.com). Enables AI agents to search, read, create, and manage documents, collections, and comments...
---
name: outline-app-mcp
description: Model Context Protocol (MCP) bridge for Outline (getoutline.com). Enables AI agents to search, read, create, and manage documents, collections, and comments in an Outline workspace via SSE transport. Includes local filesystem access for bulk file/media uploads to Outline.
metadata:
version: "1.3.4"
platform: Outline
author: Tinker
transport: Streamable HTTP (SSE)
mcp_version: "1.0.0"
openclaw:
primaryEnv: OUTLINE_API_KEY
requires:
env:
- OUTLINE_API_KEY
- OUTLINE_URL
bins:
- node
- npm
install:
- id: deps
kind: exec
command: npm install
label: Installing Node.js dependencies (@modelcontextprotocol/sdk)
---
# Outline MCP Skill
This skill provides a high-fidelity bridge between OpenClaw and an Outline workspace. It utilizes the **Model Context Protocol (MCP) v1.0.0** to dynamically expose Outline's internal documentation tools to AI agents.
## ⚠️ Security & Permissions Warning
**Host Filesystem Access:**
The `upload` (in `mcp_bridge.mjs`) and `bulk-sync` (in `bulk_sync.mjs`) tools require access to the local host filesystem. These scripts use `fs.readFileSync` to read files from **arbitrary absolute paths** provided by the agent and upload them to the configured Outline workspace.
- **Risk:** If an agent is compromised or misconfigured, it could potentially exfiltrate sensitive local files by providing their absolute paths to these tools.
- **Scope:** Access is limited to the permissions of the user running the OpenClaw process.
- **Recommendation:** Only enable this skill in trusted environments and monitor agent logs for unexpected file access patterns.
## 📋 Prerequisites
Before setting up the skill in OpenClaw, ensure you have completed the following steps in your Outline instance:
1. **Enable AI Features:** Ensure AI features are enabled for your workspace under **Settings** -> **AI**.
2. **Enable MCP:** In the same **AI** settings tab, toggle the **MCP** switch to "On". This enables the Model Context Protocol endpoint for your workspace.
3. **Generate API Key:** Click **Generate API Key** (also in the AI tab). Copy this key immediately as it will only be shown once.
4. **Locate your MCP URL:** Your MCP endpoint is typically your workspace URL with `/mcp` appended (e.g., `https://docs.yourcompany.com/mcp`).
5. **Node.js Environment:** Ensure Node.js (v18+) is installed on your OpenClaw host.
## 🛠️ Setup & Configuration
To use this skill, you must provide your Outline workspace details via environment variables.
### Configuration Commands
```bash
openclaw config set skills.entries.outline-app-mcp.env.OUTLINE_API_KEY "your_ol_api_key"
openclaw config set skills.entries.outline-app-mcp.env.OUTLINE_URL "https://your-workspace.getoutline.com/mcp"
```
## 🧰 API Reference & Detailed Tool Parameters
The following tools are available via the `scripts/mcp_bridge.mjs` executor. All arguments are passed as a JSON object.
### 1. Document Management
#### `list_documents`
Searches documents or lists recent ones.
- `query` (string, optional): Full-text search query.
- `collectionId` (string, optional): Filter by collection.
- `offset` (integer, optional): Pagination offset.
- `limit` (integer, optional): Max results (default 25, max 100).
#### `read_document`
Retrieves the full Markdown content.
- `id` (string, required): Unique identifier of the document.
#### `create_document`
Creates a new document.
- `title` (string, required): Document title.
- `text` (string, optional): Markdown content.
- `collectionId` (string, required if no `parentDocumentId`): Target collection.
- `parentDocumentId` (string, optional): Nest under this document.
- `icon` (string, optional): Emoji icon.
- `color` (string, optional): Hex color (e.g., `#FF0000`).
- `publish` (boolean, optional): Default `true`. Set `false` for draft.
#### `update_document`
Edits an existing document.
- `id` (string, required): Document ID.
- `title` (string, optional): New title.
- `text` (string, optional): New markdown content.
- `editMode` (enum: `replace`, `append`, `prepend`, optional): Default `replace`.
- `collectionId` (string, optional): Required when publishing a draft with no collection.
- `icon` (string/null, optional): Update or remove emoji.
- `color` (string/null, optional): Update or remove hex color.
- `publish` (boolean, optional): Publish draft or revert to draft.
#### `move_document`
Relocates a document.
- `id` (string, required): Document ID.
- `collectionId` (string, optional): Target collection.
- `parentDocumentId` (string, optional): Target parent document.
- `index` (integer, optional): Zero-based position among siblings.
### 2. Collection Management
#### `list_collections`
Lists available collections.
- `query` (string, optional): Filter by name.
- `offset` (integer, optional): Pagination offset.
- `limit` (integer, optional): Max results (max 100).
#### `create_collection`
Creates a new collection.
- `name` (string, required): Collection name.
- `description` (string, optional): Markdown description.
- `icon` (string, optional): Emoji icon.
- `color` (string, optional): Hex color.
#### `update_collection`
Updates collection metadata.
- `id` (string, required): Collection ID.
- `name` (string, optional): New name.
- `description` (string, optional): New description.
- `icon` (string/null, optional): Update or remove icon.
- `color` (string/null, optional): Update or remove color.
### 3. Commenting & Collaboration
#### `list_comments`
Lists comments (requires `documentId` or `collectionId`).
- `documentId` (string, optional): Filter by document.
- `collectionId` (string, optional): Filter by collection.
- `parentCommentId` (string, optional): List only replies to this comment.
- `statusFilter` (array of `resolved`/`unresolved`, optional): Filter by status.
- `offset` (integer, optional): Pagination offset.
- `limit` (integer, optional): Max results.
#### `create_comment`
Adds a comment to a document.
- `documentId` (string, required): Document to comment on.
- `text` (string, required): Markdown content.
- `parentCommentId` (string, optional): Nest as a reply.
#### `update_comment`
Updates or resolves a comment.
- `id` (string, required): Comment ID.
- `text` (string, optional): New markdown text.
- `status` (enum: `resolved`, `unresolved`, optional): Resolve thread.
#### `delete_comment`
Deletes a comment.
- `id` (string, required): Comment ID.
### 4. User Directory
#### `list_users`
Lists workspace members.
- `query` (string, optional): Search by name or email.
- `role` (enum: `admin`, `member`, `viewer`, `guest`, optional): Filter by role.
- `filter` (enum: `active`, `suspended`, `invited`, `all`, optional): Filter by status.
- `offset` (integer, optional): Pagination offset.
- `limit` (integer, optional): Max results.
---
## 🚀 Usage Examples (Common Actions)
### 1. Search for project documentation
```bash
OUTLINE_API_KEY="..." OUTLINE_URL="..." node skills/outline-app-mcp/scripts/mcp_bridge.mjs call "list_documents" '{"query": "Project Roadmap"}'
```
### 2. Create a new status update
```bash
OUTLINE_API_KEY="..." OUTLINE_URL="..." node skills/outline-app-mcp/scripts/mcp_bridge.mjs call "create_document" '{
"title": "Weekly Sync - April 1",
"collectionId": "col_uuid_here",
"text": "# Update\nEverything is on track."
}'
```
### 3. Append a new row to a table (Token Efficient)
```bash
OUTLINE_API_KEY="..." OUTLINE_URL="..." node skills/outline-app-mcp/scripts/mcp_bridge.mjs call "update_document" '{
"id": "doc_uuid_here",
"text": "\n| New Entry | Ready | [Link](url) |",
"editMode": "append"
}'
```
### 4. Bulk Upload Images & Update Document (Power-Tool)
Use the `bulk_sync.mjs` script for unified Turnaround (Upload + Update).
```bash
OUTLINE_API_KEY="..." OUTLINE_URL="..." node skills/outline-app-mcp/scripts/bulk_sync.mjs "bulk-sync" "target_doc_id" "/path/1.png,/path/2.png" "## 🎨 New Media Assets\n{{MEDIA}}\n---\n*Synced via AI Agent*" "append"
```
- **Inputs**:
1. Document ID
2. Comma-separated absolute file paths.
3. **Template Text**: Use `{{MEDIA}}` as a placeholder for uploaded images.
4. **Edit Mode**: `replace`, `append`, or `prepend`.
### 5. Add a Review Comment to a Document
```bash
OUTLINE_API_KEY="..." OUTLINE_URL="..." node skills/outline-app-mcp/scripts/mcp_bridge.mjs call "create_comment" '{
"documentId": "doc_uuid_here",
"text": "Draft is ready for review."
}'
```
### 6. Relocate a document to a new Collection
```bash
OUTLINE_API_KEY="..." OUTLINE_URL="..." node skills/outline-app-mcp/scripts/mcp_bridge.mjs call "move_document" '{
"id": "doc_uuid_here",
"collectionId": "new_collection_uuid"
}'
```
---
## 💡 Best Practices
### 🚀 Token Efficiency & Cost Optimization (Mandatory)
To minimize token consumption and improve responsiveness, **always prefer `append` or `prepend` modes** when adding new information to existing documents.
- **Avoid Full Rewrites:** Do NOT use `replace` mode (default) if you only need to add a new row or section.
- **Bulk Sync for Media:** Always use `bulk_sync.mjs` for uploading multiple images to avoid redundant Turnarounds.
## 📜 Technical Requirements
- **Runtime:** Node.js v18+
- **Protocol:** MCP v1.0.0 (over SSE)
- **Dependency:** `@modelcontextprotocol/sdk` (local)
- **Authentication:** Bearer Token via `OUTLINE_API_KEY`
- **Transport:** `StreamableHTTPClientTransport` (POST-based SSE)
don't have the plugin yet? install it then click "run inline in claude" again.
added explicit decision points for common failure modes and conditional paths, detailed input/output contracts for each tool with json schema reference, outcome signals for verification, edge case handling (rate limits, auth expiry, missing files, empty results), and clarified external connection requirements with mcp endpoint details.
use this skill to bridge your outline workspace into an ai agent's context via model context protocol (mcp). the skill lets agents search documents, read markdown, create and edit pages, manage collections, add comments, and bulk upload images. run this when you want ai to reason over or modify your outline docs in real-time, or when you need to push local files into outline at scale.
environment variables (required):
OUTLINE_API_KEY: API key generated from your outline workspace settings > AI tab. Single-use during generation, store securely. expires if workspace member loses access.OUTLINE_URL: Your outline workspace MCP endpoint. typically https://your-workspace.getoutline.com/mcp. verify the /mcp path exists and MCP is toggled "on" in outline settings > AI.local system requirements:
@modelcontextprotocol/sdk.upload or bulk-sync tools (runs as the user executing the process).outline workspace setup (one-time):
/mcp endpoint.external connection: outline api (mcp endpoint).
authorization: bearer <OUTLINE_API_KEY> header.install dependencies. run npm install in the skill directory. this fetches @modelcontextprotocol/sdk and other node modules required by mcp_bridge.mjs and bulk_sync.mjs.
node_modules/ directory created, package-lock.json written.set environment variables. export or configure OUTLINE_API_KEY and OUTLINE_URL in your openclaw process environment. verify they are accessible to the node process that will run the scripts.
call mcp_bridge.mjs with a tool name and json arguments. syntax: node scripts/mcp_bridge.mjs call "<tool_name>" '<json_args>'.
for document search/list: call list_documents with optional query, collectionId, offset, limit. if query is empty, returns recent documents.
for document read: call read_document with id. retrieves full markdown content from outline.
for document create: call create_document with title, optional text, required collectionId or parentDocumentId, optional icon/color, optional publish flag (default true).
for document edit: call update_document with id, optional title/text, optional editMode (replace/append/prepend, default replace), optional collectionId (required if publishing draft with no collection), optional icon/color, optional publish flag.
for document move: call move_document with id, optional collectionId or parentDocumentId, optional index (zero-based position among siblings).
for collection list: call list_collections with optional query, offset, limit.
for collection create: call create_collection with name, optional description, icon, color.
for collection update: call update_collection with id, optional name, description, icon, color.
for comment list: call list_comments with optional documentId or collectionId, optional parentCommentId, optional statusFilter (array of resolved/unresolved), optional offset, limit.
for comment create: call create_comment with required documentId, required text, optional parentCommentId (for replies).
for comment update: call update_comment with id, optional text, optional status (resolved/unresolved).
for comment delete: call delete_comment with id.
for user directory list: call list_users with optional query, role (admin/member/viewer/guest), filter (active/suspended/invited/all), offset, limit.
for bulk file upload and document update (advanced): call bulk_sync.mjs with syntax: node scripts/bulk_sync.mjs bulk-sync "<doc_id>" "<comma-separated-file-paths>" "<template_text>" "<edit_mode>". the script uploads each file to outline, captures media urls, substitutes {{MEDIA}} placeholder in template_text, then updates the document using the specified edit mode.
if outline MCP is not enabled in workspace settings: the API will return 401 unauthorized or MCP endpoint will not exist. verify settings > AI tab has MCP toggled "on" before attempting any tool calls.
if API key is missing, invalid, or expired: outline will respond with 401 unauthorized. regenerate a new API key in settings > AI tab and update OUTLINE_API_KEY env var.
if OUTLINE_URL is malformed or the workspace is unreachable: the http connection will time out or fail with a network error. verify the URL includes the /mcp path and the workspace is online.
if a document query returns empty results: the list_documents tool will return an empty array. either refine the search query, check the collectionId filter, or create the document first.
if you want to add content without rewriting the entire document: use update_document with editMode: "append" or editMode: "prepend" instead of the default replace. this preserves existing content and is more token-efficient.
if you need to upload multiple images and update a document in one call: use the bulk_sync.mjs script instead of separate upload and update calls. it batches the operations and reduces round-trips.
if file paths passed to upload or bulk_sync do not exist or are not readable: the script will throw a filesystem error. verify absolute paths are correct and the process user has read permission on those files.
if outline rate-limits your requests (429 response): back off exponentially (e.g., 1s, 2s, 4s) and retry. the skill does not implement automatic retry logic, so the calling agent must handle this.
if a comment is created on a document and later the document is deleted: the comment orphan behavior depends on outline's data model. verify the document exists before adding comments.
if you attempt to move a document to a collection it already belongs to: outline will still accept the move and may not change the document's state. confirm the target collectionId is different.
if publishing a draft document without providing a collectionId: the API requires either collectionId or it must already have one set. provide collectionId when publishing a draft for the first time.
tool responses are json objects. each tool returns a json object conforming to outline's api schema. specific contracts:
list_documents: array of document objects. each has id (string), title (string), collectionId (string), updatedAt (iso8601), createdBy (user object).read_document: markdown string (the full document body).create_document: document object with id, url, createdAt, title, collectionId.update_document: updated document object with same fields as create response.move_document: document object with updated parentDocumentId and/or collectionId.list_collections: array of collection objects with id, name, icon, color, documentCount.create_collection: collection object with id, url, createdAt.update_collection: updated collection object.list_comments: array of comment objects with id, text, status (resolved/unresolved), createdBy, createdAt.create_comment: comment object with id, url, createdAt, documentId.update_comment: updated comment object.delete_comment: http 204 no content on success, or error json on failure.list_users: array of user objects with id, name, email, role (admin/member/viewer/guest), status (active/suspended/invited).bulk_sync: updated document object with markdown body containing resolved media urls (placeholders replaced with actual image links).errors: on api failure, tools return http error codes (401, 404, 429, 500) with json error body. the calling process should parse and handle these.
file locations: uploaded media from bulk_sync is stored in outline's cdn/attachment service. the returned document markdown will contain outline-generated urls pointing to these assets.
list_documents: you receive an array of documents matching your query. verify the count, titles, and collectionIds match what you see in the outline ui.read_document: you get markdown text matching the outline document preview. copy a section and verify it matches the ui to confirm freshness.create_document: the new document appears in the outline ui under the specified collection or parent. refresh the browser if needed.update_document: the document content updates in outline. open it in the ui and verify the new text, icon, or color is visible.move_document: the document relocates to the new collection/parent in the outline sidebar and search results.create_collection: a new collection appears in the outline left sidebar and is selectable when creating documents.list_comments or create_comment: comments appear in the outline document comments panel. if you created a comment, refresh the ui to see it.list_users: you see a list of workspace members. filter by role or status and verify counts match your workspace member list.bulk_sync: the target document updates with the markdown template and embedded image urls. open the document in outline and verify images render and links are valid.credits: original skill authored by tinker. enriched per implexa standards with explicit decision points, edge case handling, and detailed input/output contracts.