
Citadel Mcp
io.github.sustinbebustin由 GitHub 帳號 sustinbebustin 發布v2.2.0更新於 Oct 24, 2026
A growing Citadel of stack-specific docs, served as MCP tools for AI coding agents.
概覽
一個本機 MCP 伺服器,透過單一的程式碼模式文件工具,為 AI 程式設計代理提供依技術棧整理的精选文件。
- 可以做什麼
- 查詢內建技術棧(例如 Next.js、React、Turborepo 與 Supabase)的文件索引,並依路徑取得指定文件的 markdown 內容。執行跨技術棧的 BM25 排序文件搜尋,可在一次呼叫中附帶 markdown 內容。在本機 Node 沙箱中執行代理撰寫的程式碼,呼叫各技術棧的文件函式,將多次抓取合併為一次往返。讀取執行階段提供的 MCP 資源,取得代理使用指南。
- 適用情境
- 適合程式設計代理在工作時需要準確、特定版本的框架與函式庫文件,並希望比每個文件來源一個工具更少的往返次數。若你願意 fork 並打包代理真正需要的內部或廠商文件,效果最佳。
- 執行需求
- 透過 npx 以 stdio 在本機執行,需要 Node.js v20.19 或更新的維護 LTS 版本,以及 npm 或 pnpm。未宣告驗證、環境變數或請求標頭。僅限桌面端,無法在網頁中執行。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Citadel Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Citadel MCP
A Code Mode MCP server that gives AI coding agents curated, per-stack documentation as typed tools.
Citadel is built to be forked and tailored. The hosted package ships with a small starter set of stacks, but the real value comes from packaging the docs your agents actually need. Each stack is a tiny module — adding one is mostly mechanical.
Getting Started
Requirements
- Node.js v20.19 or a newer latest maintenance LTS version
- npm or pnpm
Install with add-mcp
Install the MCP server for all your coding agents:
Add -y to skip the confirmation prompt and install to all detected agents already in use in the project directory. Add -g to install globally across all projects.
Manual installation
Add the following config to your MCP client:
[!NOTE] Using
citadel-mcp@latestensures that your MCP client will always use the latest version of the Citadel MCP server.
MCP Client Configuration
Amp
Using Amp CLI:
Or configure manually:
Follow Amp's MCP documentation and apply the standard configuration shown above.
Claude Code
Use the Claude Code CLI to add the Citadel MCP server:
Use -s project instead of -s user to scope the install to the current project. Restart Claude Code, then verify with claude mcp list. A working server advertises a single tool named docs.
Codex
Using Codex CLI:
Or configure manually:
Follow the MCP setup guide with the standard configuration format:
- Command:
npx - Arguments:
-y, citadel-mcp@latest
Cursor
Go to Cursor Settings -> MCP -> New MCP Server. Use the JSON config provided above.
Gemini
Using Gemini CLI:
Project-wide installation:
Global installation:
VS Code / Copilot
Using VS Code CLI:
Or configure manually:
Follow the official VS Code MCP server setup guide and add the Citadel server through VS Code settings.
Warp
Navigate to Settings | AI | Manage MCP Servers and select + Add to register a new MCP server with the following configuration:
- Name:
citadel - Command:
npx - Arguments:
-y, citadel-mcp@latest
What you get out of the box
The hosted package includes a starter set of stacks so you can try it immediately:
- Next.js (App Router, Next.js 16)
- React
- Turborepo
- Supabase guides
This list is intentionally small. For the best results, fork this repo and add the stacks your agents care about — your internal libraries, the framework version you actually use, or any docs site that publishes machine-readable markdown. See docs/adding-a-docs-tool.md.
How it works
Citadel is a Code Mode server: instead of advertising one tool per docs source, it advertises a single docs tool. The agent writes one async () => { ... } per turn that calls codemode.<stack>_docs(...) and codemode.<stack>_index() directly, and the server runs that code in a local Node sandbox. N doc fetches collapse into one round-trip.
Each stack contributes two callable tools to the sandbox SDK:
<stack>_index()— returns the doc index so the agent can pick a valid path<stack>_docs({ path })— fetches that specific doc as markdown
Citadel also exposes a cross-stack ranked search: codemode.docs_search({ query, stacks?, fetch: true }) returns BM25-ranked matches with markdown content attached in a single call.
Documentation
- Using Citadel as an AI agent — playbook for the
docstool, served at runtime as MCP resourcecitadel://docs/agent-usage. SDK reference, parallel fan-out, error handling, worked examples. - Adding a docs tool — package a new stack as
<stack>_index+<stack>_docs.
Local Development
To run the MCP server locally for development:
-
Clone the repository.
-
Install and build:
-
Configure your MCP client to use the local version:
Or with the Claude Code CLI:
For development with auto-reload, point the MCP client at tsx and the src entry instead:
License
MIT
來源:README.md,提交 d03c9cb
工具
0版本歷史
1- v2.2.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分