b3nw dc926cc8da
Build and Push Outline MCP Docker Image / build (push) Successful in 1m18s
feat: add binary file attachment and import tools for Outline LTM system (#1)
Implement 3 new MCP tools:
- attach_file_to_document(document_id, file_path)
- upload_image_to_document(image_path, document_id, alt_text)
- import_file_to_outline(file_path, collection_id, parent_document_id)

Security:
- Restrict file access to /tmp via _validate_file_path with realpath
- 50MB max file size enforced client-side
- Symlink traversal blocked

Technical:
- Extract shared _upload_attachment() helper
- Stream files to presigned URLs instead of loading into memory
- Add combined lifespan to close OutlineClient on shutdown
- Update CI workflow with modern action versions and PR triggers

Tests:
- Add 28 tests covering path validation, size limits, upload flow,
  error handling, symlink traversal, and multipart imports
2026-05-25 00:37:24 +00:00

Outline MCP Server

A lightweight MCP server for interacting with self-hosted Outline knowledge bases.

Features

  • 4 specific tools for common operations (search, get document, list collections)
  • API passthrough for full Outline API coverage
  • Embedded API reference resource for agent self-service
  • Docker-ready with health checks

Tools

Tool Description
search_documents Full-text search across all documents
get_document Retrieve a document by ID with Markdown content
list_collections List all collections in the workspace
list_collection_documents List documents within a specific collection
outline_api_call Raw API passthrough for any Outline endpoint

Resources

URI Description
outline://api-reference Comprehensive Outline API documentation

Configuration

Copy .env.example to .env and configure:

OUTLINE_API_URL=https://docs.example.com
OUTLINE_API_TOKEN=your_api_token_here

Get your API token from Outline: Settings > API Tokens

Running

Docker Compose

docker compose up -d

Local Development

pip install -e .
python server.py

Health Check

curl http://localhost:8000/health

MCP Endpoint

The MCP server is available at http://localhost:8000/mcp

License

MIT

S
Description
MCP server for Outline knowledge base
Readme 118 KiB
Languages
Python 97.8%
Dockerfile 2.2%