mcp-server-outline
This server gives MCP clients read and optional write access to an Outline knowledge base/wiki through Outline's API.
Search and read: ranked document search with filters; list recent/draft/archived/trash documents; fetch a document or full Markdown body; list collections, collection document trees, comments, and revisions; check identity/workspace and capabilities.
Write, opt-in with
OUTLINE_ENABLE_WRITES=true: create/update documents (replace or append), move documents, archive/restore, soft-delete to Trash, create comments, and create/update collections.Safety limits: no permanent document deletion or empty-trash, no collection deletion, no user deletion; document deletion is recoverable only. Access is limited by the Outline token's user permissions.
Run modes: stdio or authenticated HTTP transport with
/healthz, and in-process gateway embedding with per-instance policy, audit, and write controls.
Provides tools for interacting with Outline's API, enabling searching, reading, writing documents, managing collections and comments on an Outline knowledge base.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-outline search for onboarding documents in the Engineering collection"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-outline
MCP server for the Outline knowledge base / wiki API. Works against any self-hosted or cloud Outline instance.
This is an independent, unofficial project. It is not developed, endorsed or supported by Outline.
Tools
Read: outline_search (ranked full-text with context snippets; filter by collection/status/date/author), outline_list_documents (recent/drafts/archived/trash), outline_get_document (info or full Markdown export), outline_list_collections, outline_get_collection (+ document tree), outline_list_comments, outline_list_revisions, outline_whoami, outline_search_capabilities.
Write (opt-in via OUTLINE_ENABLE_WRITES=true): outline_create_document, outline_update_document (replace or append), outline_move_document, outline_archive_document (archive/restore), outline_delete_document (soft-delete to Trash only), outline_create_comment, outline_manage_collection (create/update).
Deliberately not exposed: collections.delete (cascading permanent delete of every document inside), permanent document deletion / documents.empty_trash, and user deletion. Document deletion is always the recoverable soft-delete.
Related MCP server: mcp-outline
Auth
Bearer API token (Outline → Settings → API → Create). The token inherits its creating user's document/collection permissions — create a dedicated service user per instance with the right collection access. Tokens are per-instance.
Configuration
See .env.example. Required: OUTLINE_BASE_URL (the server appends /api), OUTLINE_API_TOKEN. Optional: OUTLINE_TIMEOUT_MS (1-600000, default 30000), OUTLINE_ENABLE_WRITES, OUTLINE_AUDIT_LOG. The HTTP transport checks the Outline configuration at startup and exits if it is missing or invalid.
API method names are restricted to the collection.method form, so caller input is never placed in the URL path. Requests to Outline never follow redirects, so the token is not re-sent to another location. Outline's error bodies are never read: an error is our own text, starting with Outline API request failed with HTTP <status>.
HTTP transport
Variable | Default | Meaning |
|
| Bind address. |
|
| Listen port (1-65535). |
| unset | Bearer token required on |
|
| Start without a token on a non-loopback bind anyway (only when access is restricted by other means). |
| localhost origins | Comma-separated exact |
|
| Allow any |
| see meaning | Comma-separated host names accepted in the |
|
| Maximum request body size. |
|
| Failed authentication attempts per client address and window before further failures get HTTP 429; |
|
| Window for the limit above. |
Invalid numeric or boolean values stop the server at startup with a message
naming the variable. GET /healthz answers {"status":"ok"} without
authentication, for container health checks.
Embedding (./gateway)
mcp-server-outline/gateway lets a host application run the tools in-process
instead of over MCP, in the same shape as mcp-server-template. One process
can run several gateway instances, for example one per tenant.
import { createOutlineGateway, normalizeOutlineBaseUrl, outlineToolCatalog } from 'mcp-server-outline/gateway';
// Before storing an address a customer typed: throws GatewayConfigError, or returns https://<host>.
const baseUrl = normalizeOutlineBaseUrl(input.address);
const gateway = createOutlineGateway({
apiToken: tenant.outlineKey,
baseUrl,
policy: { enableWrites: true, audit: record => log(record) },
});
const result = await gateway.callTool('search_documents', { query: 'onboarding' }, { caller: 'user-1' });The module exports:
createOutlineGateway({ apiToken, baseUrl, fetchImpl?, timeoutMs?, resolveHost?, policy? }).apiTokenis an Outline API key (sent asAuthorization: Bearer),baseUrlthe customer's Outline address: Outline Cloud (https://<team>.getoutline.com, orhttps://app.getoutline.com) or a self-hosted https address; the client adds/api. Both are required and never read from the environment. The gateway reads noOUTLINE_*variable at all: notOUTLINE_API_TOKEN,OUTLINE_BASE_URL,OUTLINE_ENABLE_WRITES(the host's policy decides),OUTLINE_TIMEOUT_MS(default 30 seconds) orOUTLINE_AUDIT_LOG. Every call runs as the user who owns the key, with that user's Outline permissions (and the key's scopes, where the key has any). Per-person rights are the host's business.normalizeOutlineBaseUrl(url): a pure check a host can run before it stores an address. It returnshttps://<host>(lower case, no trailing slash or dot) or throwsGatewayConfigErrorwith a message startingOutline address refused:(ADDRESS_REFUSED) that never quotes the value. Refused: anything buthttps://, a user name or password, a port, a path, a query string or a fragment, an IP address,localhostand local or single-label names (.local,.internal,.lan,.home.arpa, ...).gateway.tools(the tools enabled on the instance) andgateway.callTool(name, input, { caller, requestId }). Names are accepted with or without theoutline_prefix. Input is validated with the tool's zod schema before anything is sent, and unknown fields are refused. The audit records of a call holdcalleronly as an HMAC pseudonym (a per-process key) and a request id of the server's own; the host'srequestIdis not written. An error is recorded as a fixed code (http_<status>,timeoutorerror), never as its message.outlineGatewayTools: the definitions (namewithout prefix,title,description,riskLevel,enabledByDefault,inputSchemaas JSON Schema derived from the zod schema the call is validated with).outlineToolCatalog: the same tools, deeply frozen, withupstream(method and path of every Outline request the tool may make) andbroad(no Outline tool is broad).GatewayConfigError,KEY_REFUSED,ADDRESS_REFUSED,PRIVATE_ADDRESS_REFUSEDand the types (OutlineGatewayOptions,OutlineGateway,InstancePolicy,AuditSink,GatewayToolDefinition,GatewayToolCatalogEntry,GatewayUpstreamOperation,GatewayToolResult,GatewayCallContextand the JSON types such asGatewayJsonObject).
Outline's API is RPC over HTTP: every request is a POST to
/api/<resource>.<method>, reads included.
Tool | Risk | Default | Input | Outline requests (on |
| read | on |
| none |
| read | on | none |
|
| read | on |
|
|
| read | on |
|
|
| read | on |
|
|
| read | on |
|
|
| read | on |
|
|
| read | on |
|
|
| read | on |
|
|
| write | off |
|
|
| write | off |
|
|
| write | off |
|
|
check_connection returns the user's id, name and role and the workspace's
id and name, no email address. get_document returns the text as Markdown;
the list tools return documents without their text, and list_revisions
returns who saved which title when, without the text of each version. Lists
return { items, offset, limit, hasMore } (at most 100 per page). Results
hold a fixed set of fields per object: share links, policies, email
addresses, avatars and fields Outline adds later are left out.
create_document creates a draft unless publish is true.
update_document adds text to the end of the document unless textMode is
"replace"; Outline keeps the earlier version in the document's history.
There are no tools that delete, archive, restore or move documents, or that
create, change or share collections, and no raw API call. Each tool gets a
client view that refuses any Outline method it does not declare. The MCP
server's own tools (outline_delete_document, outline_manage_collection,
...) are unchanged.
Address and network. Every connection goes only to public addresses:
the host name is resolved and every address must be public unicast
(private, loopback, link-local, carrier-grade NAT, unique local, metadata
and documentation ranges, and IPv4 embedded in IPv6 are refused). With the
built-in fetch the check runs in the connection's own lookup, so the address
checked is the address used (DNS rebinding is checked per connection). With
a host fetchImpl the name is checked before every request. A refusal
happens at the call, not at construction, as an error result
Refused: the Outline address points to a private or local network address.
(PRIVATE_ADDRESS_REFUSED); a name that does not resolve gives
Network error calling the Outline API (ENOTFOUND). Redirects are never
followed, and a throttled request (HTTP 429) is not retried.
Instance policy. With policy: { enableWrites, disabledTools, audit }
the host decides the instance's policy: write tools run only with
enableWrites: true; disabled tools are left out of tools (and out of
search_capabilities) and refused when called; audit records go to audit
(none without it). disabledTools must name gateway tools. A sink that
throws on a start record refuses the call. Without policy the instance uses
the default policy (no writes, no disabled tools, no audit records). Every
call runs in a call scope of its own (AsyncLocalStorage), so a call made from
inside another instance's call never inherits its policy, sink, redactor or
caller. There is no process-wide registry of secrets.
Results. A successful result is a short English summary line, a blank
line and the data as compact JSON, exactly equal to structuredContent. The
data is redacted twice before it is serialised: credential-shaped text
(Authorization headers, Bearer and Basic values, Outline API keys, JSON Web
Tokens, credential assignments) and the value of credential-named fields are
masked, and the instance's key (exact, encoded, and any piece of 6
characters or more, in strings, keys and the string form of numbers) is
replaced by ‹redacted›. An answer from Outline that is not JSON is refused.
Errors. An error result carries our own English text, never Outline's
response body or message, a redirect's Location or the configured address.
An HTTP failure starts with Outline API request failed with HTTP <status>,
followed by our own hint (400, 401, 403, 404, 429) and the parsed
retry-after where there is one. Other errors start with
Invalid input for <tool>:, Unsupported Outline gateway tool.,
Outline API responded with a redirect (HTTP <status>),
Network error calling the Outline API, Outline API request timed out after,
Outline answered with something that is not JSON, Refused: the Outline address points to a private or local network address., or a policy
refusal (writes are disabled. ..., tool is disabled on this instance by the embedding host: <tool>). When Outline answered with an HTTP error (a
refused redirect included), the error result also has failure: { httpStatus, requestId? }: the status, and
Outline's request id from a response header (REQUEST_ID_HEADERS in
src/errors.ts) only when it is a hex id of 8 to 64 characters (one run of
hex digits, or groups of four or more joined by single hyphens, as in a
UUID) and does not hold the shape of a personal number. A host can count
failures from it without reading their text. Never the response body,
Outline's error code or message.
Key admission and the sink check. A gateway accepts only a key of
printable ASCII (0x21-0x7E) of at least 16 characters that shares no piece of
6 characters with a string literal in src/ (src/fixed-corpus.generated.ts,
kept up to date by a test), with the fixed fallbacks (src/fallbacks.ts) or
with the tool list. No text in src/ shares a piece with the prefix of
Outline's keys and what follows it (a test checks this), so a real Outline
key is never refused for its prefix. A refused key throws
GatewayConfigError at construction
(options.apiToken: A credential was refused: ...), before anything is built
or sent; the refusal holds no piece of the key, and every error a gateway
throws has no cause and a stack of only name: message. As the very last
step every output (the tool list, each result, each audit record) is checked
in its final form, and one that still holds a piece of the key is replaced by
a fixed fallback. Whether Outline accepts the key is only known at the first
call (check_connection: HTTP 401).
Security model
The server uses one shared Outline API token for every caller; it acts with the permissions of the user that created the token.
MCP_HTTP_TOKENis a single shared secret that authenticates callers of the HTTP endpoint; it does not identify individual users. Per-user authentication and authorization belong in an identity-aware gateway or proxy in front of this server.Access to a tool is access to every document and collection that token can reach. Restrict the token's user to the collections callers should see.
The HTTP server does not terminate TLS. Run it on loopback or a private network, behind a TLS-terminating proxy when traffic leaves the host.
Install
npx mcp-server-outlineRuns the stdio server from npm. Configure it with the environment variables in .env.example.
Run
npm install
npm run dev # stdio
npm run dev:http # streamable HTTP on :3000/mcp (stateless)
npm testDocker images: ghcr.io/borgels/mcp-server-outline (published from main after CI passes, and for v* tags). Containers bind to 0.0.0.0 only with MCP_HTTP_HOST/HOST set, which requires MCP_HTTP_TOKEN.
License
The code is source-available under the Functional Source License, Version 1.1, ALv2 Future License (FSL-1.1-ALv2).
In plain words:
Allowed: reading the code, running it, changing it, using it inside your own organisation (also commercially), using it for non-commercial education and research, and contributing changes back.
Not allowed: making it, or something built from it, available to others as a commercial product or service that competes with it, for example a hosted service with the same functionality.
Becomes Apache-2.0: each version is also licensed under the Apache License 2.0 from two years after it is released.
Earlier versions: versions released before 0.5.0 were licensed under Apache-2.0 and remain so.
The terms in LICENSE are what apply; this summary does not replace them. See also NOTICE.
Available Tools
16 toolsoutline_archive_documentArchive/Restore Document (Outline)A
Archive a document (reversible) or restore an archived/trashed one. Requires write access.
Inputs: id (required), action (required).
outline_create_commentComment on Document (Outline)A
Add a comment to a document; parentCommentId replies to a thread. Requires write access.
Inputs: text (required), documentId (required), parentCommentId.
outline_create_documentCreate Document (Outline)A
Create a document (Markdown body) in a collection. publish=true makes it visible; parentDocumentId nests it. Requires write access.
Inputs: title (required), collectionId (required), text, publish, +1 more.
outline_delete_documentDelete Document (Outline)A
Move a document to Trash (recoverable via restore). Permanent deletion is not available here. Requires write access.
Inputs: id (required).
outline_get_collectionGet Collection (Outline)ARead-onlyIdempotent
Fetch one collection; includeStructure=true adds its document tree.
Inputs: id (required), includeStructure.
outline_get_documentGet Document (Outline)ARead-onlyIdempotent
Fetch one document by id or slug. asMarkdown=true returns the full Markdown body.
Inputs: id (required), asMarkdown.
outline_list_collectionsList Collections (Outline)CRead-onlyIdempotent
List the collections in the workspace.
Inputs: limit, offset.
outline_list_commentsList Comments (Outline)CRead-onlyIdempotent
List comments on a document.
Inputs: documentId (required), limit, offset.
outline_list_documentsList Documents (Outline)ARead-onlyIdempotent
List documents: recent (default), drafts, archived, or deleted (Trash). Optionally scope to a collection.
Inputs: limit, filter, offset, collectionId.
outline_list_revisionsList Revisions (Outline)CRead-onlyIdempotent
A document’s version history, or one revision with revisionId.
Inputs: documentId (required), limit, offset, revisionId.
outline_manage_collectionCreate/Update Collection (Outline)A
Create a new collection or update one (name/description/permission). Deleting collections is not available (cascades permanently). Requires write access.
Inputs: action (required), id, name, color, +2 more.
outline_move_documentMove Document (Outline)A
Move a document to another collection and/or under another parent document. Requires write access.
Inputs: id (required), collectionId, parentDocumentId.
outline_searchSearch Documents (Outline)ARead-onlyIdempotent
Ranked full-text search with context snippets. Optional filters: collectionId, statusFilter (draft/published/archived), dateFilter (day/week/month/year), userId.
Inputs: query (required), limit, offset, userId, +3 more.
outline_search_capabilitiesSearch Outline CapabilitiesARead-onlyIdempotent
Search the Outline/Playbook MCP capabilities. Use first when deciding which tool to call.
Inputs: limit, query.
outline_update_documentUpdate Document (Outline)A
Update a document title/body. append=true adds text to the end; otherwise text REPLACES the whole body. Requires write access.
Inputs: id (required), text, title, append, +1 more.
outline_whoamiWho Am I (Outline)ARead-onlyIdempotent
Show the user + workspace this Playbook token belongs to.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Most tools have clearly distinct purposes (create, update, delete, move, archive documents; manage collections; list comments/revisions; search). However, 'outline_search_capabilities' searches MCP capabilities rather than documents, which could cause confusion with 'outline_search'. Also, 'outline_archive_document' combines archive and restore actions into one tool, slightly blurring the operation.
All tools follow a consistent 'outline_<verb>_<noun>' pattern (e.g., outline_create_document, outline_list_comments). Verbs are descriptive and nouns match the resource. The pattern is uniform across the entire set, making it predictable for an agent.
16 tools is an appropriate number for a document management server. It covers essential operations on documents, collections, comments, revisions, and search without being overwhelming or sparse.
The tool set covers full CRUD for documents (create, read, update, delete/trash, move, archive) and collections (create, update, list, get). It also includes comments, revisions, search, and user info. Minor gaps: no permanent deletion (only trash), no document publishing workflow beyond publish flag, and no user/group management.
Maintenance
Related MCP Connectors
Read spaces, collections, pages and content; search docs and manage GitBook organization spaces.
Search, read and create Linear issues, projects, teams and cycles.
Search and read your meeting notes, transcripts and action items, and create notes in Reline.
Search and read articles and categories; create and update articles in Helpjuice.
Related MCP Servers
- FlicenseCqualityNot gradedmaintenanceEnables LLMs to interact with Outline wiki for document management, search, collections, and comments, with optional AI-powered features including RAG-based Q\&A and content summarization.37774 npm-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Outline documentation services, including searching, reading, creating, editing, and archiving documents, managing collections and comments, and finding backlinks.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Outline documentation services by searching, reading, creating, editing, and archiving documents, managing collections, and working with comments and backlinks.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Outline documentation services for searching, reading, creating, editing, and archiving documents, managing collections and comments, and retrieving backlinks and table-of-contents data.-