Citadel Mcp

io.github.sustinbebustinPublished by GitHub account sustinbebustinv2.2.0Updated Oct 24, 2026

A growing Citadel of stack-specific docs, served as MCP tools for AI coding agents.

VerifiedSTDIODesktop onlyKnowledge & MemoryDeveloper Tools

Overview

AI-generated overview

A local MCP server that gives AI coding agents curated, per-stack documentation through a single code-mode docs tool.

What you can do
Look up documentation indexes for bundled stacks such as Next.js, React, Turborepo and Supabase, and fetch a specific doc as markdown by path. Run cross-stack BM25-ranked documentation search, optionally returning markdown content in one call. Execute agent-written code in a local Node sandbox that calls the stack doc functions, collapsing many fetches into one round-trip. Read a runtime MCP resource with an agent usage playbook.
When to use it
Useful when a coding agent needs accurate, version-specific framework and library documentation while working, and you want fewer round-trips than one tool per docs source. Best if you are willing to fork it and package the internal or vendor docs your agents actually need.
Requirements
Runs locally over stdio via npx, requiring Node.js v20.19 or a newer maintenance LTS release and npm or pnpm. No authentication, environment variables or headers are declared. Desktop only; not web executable.
Before you install
The server runs agent-written code in a local Node sandbox, so review what the agent executes. The hosted package ships only a small starter set of stacks; broader coverage means forking and adding your own docs. Pinning to the latest version means the client always pulls the newest release.

Installation

In SourceWeft

  1. Open Citadel Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Citadel MCP

[npm citadel-mcp package]

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

Install with add-mcp

Install the MCP server for all your coding agents:

bash
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:

json
{  "mcpServers": {    "citadel": {      "command": "npx",      "args": ["-y", "citadel-mcp@latest"]    }  }}

[!NOTE] Using citadel-mcp@latest ensures that your MCP client will always use the latest version of the Citadel MCP server.

MCP Client Configuration

Amp

Using Amp CLI:

bash
amp mcp add citadel -- npx citadel-mcp@latest

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:

bash
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.

Codex

Using Codex CLI:

bash
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
Cursor

Go to Cursor Settings -> MCP -> New MCP Server. Use the JSON config provided above.

Gemini

Using Gemini CLI:

Project-wide installation:

bash
gemini mcp add citadel npx citadel-mcp@latest

Global installation:

bash
gemini mcp add -s user citadel npx citadel-mcp@latest
VS Code / Copilot

Using VS Code CLI:

bash
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.

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 docs tool, served at runtime as MCP resource citadel://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:

  1. Clone the repository.

  2. Install and build:

    bash
    pnpm installpnpm build
  3. Configure your MCP client to use the local version:

    json
    {  "mcpServers": {    "citadel-dev": {      "command": "node",      "args": ["/absolute/path/to/citadel-mcp/dist/index.js"]    }  }}

    Or with the Claude Code CLI:

    bash
    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:

bash
claude mcp add -s user citadel-dev -- npx tsx /absolute/path/to/citadel-mcp/src/index.ts

License

MIT

Source: README.md at commit d03c9cb

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v2.2.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts