
Project Knowledge Mcp
io.github.batook22由 GitHub 帳號 batook22 發布v1.0.6更新於 Oct 24, 2026
Cross-project knowledge graph for MCP — map features across mobile, backend, and admin codebases.
概覽
保存跨專案的知識圖譜,讓助理能追蹤某項功能在行動端、後端與管理後台程式庫之間的流動。
- 可以做什麼
- 這個本機 MCP 伺服器以 JSON 知識圖譜保存已註冊的專案、功能工作流程與跨專案型別對應。工具可註冊與掃描專案、把功能定義為有序步驟、搜尋功能/端點/檔案/畫面、依檔案路徑反向查找引用、取得含影響分析的步驟脈絡、建議與檢查型別對應、瀏覽目錄樹,以及驗證已登錄路徑是否仍存在。每次異動後圖譜會自動儲存,並可提交到版本控制。
- 適用情境
- 當一項功能橫跨多個獨立程式庫(例如 React Native 應用、NestJS 後端與 Next.js 管理後台),而助理在修改、除錯或測試前需要全端脈絡時適用。單一儲存庫的專案用處不大。
- 執行需求
- 需要 Node.js 18 以上與 npm 9 以上(或 pnpm/yarn);透過 npx 或開發相依套件以 stdio 在本機執行。需要相容於 MCP 的用戶端。設定透過 --knowledge-file 與專案路徑等命令列參數完成;不需要環境變數、API 金鑰或帳號。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Project Knowledge Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Project Knowledge MCP Server
A cross-project knowledge graph for the Model Context Protocol (MCP). Map features across mobile, backend, and admin codebases so your AI agent has full-stack context when testing, writing code, debugging, or adding features.
Quick Start
Then add to your MCP settings:
Table of Contents
- Overview
- Features
- Prerequisites
- Installation & Configuration
- Knowledge File Management
- Tools Reference
- Usage Walkthrough
- Security
- Contributing
- License
Overview
The Problem
When working on a project with multiple codebases — for example, a React Native mobile app, a NestJS backend, and a Next.js admin panel — the AI agent has no awareness of how a single feature flows across all three. This leads to incomplete context, missed dependencies, and breaking changes that could have been caught earlier.
The Solution
This MCP server stores a knowledge graph of your features, mapping each workflow step to the relevant screens, endpoints, controllers, and files in every project. The AI agent can then query this graph to understand end-to-end feature flows, detect cross-project impacts before editing files, and keep type definitions synchronized across codebases.
Features
- Multi-project awareness — register any number of projects (mobile, backend, admin, etc.)
- Feature workflow mapping — define features as ordered steps across all projects
- Auto-scanning — discover NestJS endpoints, Next.js pages, and React Native screens automatically
- Full-text search — search across features, endpoints, files, and screens
- Cross-reference lookup — given a file path, find which features reference it
- Rich context — retrieve all endpoints, screens, and files for a feature at a specific workflow step
- Breaking change detection — before editing a file, see which other projects will be affected
- Type/schema synchronization — map equivalent types across projects (e.g.,
ProductCreateDto↔ProductFormSchema) - Architecture exploration — browse any project's directory tree with keyword filtering and content highlighting
- Health validation — verify that all registered file paths still exist; auto-detect stale entries
- Persistent knowledge — auto-saves to a JSON file after every mutation; can be git-tracked and shared
- 100% dynamic — all configuration via CLI arguments and runtime tools; no source code edits required
Prerequisites
- Node.js >= 18
- npm >= 9 (or pnpm / yarn equivalent)
- An MCP-compatible client (e.g., VS Code with Cline, any AI-powered IDE)
Installation & Configuration
Install from npm (recommended)
Or run directly without installing:
Build from Source
CLI Flags
All configuration is provided via CLI arguments. No environment variables or configuration files are required.
MCP Client Configuration
Basic setup — register projects at runtime via tools:
Bootstrap setup — pre-register projects at startup:
Knowledge File Management
The knowledge file is a plain JSON file that stores all registered projects, feature workflows, and type mappings. Understanding where it lives is essential for maintaining a consistent knowledge graph.
The Shared File Pattern
If your fullstack projects live in separate directories (e.g., backend/, mobile/, admin/), each IDE window starts the MCP server from a different working directory. Without --knowledge-file, each instance creates its own fragment:
This defeats the purpose of cross-project awareness. Always use --knowledge-file with an absolute path to point all IDE windows to the same file:
Use the same --knowledge-file path in every IDE window, regardless of which sub-project you have open. All instances read and write to the same file, keeping the knowledge graph complete and consistent.
When the Default Is Safe
The default path (no --knowledge-file) is only safe when you open the monorepo root — the single directory containing all sub-projects:
If your projects are in separate repositories or directories, always use --knowledge-file.
Sharing with Your Team
Since the knowledge file is plain JSON, you can commit it to version control and share it with your team:
Guideline: One fullstack project = one knowledge file. Use
--knowledge-filewith an absolute path whenever your projects live in separate directories.
Tools Reference
Project Management
Feature Management
Search & Query
Type/Schema Synchronization
Architecture Exploration
Validation
Persistence
Usage Walkthrough
This walkthrough demonstrates the core workflow using a real multi-project setup (NestJS backend, React Native mobile, Next.js admin panel). Domain names have been anonymized — "products" instead of "stations", "orders" instead of "reports" — but every command shown was run against actual projects.
Step 1: Register Projects
Step 2: Scan Projects
Discover endpoints, screens, and pages automatically:
The scanners discover 150+ endpoints, 200+ screens, and multiple admin pages across all registered projects.
Step 3: Define a Feature
Register an auth feature — a straightforward flow that touches all three projects:
Step 4: Query Features
Compact mode — get a summary:
Returns: 5 steps, 5 test scenarios, mobile=5 screens, backend=5 endpoints, admin=1 page.
Verbose mode — get full workflow details:
Returns all 5 steps with full mobile screens, backend endpoints, controllers, and file paths.
With health check — verify all registered paths exist:
Returns: Health: 5/5 backend ok, mobile=5/5, admin=1/5, 5 test scenarios.
Step 5: Search and Cross-Reference
Search across the knowledge graph:
Returns 100+ results across features, workflow steps, backend mappings, mobile mappings, type mappings, and file contents.
Find cross-project references to a file:
Returns:
- Feature associations: Which features reference this file (steps 1–5 of the auth feature)
- Graph-registered: 5 exact matches (steps 1–5 of the auth feature, all backend), plus the admin Login page
- Scan-discovered: All files across all projects that import or reference
auth.controller.ts
Step 6: Type Mappings
Register a cross-project type mapping:
Check what references a type before changing it:
Returns all files across all projects that define or reference productId.
Auto-discover potential type mappings:
Scans all registered projects and finds exact type name matches — returns suggestions with source and target file paths ready to register.
Step 7: Validate and Export
Validate knowledge health:
Checks all registered file paths across all features and type mappings. Returns a report of existing and missing entries.
Confirm persistence:
The knowledge graph is auto-persisted after every mutation — register_project, register_feature, register_type_mappings, and validate_knowledge with fix=true all write to disk immediately. Use export_knowledge to confirm the file path before committing to version control:
Returns the path to the knowledge file. Git-track this file to share context with your team.
Security
- Knowledge file is plain JSON — you control where it is stored and who has access
- No credentials stored — this MCP only stores project paths and feature mappings
- File scanning is read-only — scanners only read files, never modify them
Contributing
Contributions are welcome. Please open an issue or pull request for any improvements, bug fixes, or feature requests.
License
來源:README.md,提交 5930c5c
工具
0版本歷史
1- v1.0.6最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分