npm citadel-mcpstdioMITupdated 4mo ago
A Code Mode MCP server that gives AI coding agents curated, per-stack documentation as typed tools.
What can you do with citadel mcp?
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:
npx add-mcp citadel-mcp@latest
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:
{
"mcpServers": {
"citadel": {
"command": "npx",
"args": ["-y", "citadel-mcp@latest"]
}
}
}
[!NOTE] Using
citadel-mcp@latestensures that your MCP client will always use the latest version of the Citadel MCP server.
MCP Client Configuration
Using Amp CLI:
amp mcp add citadel -- npx citadel-mcp@latest
Or configure manually:
Follow Amp's MCP documentation and apply the standard configuration shown above.
Use the Claude Code CLI to add the Citadel MCP server:
claude mcp add -s user citadel -- npx -y citadel-mcp@latest
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.
Using Codex CLI:
codex mcp add citadel -- npx citadel-mcp@latest
Or configure manually:
Follow the MCP setup guide with the standard configuration format:
- Command:
npx - Arguments:
-y, citadel-mcp@latest
Go to Cursor Settings -> MCP -> New MCP Server. Use the JSON config provided above.
Using Gemini CLI:
Project-wide installation:
gemini mcp add citadel npx citadel-mcp@latest
Global installation:
gemini mcp add -s user citadel npx citadel-mcp@latest
Using VS Code CLI:
code --add-mcp '{"name":"citadel","command":"npx","args":["-y","citadel-mcp@latest"]}'
Or configure manually:
Follow the official VS Code MCP server setup guide and add the Citadel server through VS Code settings.
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:
pnpm install pnpm build -
Configure your MCP client to use the local version:
{ "mcpServers": { "citadel-dev": { "command": "node", "args": ["/absolute/path/to/citadel-mcp/dist/index.js"] } } }Or with the Claude Code CLI:
claude mcp add -s user citadel-dev -- node /absolute/path/to/citadel-mcp/dist/index.js
For development with auto-reload, point the MCP client at tsx and the src entry instead:
claude mcp add -s user citadel-dev -- npx tsx /absolute/path/to/citadel-mcp/src/index.ts
License
MIT
Install
Add citadel mcp to your client. Pick the one you use.
claude mcp add citadel-mcp -- npx -y citadel-mcpcodex mcp add citadel-mcp -- npx -y citadel-mcpamp mcp add citadel-mcp -- npx -y citadel-mcp{
"mcpServers": {
"citadel-mcp": {
"command": "npx",
"args": [
"-y",
"citadel-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"citadel-mcp": {
"command": "npx",
"args": [
"-y",
"citadel-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"citadel-mcp","command":"npx","args":["-y","citadel-mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"citadel-mcp": {
"command": "npx",
"args": [
"-y",
"citadel-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"citadel-mcp": {
"command": "npx",
"args": [
"-y",
"citadel-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"citadel-mcp": {
"command": "npx",
"args": [
"-y",
"citadel-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"citadel-mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"citadel-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"citadel-mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"citadel-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y citadel-mcpRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance19/25
- Trust13/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 114 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Version history
| Versions | Published |
|---|---|
| 2.2.0Latest | May 10, 2026 |
| 2.1.0 | May 10, 2026 |
| 2.0.1 | May 4, 2026 |
| 2.0.0 | May 4, 2026 |
| 1.0.1 | May 3, 2026 |