Citadel MCP server
The Model Context Protocol lets your coding assistant call Citadel. It runs the analysis, receives each flaw with its file, line and fix, then edits the code and runs a new analysis to check.
Set up your assistant
Create a free account at citadelscan.com, then an API key in Console › CLI & IDE. A key acts on your behalf in one workspace; it is shown once and can be revoked at any time.
{
"mcpServers": {
"citadel": {
"command": "npx",
"args": ["-y", "citadelscan", "mcp"],
"env": { "CITADEL_API_KEY": "cit_..." }
}
}
}claude mcp add citadel -e CITADEL_API_KEY=cit_... -- npx -y citadelscan mcp{
"mcpServers": {
"citadel": {
"command": "npx",
"args": ["-y", "citadelscan", "mcp"],
"env": { "CITADEL_API_KEY": "cit_..." }
}
}
}{
"servers": {
"citadel": {
"type": "stdio",
"command": "npx",
"args": ["-y", "citadelscan", "mcp"],
"env": { "CITADEL_API_KEY": "cit_..." }
}
}
}Tools
| Tool | Parameters | Result |
|---|---|---|
| citadel_scan | path (folder, optional), project (name, optional) | The grade, then each open flaw with severity, file, line, problem, excerpt (secrets masked) and fix |
| citadel_scan_result | scanId | The same result for an analysis already run |
An analysis usually takes 1 to 3 minutes: the tool waits for the end before answering.
Example prompts
- “Analyse this project with Citadel and fix the critical flaws.”
- “Run Citadel, explain the most severe flaw and propose the fix before applying it.”
- “Check with Citadel that my Supabase migrations enable RLS.”
Safeguards
- Only a project folder can be analysed: never your home folder or a drive root, even if the assistant asks.
- The same upload rules as the CLI: .gitignore respected, credential files excluded outside git.
- The key stays in the MCP server’s local configuration; it is never passed to the assistant.
The free plan includes 10 analyses a month, CLI and MCP included, no card needed.
Nobody reads your code: it is analysed automatically in an isolated environment, then deleted. Code privacy