MCP大纲
一种模型上下文协议服务器,使像 Claude 这样的人工智能助手能够与 Outline 文档服务进行交互,支持文档的搜索、阅读、创建、编辑和评论管理。
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"mcp-outline": {
"args": [
"run",
"-i",
"--rm",
"--init",
"-e",
"DOCKER_CONTAINER=true",
"-e",
"OUTLINE_API_KEY",
"-e",
"OUTLINE_API_URL",
"mcp-outline"
],
"command": "docker",
"env": {
"OUTLINE_API_KEY": "\u003cYOUR_OUTLINE_API_KEY\u003e",
"OUTLINE_API_URL": "\u003cYOUR_OUTLINE_API_URL\u003e"
}
}
}
}
该服务需要配置环境变量:OUTLINE_API_KEY、OUTLINE_API_URL
服务介绍
MCP Outline 服务器
一个模型上下文协议(MCP)服务器,使AI助手能够与Outline(https://www.getoutline.com)进行交互。
概述
本项目实现了一个模型上下文协议(MCP)服务器,允许AI助手(如Claude)与Outline文档服务进行交互,为自然语言交互和Outline的文档管理功能之间提供了一个桥梁。
特性
目前已实现:
- 文档搜索:通过关键词搜索文档
- 集合管理:列出集合并查看文档结构
- 文档阅读:阅读文档内容,导出为Markdown格式
- 评论管理:查看和添加文档评论
- 文档创建:在集合中创建新文档
- 文档编辑:更新文档内容并移动文档
- 反向链接管理:查看链接到特定文档的文档
开始使用
前提条件
- Python 3.10+
- 具有API访问权限的Outline账户
- Outline API密钥(从您的Outline账户设置中获取)
安装
# Clone the repository
git clone https://github.com/Vortiago/mcp-outline.git
cd mcp-outline
# Install in development mode
uv pip install -e ".[dev]"
配置
在项目根目录下创建一个.env文件,并包含以下变量:
# Outline API Configuration
OUTLINE_API_KEY=your_outline_api_key_here
# For cloud-hosted Outline (default)
# OUTLINE_API_URL=https://app.getoutline.com/api
# For self-hosted Outline
# OUTLINE_API_URL=https://your-outline-instance.example.com/api
运行服务器
# Development mode with the MCP Inspector
mcp dev src/mcp_outline/server.py
# Or use the provided script
./start_server.sh
# Install in Claude Desktop (if available)
mcp install src/mcp_outline/server.py --name "Document Outline Assistant"
使用示例
搜索文档
Search for documents containing "project planning"
列出集合
Show me all available collections
阅读文档
Get the content of document with ID "docId123"
创建新文档
Create a new document titled "Research Report" in collection "colId456" with content "# Introduction\n\nThis is a research report..."
添加评论
Add a comment to document "docId123" saying "This looks great, but we should add more details to the methodology section."
移动文档
Move document "docId123" to collection "colId789"
贡献
欢迎贡献!请随时提交Pull Request。
开发
# Run tests
uv run pytest tests/
# Format code
uv run ruff format .
许可证
本项目根据MIT许可证发布 - 详情请参见LICENSE文件。
致谢
- 使用MCP Python SDK构建
- 使用Outline API进行文档管理