Skip to content

Commit d900473

Browse files
committed
docs: update README MCP section (43 tools, staging, meeting split), remove prototype note
1 parent fedce24 commit d900473

2 files changed

Lines changed: 66 additions & 23 deletions

File tree

README.md

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ $$\text{\textbf{Spark. Sink. Educe.}}$$
88
99
Sinkduce is built on a strict philosophy: **Never hoard knowledge—only sink what truly matters.** Unlike massive, bloated traditional wikis or knowledge bases that encourage endless data hoarding (turning into "knowledge graveyards"), Sinkduce is designed as a **high-fidelity cognitive filter**. It is tailored for professionals managing multiple complex projects and students navigating multiple courses. Instead of blindly filling the vector pool with unread external text files, Sinkduce turns real-world conversations, lectures, and curated conceptual notes into precise structural units, allowing you to interact with your core operational memory under a context-isolated architecture.
1010

11-
> *Note: Sinkduce is currently optimized as a hyper-efficient personal system. Server-side deployments and multi-user collaborative project memory are planned in future enterprise releases.*
12-
1311
## 🚀 Quick Start
1412

1513
**Prerequisites**: Docker
@@ -120,43 +118,73 @@ All optional. Copy `.env.template` to `.env` to customize ports:
120118

121119
## 🔌 MCP Server Interface
122120

