Klarion MCP Server
Secret scanning for AI agents: rules and entropy find candidates, a model decides which are real.
Klarion scores 62 (Good), licensed MIT and written in Go. It installs as a local process. It does not declare tools yet. Filed under Version control, AI and memory. GitHub shows 12 stars. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
62 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade C
60/100 for listing completeness. Lost points: no listed tools, short summary, no docs link.
How quality is graded
Where the 62 comes from
22 + 15 + 4 + 10 + 4 + 7 = 62. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 15 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 4 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 7 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "0x1adi-klarion": { "command": "npx", "args": [ "-y", "https://github.com/0x1Adi/Klarion/releases/download/v0.4.3/klarion-mcp-v0.4.3.mcpb" ], "env": { "ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
ANTHROPIC_API_KEYSecret | Optional | Optional. With a key Klarion adjudicates candidates itself; without one it hands them to the calling agent to judge. |
Tools
All capabilitiesTools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.
About
Install · Use it · Results · How it works · Reference
Klarion finds secrets in your code: API keys, passwords and tokens.
It works in two steps:
- Find. Fast local checks flag anything that looks like a secret.
- Check. An AI model reads each one with the code around it and decides if it is real.
Pattern scanners stop at step 1, so they also flag test values, IDs and hashes. Klarion shows you the real leaks.
It runs where the leak happens
A Claude Code hook that blocks the write before the file exists. The agent cannot route around it, not through the file tools and not through Bash.

$ klarion scan .
services/billing/client.py
[critical] stripe-secret-key 39:18 sk_l****4bQx
verdict: secret (confidence 0.96)
| stripe.api_key = "sk_l****4bQx"
Summary: 1 finding(s) across 1 file(s), 198 suppressed [1204 files scanned in 612ms]
Install
macOS:
brew install 0x1Adi/tap/klarion
Anywhere else, with Go 1.25 or newer:
go install github.com/0x1Adi/Klarion/cmd/klarion@latest
Or download a binary from the releases page.
Klarion needs an AI model. Pick one:
| Model | Setup |
|---|---|
| Anthropic (default) | export ANTHROPIC_API_KEY=... |
| OpenAI or compatible | export OPENAI_API_KEY=... and set provider = "openai" |
| Local model, nothing leaves your machine | Run Ollama and set provider = "ollama" |
| Your Claude Code login | Set provider = "claude-cli" |
Settings go in .klarion.toml under [ai]. All options are in the reference.
Use it
| What you want | How |
|---|---|
| Scan a folder | klarion scan . |
| Block commits that add a secret | klarion protect |
| Block commits with the pre-commit framework | The .pre-commit-config.yaml below |
| Stop Claude Code from writing a secret | /plugin marketplace add 0x1Adi/Klarion, /plugin install klarion@klarion, then restart Claude Code |
| Stop Cline, Cursor or any MCP agent from writing a secret | The MCP server below |
| Fail pull requests that add a secret | The GitHub Action below |
| Start on a repo that already has findings | klarion baseline create, so only new secrets fail |
# .github/workflows/secrets.yml
name: secret-scan
on: [push, pull_request]
jobs:
klarion:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: 0x1Adi/Klarion@v0.4.3
with:
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
On a pull request it scans only what the PR adds. It caches the AI answers, so unchanged code
costs nothing. Findings show in the job log. On a private repo without GitHub Code Security,
add upload-sarif: "false" to skip the Security tab upload. GitLab CI and every option are in
the reference.
# .pre-commit-config.yaml
repos:
- repo: https://github.com/0x1Adi/Klarion
rev: v0.4.3
hooks:
- id: klarion
stages: [pre-commit]
Without the stages line the hook is off and runs only when you ask for it, with
pre-commit run --hook-stage manual klarion. The klarion hook builds Klarion with Go the
first time it runs; use id: klarion-system if klarion is already installed. Everyone who
commits needs a model set up.
// ~/.cline/mcp.json, or the MCP settings of any other client
{
"mcpServers": {
"klarion": {
"command": "klarion",
"args": ["mcp"]
}
}
}
The agent calls scan_text before it writes code and scan_file before it commits. Approve
each call rather than auto-approving the server: scan_file reads any path it is given. With no
model configured the server hands each candidate and its decision rules to that agent to judge,
so it needs no API key. Configure one and Klarion judges instead. Full steps, including the
tools and how to verify the install: llms-install.md.
Results
Klarion found about 1.7× more real secrets than gitleaks, and 89% of its alerts were real (gitleaks: 91%).
We tested Klarion v0.3.0 on CredData: 337 real open source repos where Samsung labeled the lines that hold secrets. These numbers cover code outside test folders.
| Klarion | gitleaks | detect-secrets | |
|---|---|---|---|
| Real secrets found | 35% | 21% | 35% |
| Alerts that were real | 89% | 91% | 34% |
| False alarms on flask and rails | 9 | 33 | 247 |
Good to know:
- Klarion skips test fixtures and docs examples on purpose. CredData counts those as real. Counted that way, Klarion found 9% and gitleaks 46%.
- Klarion's numbers come from a sample of 612 AI checks with one model (Claude Haiku). The likely range is 30 to 40% found and 82 to 97% real.
- CredData's labels came from what other scanners found, which helps those scanners.
Full method and data: benchmark/REPORT.md.
How it works
- Step 1 runs on your machine. It looks for known key formats,
password = valuestyle lines, credential files like.pgpass, and secrets hidden in base64 or hex. It also checks how random a string looks. - Step 2 asks the model. Each candidate goes out with a few lines of code. The model answers secret, false positive or uncertain. Uncertain counts as a secret.
- You can see what was hidden. Run
klarion scan . --show-suppressed. - Your code goes only to the model you pick. Set
send_secret = falseto send a masked value instead. It is less accurate.
Limits
- It needs a model. Without one,
klarion scanand the commit hooks stop with an error. The Claude Code hook still blocks provider keys such as AWS, GitHub and Stripe, and the MCP server hands the candidates and its rules to your agent to judge. - No API key? A hosted judge with no setup is coming. Join the list.
- The model can be wrong. Check what it hid with
--show-suppressed. - It finds secrets, it does not fix them. Rotate any secret it finds.
- Local hooks can be skipped with
git commit --no-verify. Run Klarion in CI too, with the Action. The pre-commit hook checks staged changes only, so in CI it has nothing to check.
More
Reference · Benchmark · Design · Changelog · Contributing · Security
MIT © The Klarion Authors
Frequently asked questions
What is Klarion MCP Server?
Secret scanning for AI agents: rules and entropy find candidates, a model decides which are real.
How do I install Klarion MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Klarion MCP Server runs locally from the MCP bundle https://github.com/0x1Adi/Klarion/releases/download/v0.4.3/klarion-mcp-v0.4.3.mcpb with the command npx -y https://github.com/0x1Adi/Klarion/releases/download/v0.4.3/klarion-mcp-v0.4.3.mcpb.
Is Klarion MCP Server free and open source?
Yes. Klarion MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does Klarion MCP Server support remote (HTTP) connections?
No remote endpoint is listed for Klarion MCP Server. It runs locally on your machine over stdio, started by your MCP client.
How is Klarion MCP Server's trust score calculated?
Klarion MCP Server scores 62 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.
