outline-mcp-server
by nbhansen
README.md
# Outline MCP Server
A Model Context Protocol (MCP) server that integrates Outline Wiki with AI assistants like Claude Desktop.
## Features
- 🔍 **Search documents** - Find documents in your Outline knowledge base
- 📝 **Create documents** - Create new documents in any collection
- ✏️ **Update documents** - Update existing documents (with append support)
- 📁 **List collections** - View all accessible collections
- 📚 **Resources** - Access document content and search results as resources
- 💡 **Prompts** - Pre-configured prompts for document analysis and content creation
## Setup
1. **Install dependencies**:
```bash
cd outline-mcp-server
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```
2. **Configure environment**:
Create a `.env` file with your Outline API token:
```bash
OUTLINE_TOKEN=your_api_token_here
OUTLINE_BASE_URL=https://your-outline-instance.com/api
```
3. **Test the server**:
```bash
python test_server.py
```
## Claude Desktop Integration
The server has been configured in `~/.config/claude-desktop/claude.json`.
To use it:
1. Restart Claude Desktop
2. The Outline tools should appear in the tools menu
3. Try commands like:
- "Search for documentation about [topic]"
- "List all collections in Outline"
- "Create a new document about [topic] in [collection]"
## Available Tools
### search_documents
Search for documents in Outline.
- `query`: Search query
- `limit`: Maximum results (default: 10)
### create_document
Create a new document.
- `title`: Document title
- `content`: Document content (Markdown)
- `collection_id`: Target collection ID
### update_document
Update an existing document.
- `doc_id`: Document ID
- `content`: New content
- `append`: Append to existing content (default: false)
### list_collections
List all accessible collections.
## Resources
- `outline://document/{doc_id}` - Get full document content
- `outline://search/{query}` - Get search results as JSON
## Prompts
- `analyze_document` - Analyze a document with various analysis types
- `create_overview` - Create a topic overview from related documents
## Development
The server consists of:
- `server.py` - Main MCP server implementation
- `outline_client.py` - Outline API client
- `tools.py` - Tool implementations
- `resources.py` - Resource handlers
- `prompts.py` - Prompt templates
- `test_server.py` - Test script
## Troubleshooting
1. **Server won't start**: Check that `OUTLINE_TOKEN` is set in `.env`
2. **Connection errors**: Verify `OUTLINE_BASE_URL` is correct
3. **Claude Desktop doesn't show tools**: Restart Claude Desktop after config changes