123-
Sinkduce ships with a built-in [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server that exposes **40 atomic tools** across 8 domains for AI coding agents. Use it with Claude Code, Cursor, or any MCP-compatible client to query and manage your knowledge bases directly from your IDE.
121+
Sinkduce ships with a built-in [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server that exposes **43 atomic tools** across 8 domains for AI coding agents. Use it with Claude Code, Cursor, or any MCP-compatible client to query and manage your knowledge bases directly from your IDE.
124122

125123
### Architecture
126124

127125
The MCP server is mounted under `/mcp` on the same FastAPI process as the REST API (default port `18900`). It shares the main app lifespan — the `services` singleton and `task_manager` are reused, so no separate process is needed. Transport is HTTP via the [Streamable HTTP](https://modelcontextprotocol.io/) protocol.
128126

129127
### Quick Setup (Claude Code)
130128

131-
Add to your Claude Code MCP settings (`~/.claude/settings.json` or project-level `.claude/settings.json`):
129+
Add to your Claude Code MCP settings (`~/.claude/settings.json` or project-level `.mcp.json`):
132130

133131
```json
134132
{
135133
"mcpServers": {
136134
"sinkduce": {
135+
"type": "http",
137136
"url": "http://localhost:18900/mcp"
138137
}
139138
}
140139
}
141140
```
142141

143-
Prerequisite: start the backend first (`uvicorn src.main:app --port 18900 --reload` or `docker compose up -d`). Claude Code connects to the running server — no subprocess is spawned.
142+
For Claude Code, the simplest setup is a `.mcp.json` file at the project root:
143+
144+
```json
145+
{
146+
"mcpServers": {
147+
"sinkduce": {
148+
"type": "http",
149+
"url": "http://localhost:18900/mcp"
150+
}
151+
}
152+
}
153+
```
154+
155+
Prerequisite: start the backend first (`docker compose up -d` or `uvicorn src.main:app --port 18900 --reload`). Claude Code connects to the running server — no subprocess is spawned.
156+
157+
### File Upload via Staging
158+
159+
MCP tool parameters appear in the LLM conversation transcript. To prevent file content from leaking into context, Sinkduce uses a **side-channel staging** pattern. Instead of passing file bytes through MCP tools, use the HTTP staging endpoint:
160+
161+
```bash
162+
# Upload a document (one-shot)
163+
curl -F "file=@report.pdf" -F "collection=col_xxx" \
164+
http://localhost:18900/api/mcp/upload
165+
166+
# Upload meeting audio (one-shot)
167+
curl -F "file=@recording.webm" -F "meeting_id=meet_xxx" \
168+
http://localhost:18900/api/mcp/meeting-upload
169+
```
170+
171+
The LLM uses its Bash tool to execute the curl command — file bytes travel over HTTP only and never enter the LLM context.
144172

145-
### Available MCP Tools (40 atomic tools)
173+
### Available MCP Tools (43 atomic tools)
146174

147-
**Collections (5)**: `list_collections`, `get_collection`, `create_collection`, `update_collection_config`, `delete_collection`. `update_collection_config` rejects destructive fields (`chunk_mode`, `embedding_*` other than `embedding_provider_id`) that would require a full re-index — change those via the UI.
175+
**Collections (5)**: `list_collections`, `get_collection`, `create_collection`, `update_collection_config`, `delete_collection`. `update_collection_config` rejects destructive fields (`chunk_mode`, `embedding_*`) that would require a full re-index — change those via the UI.
148176

149-
**Documents (6)**: `list_documents`, `upload_document`, `upload_document_content`, `delete_document`, `get_file_chunks`, `get_document_text`. `upload_document_content` accepts base64-encoded content directly.
177+
**Documents (6)**: `list_documents`, `upload_document_from_staging` (unified upload via staging token), `delete_document`, `get_file_chunks`, `get_document_text`, `set_document_definitive`. For file upload, use the HTTP staging endpoint above — the MCP tool only accepts a staging token.
150178

151-
**Search (3)**: `search_direct_chunks` (dense/sparse/hybrid retrieval, no LLM answer), `search_agentic_chunks` (full rewrite → decompose → retrieve → grade pipeline, returns chunks), `get_query_history`.
179+
**Search (3)**: `search_direct_chunks` (dense/sparse/hybrid retrieval), `search_agentic_chunks` (rewrite → decompose → retrieve → grade pipeline), `get_query_history`.
152180

153-
**Tasks (5)**: `list_tasks`, `get_task_status`, `cancel_task`, `retry_task`, `clear_completed_tasks`. Used to monitor async parsing/indexing progress.
181+
**Tasks (5)**: `list_tasks`, `get_task_status`, `cancel_task`, `retry_task`, `clear_completed_tasks`. Monitor async parsing/indexing/summary progress.
154182

155183
**Summaries (4)**: `get_collection_summary`, `get_doc_summary`, `get_conflicts`, `trigger_consolidate`.
156184

157185
**Notes (6)**: `list_notes`, `get_note`, `create_note`, `update_note`, `delete_note`, `trigger_propagation`.
158186

159-
**Meetings (6)**: `list_meetings`, `get_meeting`, `create_meeting`, `update_meeting`, `delete_meeting`, `start_meeting_summary`.
187+
**Meetings (9)**: `list_meetings`, `get_meeting` (metadata + tabs), `get_section` (per-tab markdown, `tab_id="general"` for summary), `get_meeting_transcript` (paginated), `create_meeting`, `update_meeting`, `delete_meeting`, `start_meeting_summary`, `upload_meeting_audio_from_staging`.
160188

161189
**Hot Words (5)**: `list_hot_words_libraries`, `get_hot_words_library`, `create_hot_words_library`, `update_hot_words_library`, `delete_hot_words_library`.
162190

README_CN.md

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ $$\text{\textbf{Spark. Sink. Educe.}}$$
66

77
> **一个为“反囤积狂”设计的智能、Context-Isolated 个人记忆生态系统。**
88
9-
Sinkduce 秉承一个核心哲学:**从不盲目囤积知识——只沉淀真正重要的核心。** 与那些鼓励无休止堆砌数据、最终沦为“知识坟墓”的臃肿传统 Wiki 或知识库不同,Sinkduce 被设计为一个**高保真认知过滤器**。它专为管理多个复杂项目的专业人士和奔波于多门课程的学者打造。Sinkduce 拒绝将未读的外部杂乱文本盲目塞进向量池,而是将现实世界中的对话、会议、讲座和沉淀后的概念笔记转化为精准的结构化单元,让您在完全隔离的 Context-Isolated 架构中与核心运行记忆进行深度交互。
10-
11-
> *注意:Sinkduce 目前已针对超高效的个人系统进行了深度优化。支持团队协作的项目内存及多租户服务器端部署已列入未来的企业版路线图。*
9+
Sinkduce 秉承一个核心哲学:**从不盲目囤积知识——只沉淀真正重要的核心。** 与那些鼓励无休止堆砌数据、最终沦为”知识坟墓”的臃肿传统 Wiki 或知识库不同,Sinkduce 被设计为一个**高保真认知过滤器**。它专为管理多个复杂项目的专业人士和奔波于多门课程的学者打造。Sinkduce 拒绝将未读的外部杂乱文本盲目塞进向量池,而是将现实世界中的对话、会议、讲座和沉淀后的概念笔记转化为精准的结构化单元,让您在完全隔离的 Context-Isolated 架构中与核心运行记忆进行深度交互。
1210

1311
---
1412

@@ -124,43 +122,60 @@ Sinkduce 采用可插拔且解耦的模型架构,完全通过 Web UI 进行可
124122

125123
## 🔌 MCP 服务器接口
126124

127-
Sinkduce 自带内置的 [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) 服务器,对外暴露 **40 个原子工具**,覆盖 8 个领域。您可以在 Claude Code、Cursor 或任何兼容 MCP 的客户端中使用,直接在 IDE 中异步检索和管理您的知识库。
125+
Sinkduce 自带内置的 [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) 服务器,对外暴露 **43 个原子工具**,覆盖 8 个领域。您可以在 Claude Code、Cursor 或任何兼容 MCP 的客户端中使用,直接在 IDE 中异步检索和管理您的知识库。
128126

129127
### 架构说明
130128

131129
MCP 服务器以子应用形式挂载在同一个 FastAPI 进程的 `/mcp` 路径下(默认端口 `18900`),复用主应用的 lifespan——`services` 单例与 `task_manager` 全局共享,无需独立进程。传输层使用 [Streamable HTTP](https://modelcontextprotocol.io/) 协议。
132130

133131
### 快速配置(以 Claude Code 为例)
134132

135-
将以下配置添加至您的 Claude Code MCP 设置中(用户级 `~/.claude/settings.json` 或项目级 `.claude/settings.json`):
133+
将以下配置添加至 Claude Code MCP 设置(`~/.claude/settings.json` 或项目根目录 `.mcp.json`):
136134

137135
```json
138136
{
139137
"mcpServers": {
140138
"sinkduce": {
139+
"type": "http",
141140
"url": "http://localhost:18900/mcp"
142141
}
143142
}
144143
}
145144
```
146145

147-
前提条件:需先启动后端(`uvicorn src.main:app --port 18900 --reload``docker compose up -d`)。Claude Code 直接连接到已运行的服务器,无需启动子进程。
146+
前提条件:需先启动后端(`docker compose up -d``uvicorn src.main:app --port 18900 --reload`)。Claude Code 直接连接到已运行的服务器,无需启动子进程。
147+
148+
### 文件上传(Staging 模式)
149+
150+
MCP 工具的参数会出现在 LLM 对话记录中。为防止文件内容泄露到上下文,Sinkduce 采用**旁路暂存(staging)**模式——文件通过 HTTP 端点传输,MCP 工具只传一个 36 字符的 UUID token:
151+
152+
```bash
153+
# 上传文档(一步到位)
154+
curl -F "file=@report.pdf" -F "collection=col_xxx" \
155+
http://localhost:18900/api/mcp/upload
156+
157+
# 上传会议音频(一步到位)
158+
curl -F "file=@recording.webm" -F "meeting_id=meet_xxx" \
159+
http://localhost:18900/api/mcp/meeting-upload
160+
```
161+
162+
LLM 使用 Bash 工具执行 curl 命令,文件字节仅通过 HTTP 传输,绝不进入 LLM 上下文。
148163

149-
### MCP 工具清单(40 个原子工具)
164+
### MCP 工具清单(43 个原子工具)
150165

151-
**Collections(5)**`list_collections``get_collection``create_collection``update_collection_config``delete_collection``update_collection_config` 会拒绝破坏性字段(`chunk_mode``embedding_*``embedding_provider_id`),这些字段需要完整重建索引才能修改,请通过 UI 进行。
166+
**Collections(5)**`list_collections``get_collection``create_collection``update_collection_config``delete_collection``update_collection_config` 会拒绝破坏性字段(`chunk_mode``embedding_*`),这些字段需要完整重建索引才能修改,请通过 UI 进行。
152167

153-
**Documents(6)**`list_documents``upload_document``upload_document_content``delete_document``get_file_chunks``get_document_text``upload_document_content` 直接接收 base64 编码内容
168+
**Documents(6)**`list_documents``upload_document_from_staging`(统一上传,通过 staging token)、`delete_document``get_file_chunks``get_document_text``set_document_definitive`。上传文件请使用上方的 HTTP staging 端点,MCP 工具仅接受 staging token
154169

155-
**Search(3)**`search_direct_chunks`(dense/sparse/hybrid 检索,不生成 LLM 答案)、`search_agentic_chunks`完整 rewrite → decompose → retrieve → grade 流水线,返回 chunks)、`get_query_history`
170+
**Search(3)**`search_direct_chunks`(dense/sparse/hybrid 检索)、`search_agentic_chunks`(rewrite → decompose → retrieve → grade 流水线)、`get_query_history`
156171

157-
**Tasks(5)**`list_tasks``get_task_status``cancel_task``retry_task``clear_completed_tasks`用于跟踪异步解析与索引进度
172+
**Tasks(5)**`list_tasks``get_task_status``cancel_task``retry_task``clear_completed_tasks`监控异步解析/索引/摘要进度
158173

159174
**Summaries(4)**`get_collection_summary``get_doc_summary``get_conflicts``trigger_consolidate`
160175

161176
**Notes(6)**`list_notes``get_note``create_note``update_note``delete_note``trigger_propagation`
162177

163-
**Meetings(6**`list_meetings``get_meeting``create_meeting``update_meeting``delete_meeting``start_meeting_summary`
178+
**Meetings(9**`list_meetings``get_meeting`(元数据 + tabs 列表)、`get_section`(单 section markdown,`tab_id="general"` 为总体摘要)、`get_meeting_transcript`(分页转写文本)、`create_meeting``update_meeting``delete_meeting``start_meeting_summary``upload_meeting_audio_from_staging`
164179

165180
**Hot Words(5)**`list_hot_words_libraries``get_hot_words_library``create_hot_words_library``update_hot_words_library``delete_hot_words_library`
166181

0 commit comments

Comments
 (0)