Wiki MCP服务器概述
](https://www.npmjs.com/package/outline-smart-mcp) 
一种模型上下文协议(MCP)服务器,使LLM能够与 大纲 维基通过结构化的API调用。该服务器提供文档管理、搜索、收集、评论和基于人工智能的智能功能,包括基于RAG的问答。
为什么选择此服务器?
大多数Outline MCP服务器提供基本的API包装器。这个添加了可选 智能功能:
| 功能 | 它的作用 |
|---|---|
ask_wiki | 用自然语言提问,根据您的维基内容获得答案(RAG) |
find_related | 查找语义相似的文档,而不仅仅是关键字匹配 |
summarize_document | 生成长文档摘要 |
suggest_tags | 根据内容分析获取标签建议 |
当您可能需要时:
- 你的团队的维基已经变得很大,搜索还不够
- 您想通过对话方式查询文档
- 您需要在知识库中进行语义搜索
当基本MCP足够时:
- 您只需要对文档进行CRUD操作
- 您不想设置OpenAI API
- 你的维基很小,组织良好
智能功能需要 ENABLE_SMART_FEATURES=true 以及一个OpenAI API密钥。如果没有这些,服务器将作为标准的Outline MCP工作。
示例用法
User: "What's our policy on remote work?"
→ ask_wiki searches your wiki and returns an answer with source links
User: "Find documents related to the onboarding guide"
→ find_related returns semantically similar docs (not just keyword matches)
User: "Summarize the Q4 planning document"
→ summarize_document generates a concise summary in your preferred language支持的客户
入门指南
需求
- Node.js 18.0.0或更高版本
- 具有API访问权限的大纲实例
- (可选)用于智能功能的OpenAI API密钥
获取您的大纲API令牌
- 登录到Outline实例
- 首选 设置 → API
- 点击 创建API密钥
- 复制生成的令牌(以开头
ol_api_)
安装
Claude Desktop
添加到您的Claude Desktop配置中:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - 窗户:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"outline": {
"command": "npx",
"args": ["-y", "outline-smart-mcp"],
"env": {
"OUTLINE_URL": "https://your-outline-instance.com",
"OUTLINE_API_TOKEN": "ol_api_xxxxxxxxxxxxx"
}
}
}
}Claude Code
运行以下命令:
claude mcp add outline -e OUTLINE_URL=https://your-outline-instance.com -e OUTLINE_API_TOKEN=ol_api_xxxxxxxxxxxxx -- npx -y outline-smart-mcp或添加到 ~/.claude.json (全球)或 .mcp.json (项目本地):
{
"mcpServers": {
"outline": {
"command": "npx",
"args": ["-y", "outline-smart-mcp"],
"env": {
"OUTLINE_URL": "https://your-outline-instance.com",
"OUTLINE_API_TOKEN": "ol_api_xxxxxxxxxxxxx"
}
}
}
}备注:The~/.claude/settings.jsonMCP服务器忽略该文件。使用~/.claude.json或.mcp.json相反。
VS Code GitHub Copilot
添加到您的VS代码设置(.vscode/mcp.json):
{
"servers": {
"outline": {
"command": "npx",
"args": ["-y", "outline-smart-mcp"],
"env": {
"OUTLINE_URL": "https://your-outline-instance.com",
"OUTLINE_API_TOKEN": "ol_api_xxxxxxxxxxxxx"
}
}
}
}Cursor
添加到光标MCP设置(~/.cursor/mcp.json):
{
"mcpServers": {
"outline": {
"command": "npx",
"args": ["-y", "outline-smart-mcp"],
"env": {
"OUTLINE_URL": "https://your-outline-instance.com",
"OUTLINE_API_TOKEN": "ol_api_xxxxxxxxxxxxx"
}
}
}
}Windsurf
添加到Windsurf MCP设置(~/.codeium/windsurf/mcp_config.json):
{
"mcpServers": {
"outline": {
"command": "npx",
"args": ["-y", "outline-smart-mcp"],
"env": {
"OUTLINE_URL": "https://your-outline-instance.com",
"OUTLINE_API_TOKEN": "ol_api_xxxxxxxxxxxxx"
}
}
}
}ChatGPT Desktop
ChatGPT通过其桌面应用程序支持MCP。在中添加服务器 设置 → MCP服务器 与:
- 命令:
npx - 论据:
-y outline-smart-mcp - 如上所示的环境变量
配置
环境变量
| 变量 | 描述 | 必填 | 默认 |
|---|---|---|---|
OUTLINE_URL | 您的Outline实例URL | 是 | https://app.getoutline.com |
OUTLINE_API_TOKEN | 您的大纲API令牌 | 是 | - |
READ_ONLY | 启用只读模式 | 否 | false |
DISABLE_DELETE | 禁用删除操作 | 否 | false |
MAX_RETRIES | API重试次数 | 否 | 3 |
RETRY_DELAY_MS | 重试延迟(毫秒) | 否 | 1000 |
ENABLE_SMART_FEATURES | 启用AI功能 | 否 | false |
OPENAI_API_KEY | OpenAI API密钥 | 否\* | - |
\*需要时 ENABLE_SMART_FEATURES=true
智能功能配置
要启用人工智能功能(RAG问答、摘要等),请将这些添加到您的配置中:
{
"mcpServers": {
"outline": {
"command": "npx",
"args": ["-y", "outline-smart-mcp"],
"env": {
"OUTLINE_URL": "https://your-outline-instance.com",
"OUTLINE_API_TOKEN": "ol_api_xxxxxxxxxxxxx",
"ENABLE_SMART_FEATURES": "true",
"OPENAI_API_KEY": "sk-xxxxxxxxxxxxx"
}
}
}
}工具
搜索与发现
| 工具 | 说明 |
|---|---|
search_documents | 按关键字分页搜索文档 |
get_document_id_from_title | 按标题查找文档ID |
list_collections | 获取所有收藏 |
get_collection_structure | 获取集合中的文档层次结构 |
list_recent_documents | 获取最近修改的文档 |
文档操作
| 工具 | 说明 |
|---|---|
get_document | 按ID获取完整文档内容 |
export_document | 用Markdown导出文档 |
create_document | 创建新文档 |
update_document | 更新文档(支持追加) |
move_document | 将文档移动到其他位置 |
文档生命周期
| 工具 | 说明 |
|---|---|
archive_document | 存档文档 |
unarchive_document | 恢复存档文档 |
delete_document | 删除文档(软/永久) |
restore_document | 从回收站还原 |
list_archived_documents | 列出存档文件 |
list_trash | 列出被丢弃的文档 |
评论与协作
| 工具 | 说明 |
|---|---|
add_comment | 添加评论(支持回复) |
list_document_comments | 获取文档注释 |
get_comment | 获取具体评论 |
get_document_backlinks | 查找链接文档 |
收集管理
| 工具 | 说明 |
|---|---|
create_collection | 创建收藏 |
update_collection | 更新收藏 |
delete_collection | 删除收藏 |
export_collection | 出口收款 |
export_all_collections | 导出所有收藏 |
批量操作
| 工具 | 说明 |
|---|---|
batch_create_documents | 创建多个文档 |
batch_update_documents | 更新多个文档 |
batch_move_documents | 移动多个文档 |
batch_archive_documents | 存档多个文档 |
batch_delete_documents | 删除多个文档 |
智能功能(AI驱动)
需要 ENABLE_SMART_FEATURES=true 和 OPENAI_API_KEY.
| 工具 | 说明 |
|---|---|
smart_status | 检查状态和索引计数 |
sync_knowledge | 将文档同步到矢量数据库 |
ask_wiki | 基于RAG的维基内容问答 |
summarize_document | 生成AI摘要 |
suggest_tags | AI建议标签 |
find_related | 查找语义相关文档 |
generate_diagram | 生成美人鱼图 |
智能功能使用
# 1. First, sync your wiki documents
sync_knowledge
# 2. Ask questions about your wiki
ask_wiki: "What is our deployment process?"
# 3. Summarize long documents
summarize_document: { documentId: "doc-id", language: "Korean" }
# 4. Find related content
find_related: { documentId: "doc-id", limit: 5 }技术栈
| 组件 | 技术 |
|---|---|
| 矢量数据库 | LanceDB(嵌入式) |
| 嵌入 | OpenAI文本嵌入3-small |
| LLM | GPT-4o-mini |
| 文本分块 | LangChain |
安全功能
只读模式
READ_ONLY=true仅限于读取操作:搜索、获取、导出、列表操作和所有智能功能。
禁用删除
DISABLE_DELETE=true阻碍: delete_document, delete_collection, batch_delete_documents
发展
# Clone repository
git clone https://github.com/huiseo/outline-wiki-mcp.git
cd outline-wiki-mcp
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Type check
npm run typecheck许可证
MIT许可证-请参阅 许可证 了解详情。
