York
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@York search the knowledge base for our API error handling conventions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🤖 York (The AI Project Brain)
York 是一個專為 AI Agent 設計的「專案知識管理大腦」。它透過 Model Context Protocol (MCP) 為 Claude 等 AI 提供深度專案認知能力,包含語意搜尋、結構感知與長期記憶管理。
✨ 核心特色
🧠 雙腦協作架構 (Cognitive Architecture)
結構認知 (Structure): 自動偵測專案框架 (Laravel, FuelPHP, React...) 並理解目錄意義。
知識記憶 (Knowledge): 儲存業務邏輯、開發規範與決策紀錄。
🔍 混合檢索系統 (Hybrid Search)
結合 關鍵字搜尋 (BM25) 與 語意搜尋 (Vector Embedding)。
使用 RRF (Reciprocal Rank Fusion) 演算法優化排序。
⚡ 高效能 Python 核心
基於
FastMCP與uv套件管理。內建
LanceDB向量資料庫(無須額外安裝 Service)。支援
SentenceTransformers本機 Embedding 模型。
Related MCP server: arcane
🚀 快速開始 (Docker 部署)
1. 建置 Docker Image
./build-image.sh2. 設定 Claude Code / Claude Desktop
macOS/Linux — Claude Code
在 ~/.claude/mcp.json 加入(不存在則新建):
{
"mcpServers": {
"york": {
"command": "/你的/絕對路徑/york/start.sh"
}
}
}macOS/Linux — Claude Desktop
設定檔位置: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"york": {
"command": "/你的/絕對路徑/york/start.sh"
}
}
}Windows — Claude Desktop / Antigravity
{
"mcpServers": {
"york": {
"command": "powershell.exe",
"args": ["-NoProfile", "-ExecutionPolicy", "Bypass", "-File", "C:\\你的路徑\\york\\start.ps1"]
}
}
}3. 重啟 Claude
重啟後應在 🛠️ 圖示中看到 York 的工具。
⚙️ 環境設定
所有資料預設存放在專案內的 .data/ 目錄(已加入 .gitignore):
york/.data/
├── lancedb/ ← 向量資料庫
└── {project_name}/ ← 知識 Markdown 檔案
└── *.md如需自訂路徑,複製 .env.example 為 .env 並設定:
cp .env.example .env環境變數 | 預設值 | 說明 |
| 必填 | 本機專案根目錄 |
|
| 知識庫 md 檔存放路徑 |
|
| LanceDB 向量資料庫路徑 |
| 空(允許全部) | 逗號分隔的允許專案名稱 |
🛠️ 可用工具 (MCP Tools)
York 提供 12 個工具,分為三大類:
📚 知識管理 (Knowledge)
工具名稱 | 描述 |
| 儲存文件到知識庫,並自動同步向量索引 |
| 讀取特定知識文件的內容與 metadata |
| 列出專案中的所有知識文件 |
| 刪除知識文件與對應的向量數據 |
| 取得專案的完整知識彙整 (project-knowledge.md) |
🔍 搜尋與檢索 (Retrieval)
工具名稱 | 描述 |
| 混合搜尋 (關鍵字+語意),支援 RRF 排序與結構化過濾 |
| 手動觸發特定專案的索引重建 |
| 查看向量資料庫狀態 (統計、快取命中率) |
🏗️ 結構認知 (Structure)
工具名稱 | 描述 |
| 自動偵測專案框架並生成 |
| 讀取目前的專案結構配置 |
| 儲存結構配置並觸發結構索引更新 |
| 列出此工作區管理的所有專案 |
🔗 可用資源 (Resources - 支援 @ 引用)
URI 模式 | 用途 |
| 讀取專案目前的目錄結構與架構說明 |
| 讀取特定的知識文件 |
📂 專案結構
york/
├── src/
│ ├── agent_server/ # MCP Server 定義與入口
│ ├── knowledge/ # 知識管理核心 (CRUD, Sync, Search)
│ ├── services/ # 基礎服務 (VectorStore: Singleton + LRU)
│ ├── structure/ # 結構認知核心 (Detector, YAML Handler)
│ ├── models/ # Pydantic 資料模型定義
│ └── utils/ # 通用工具 (Logger, Project Helper)
├── scripts/ # 功能演示腳本
├── tests/ # Pytest 測試套件
├── .data/ # 本機資料 (gitignored)
│ ├── lancedb/ # 向量資料庫
│ └── {project}/ # 知識 md 檔
├── Dockerfile
├── start.sh # 容器啟動腳本 (macOS/Linux)
├── start.ps1 # 容器啟動腳本 (Windows)
└── build-image.sh # Docker Image 建置🔧 維運工具
工具 | macOS/Linux | Windows | 用途 |
知識庫儀表板 |
|
| 視覺化瀏覽知識庫( |
資料庫檢查 |
|
| 查看向量資料庫詳細內容 |
重建索引 |
|
| 強制重建所有專案的向量索引 |
資料庫管理 |
|
| 備份或重置 LanceDB |
測試 |
|
| 執行完整測試套件 |
📝 開發者指南
若您想在本機直接開發(不使用 Docker):
# 安裝 uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# 安裝依賴
uv sync --all-extras
# 執行測試
uv run pytest
# 啟動 Server
uv run python -m srcAvailable Tools
13 toolsdelete_knowledge_toolC
刪除知識文件
Args: project_name: 專案名稱 name: 檔案名稱
Returns: 刪除結果
Inputs: name (required), project_name (required). Returns: object
detect_project_structure_toolB
掃描目前專案結構並產生建議的配置檔內容 (YAML)
Args: project_path: 專案根目錄絕對路徑 project_name: 專案名稱 (用於生成配置)
Returns: YAML 配置建議內容
Inputs: project_name (required), project_path (required). Returns: result
expand_context_toolA
擴展 Chunk 上下文(Small-to-Big Retrieval)
search_knowledge 命中某個 chunk 後,用此工具取得 該 chunk 的「前一段」與「後一段」完整內容, 補充搜尋結果的上下文脈絡。
Args: chunk_id: 搜尋結果 context.chunk_id parent_id: 搜尋結果 context.parent_id
Returns: { "before": {id, header_path, content, preview} | null, "current": {id, header_path, content, preview}, "after": {id, header_path, content, preview} | null }
Inputs: chunk_id (required), parent_id (required). Returns: object
get_project_knowledge_toolC
取得專案的完整知識彙整 (friday-knowledge.md)
Args: project_name: 專案名稱
Returns: 知識彙整內容(Markdown)
Inputs: project_name (required). Returns: result
get_project_structure_toolB
讀取專案目前的結構配置檔 (project.structure.yml)
Args: project_name: 專案名稱
Returns: YAML 配置內容
Inputs: project_name (required). Returns: result
get_vector_db_stats_toolB
取得向量資料庫的狀態統計資訊
Returns: 資料庫統計資訊
Inputs: no named parameters. Returns: object
list_knowledge_toolB
列出專案的所有知識文件
Args: project_name: 專案名稱 tag: 標籤過濾(選填)
Returns: 知識文件資訊列表
Inputs: project_name (required), tag. Returns: result
list_projects_toolA
列出所有可用的專案
Returns: 專案名稱列表
Inputs: no named parameters. Returns: result
read_knowledge_toolC
讀取知識文件
Args: project_name: 專案名稱 name: 檔案名稱
Returns: 知識文件內容與 metadata
Inputs: name (required), project_name (required). Returns: object
reindex_knowledge_toolB
重建專案的向量索引 掃描知識庫中的所有 Markdown 檔案並重新同步
Args: project_name: 專案名稱
Returns: 處理結果統計
Inputs: project_name (required). Returns: object
save_knowledge_toolB
儲存知識文件到專案知識庫
Args: project_name: 專案名稱 name: 知識主題或檔案名稱 content: 要儲存的內容(Markdown 格式) tags: 標籤列表(選填) framework: 所屬框架(選填,例如:Laravel, React) framework_layer: 框架層級(選填,例如:Controller, Service) code_type: 程式碼類型(選填,例如:logic, feature, guide) symbol_name: 主要符號名稱(選填,例如:UserController) related_files: 相關檔案列表(選填) context_description: 上下文描述(選填)
Returns: 包含檔案路徑的字典
Inputs: name (required), content (required), project_name (required), tags, +6 more. Returns: object
save_project_structure_toolB
儲存或更新專案的結構配置檔 (project.structure.yml)
Args: project_name: 專案名稱 content: YAML 配置內容
Returns: 執行結果訊息
Inputs: content (required), project_name (required). Returns: result
search_knowledge_toolB
搜尋知識文件內容(三路混合檢索:關鍵字 + 向量語意 + 全文內容)
Args: project_name: 專案名稱 query: 主要搜尋查詢(任何語言) query_variants: 同義查詢的其他語言版本,例如 ["nearby area search", "近郊地區搜尋"] 提供越多語言版本,跨語言命中率越高 framework: 框架過濾(選填) framework_layer: 框架層級過濾(選填) code_type: 程式碼類型過濾(選填) symbol_name: 符號名稱過濾(選填)
Returns: 搜尋結果與使用指引
Inputs: query (required), project_name (required), code_type, framework, +3 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools have clearly distinct purposes: CRUD for knowledge files, search, index management, and project structure config. Minor potential confusion between read_knowledge_tool (single file) and get_project_knowledge_tool (aggregated knowledge), and between get_project_structure_tool and detect_project_structure_tool, but descriptions clarify these.
All 13 tools follow a consistent verb_noun_tool snake_case pattern (read_, save_, list_, get_, expand_, delete_, search_, reindex_, detect_). No camelCase mixing or inconsistent verb styles.
13 tools is well within the ideal 3-15 range and each tool earns its place: knowledge CRUD, search/retrieval helpers, index management, and project structure operations. No redundant or filler tools.
Knowledge lifecycle is well covered: create/read/list/delete/search/reindex/stats plus context expansion and aggregation; project structure config has get/save/detect. Minor gaps exist—no explicit project create/delete, and update relies on save_knowledge_tool overwriting—but core workflows are complete.
Maintenance
Related MCP Connectors
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Project memory, documentation and controlled secret access for AI coding agents.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI coding assistants with persistent project memory to retain architectural decisions, code patterns, and domain knowledge across sessions. It stores data locally in a SQLite database, allowing agents to remember, recall, and manage project-specific context using full-text search.6 npmApache 2.0
- AlicenseNot gradedqualityBmaintenanceProvides persistent, searchable memory and knowledge capture for AI-assisted development, enabling agents to retain decisions, bugs, and patterns across sessions and projects.179 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceGives multiple AI coding agents a shared, persistent memory by indexing your code and documentation into a vector database with AST-aware chunking and hybrid semantic/keyword search. Agents can search across projects and store, update, or forget decisions, conventions and lessons learned, all self-hosted with local embeddings.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to persist and retrieve durable project knowledge across coding sessions, capturing decisions, conventions, lessons and reusable skills through ordinary chat requests. It supports searching, editing and reviewing saved items, and promoting local notes into Git-shareable versioned knowledge alongside repository changes.29 npm3MIT