Skip to main content
Glama

provekit-mcp

A hardened MCP server that gives an AI agent a code security scanner, built so the tools themselves cannot be turned against the host. It ships with its own red-team suite that spawns the real server and attacks it over the protocol, and proves every trust boundary holds.

An MCP tool is a function a model can call with arguments it chose, sometimes while reading untrusted content. So the interesting question about an MCP server is not "what can it do" but "what happens when someone points it at ../../../../etc/passwd." This one is built to answer that question out loud.

python -m provekit_mcp.server        # run the server (stdio)
python -m redteam.run                # attack it and print the verdict
pytest -q                            # 97 tests, incl. the live red-team

Two tools, both built for a hostile caller

Tool

What it does

Why it's safe

scan_code(code, filename)

Scans a snippet the agent already has in hand for leaked secrets and insecure patterns (OWASP Top 10).

No filesystem access at all, so there is no path to traverse. filename is reduced to a bare label and never read. Input size is bounded.

scan_path(path)

Scans a source file, but only inside a configured workspace root.

Every path goes through guard.safe_resolve first: absolute paths, .. traversal, null bytes, and symlink escapes are all refused before a single byte is read.

scan_code run on AI-generated Python: leaked Stripe key, os.system command injection, pickle deserialization, requests verify=False, MD5, each mapped to OWASP

Related MCP server: agentguard

The threat model (this is the point)

An MCP server hands an autonomous model a set of tools. The model may be acting on content it just fetched from the web, an issue comment, a file it read, any of which can carry an instruction the model wasn't supposed to follow. So the server has to assume every argument is attacker-controlled. The trust boundaries provekit-mcp defends:

  1. Path confinement. A file tool must never read outside the workspace it was given. The classic breakouts, ../ traversal, an absolute /etc/passwd, a null byte to truncate an extension check, and a symlink inside the root pointing out of it, are each closed and each has a test.

  2. Resource bounds. A single tool call must not be a way to exhaust host memory or CPU. Per-call input is capped; oversized calls are refused in milliseconds, not after allocating.

  3. No catastrophic backtracking. The scanner's rules are all bounded regexes. A 40,000-character pathological line scans in single-digit milliseconds, so a crafted argument can't hang the server (ReDoS).

  4. Arguments are inert data. A malicious string passed as code is scanned as text, never executed. The scanner reads it, flags the eval / os.system in it, and moves on.

  5. Refusals don't leak. A rejected call returns a structured { "ok": false, "code": "escape", ... }, never a stack trace, never a partial read.

Defense in depth: guard.safe_resolve is the primary path control, and the MCP SDK's own ResourceSecurity(reject_path_traversal, reject_absolute_paths, reject_null_bytes) is enabled as an independent second layer. Neither is trusted to be the only thing standing between a tool call and the filesystem.

The red-team suite

python -m redteam.run doesn't test the functions in-process, it spawns the actual server as a subprocess and speaks MCP to it (initializetools/listtools/call), firing each attack the way a hostile client would. Every response is triaged into one of five honest outcomes:

  • HELD — an attack was correctly refused

  • BREACH — an attack succeeded (critical)

  • OK — a legitimate call worked

  • REGRESSION — a legitimate call was wrongly refused (over-blocking is a real failure; a scanner nobody can use is worthless)

  • INCONCLUSIVE — no usable answer

That last outcome is the discipline that matters. A cold start, a hang, or a garbled frame is never scored as "secure." The run is only clean when there are zero breaches, zero regressions, and zero inconclusive results, every control actually verified, not assumed.

red-team report: 9 attacks held, 0 breaches, 3 controls OK, 0 regressions, 0 inconclusive, verdict all controls held and verified

attacks held: 9   breaches: 0   controls OK: 3   regressions: 0   inconclusive: 0
VERDICT: ALL CONTROLS HELD AND VERIFIED

Attacks currently in the suite: path traversal, deep traversal, absolute path, symlink escape, null-byte truncation, binary-file read, 6 MB resource exhaustion, a ReDoS pathological line, and an argument-as-code injection, plus two control calls that prove the guards don't over-block. The machine-readable result is written to assets/redteam-report.json.

What the scanner catches

The engine is a Python port of provekit, kept rule-for-rule compatible on the shared detectors and extended with Python-specific vulnerabilities (since that's where the work is).

OWASP

Examples

A07 / A02 — Leaked secrets

AWS / GitHub / Stripe / OpenAI / Anthropic keys, private-key blocks, DB URLs with inline credentials, hard-coded passwords

A03 — Injection

eval / new Function, os.system built from an f-string, shell commands via interpolation, subprocess(..., shell=True), SQL by concatenation, innerHTML

A08 — Insecure deserialization

pickle.loads, yaml.load without SafeLoader

A02 — Broken crypto / transport

requests(..., verify=False), rejectUnauthorized: false, MD5/SHA1 for passwords, Math.random()/random for tokens

A10 — SSRF

user-controlled input reaching a server-side HTTP request

A05 — Misconfiguration

wildcard CORS, debug=True

It is built to be precise, because a scanner that cries wolf is a scanner you switch off. It skips parameterized SQL, env-var reads, bcrypt/argon hashes, yaml.safe_load, and placeholder values; it stays quiet in test/ and fixture files on the insecure things test code does on purpose, while still catching a real key anywhere. And it never silently skips a long line, a secret hidden behind a wall of padding is still caught, and a line genuinely too long to scan safely is reported (line-too-long), never dropped.

Install and wire it into Claude

git clone https://github.com/Th3Circle-app/provekit-mcp && cd provekit-mcp
python -m venv .venv && source .venv/bin/activate
pip install .          # installs the `provekit-mcp` entrypoint

For development, you can also run it straight from the repo without installing:

pip install mcp>=2.0
python -m provekit_mcp.server        # run from the repo root
pytest -q                            # 97 tests, incl. the live red-team

Add it to Claude Desktop / Claude Code (claude_desktop_config.json), pointing the workspace root at the repo you want scannable, see claude_desktop_config.example.json:

{
  "mcpServers": {
    "provekit": {
      "command": "python",
      "args": ["-m", "provekit_mcp.server"],
      "env": { "PROVEKIT_MCP_ROOT": "/absolute/path/to/your/repo" }
    }
  }
}

Now your agent can call scan_code before it ships a snippet, or scan_path to check a file, and the server guarantees it can only ever read inside that one root.

Layout

provekit_mcp/
  scanner.py   # the detection engine: bounded rules, no silent skips, ReDoS-safe
  guard.py     # the trust-boundary guards: safe_resolve, size + binary limits
  server.py    # the MCP server; tool logic lives in plain functions the tests call
redteam/
  engine.py    # HELD / BREACH / OK / REGRESSION / INCONCLUSIVE triage
  run.py       # spawns the real server over stdio and attacks it
tests/         # 97 tests: scanner correctness, the guards, the tools, the live red-team

Design notes worth reading the code for

  • The tool logic is not inside the @app.tool decorators. do_scan_code / do_scan_path are plain module functions; the MCP wrappers are three lines each. This means the tests and the red-team exercise exactly what ships over the wire, not a parallel copy.

  • safe_resolve uses realpath + a trailing-separator containment check. realpath collapses .. and follows symlinks, so a link out of the tree resolves to its true location and fails containment. The trailing os.sep on the prefix check prevents the /a/b vs /a/bc false pass.

  • Inconclusive ≠ secure. Carried over from redteam-loop: the earlier version once scored a cold-start HTTP None as a pass. It doesn't anymore, here or there.

Who's behind it

Built by Harrison C. Songolo. Companion projects: provekit (the scanner as a zero-dep CLI + CI gate), redteam-loop (attack → propose fix → re-fire the exact exploit to prove it's closed), and security-assessments (SSRFs found, fixed, and disclosed in open-source tools).

MIT.

Available Tools

2 tools
scan_codeA

Scan a snippet of code for leaked secrets and insecure patterns (OWASP Top 10). Returns findings sorted by severity. No filesystem access. filename is an optional label used for reporting.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
filenameNosnippet.txt

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of disclosure. It discloses a key behavioral trait: 'No filesystem access', and explains the output behavior ('Returns findings sorted by severity') and the role of the filename parameter. It does not mention potential side effects, but for a scan tool, the absence of filesystem access implies a safe, read-only operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three concise sentences, each earning its place: purpose, output, and key limitation/parameter clarification. It is front-loaded with the main verb and resource, and contains no unnecessary words or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter tool with no output schema and no annotations, the description provides the core information: what it does, what it returns (findings sorted by severity), and a key limitation (no filesystem access). The missing detail is the structure of findings, but the description is otherwise sufficient for an agent to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description must compensate. It adds meaning to 'filename' explicitly as 'an optional label used for reporting', but for 'code' it relies on the overall tool description ('Scan a snippet of code') to infer its purpose. This partial compensation is helpful but incomplete, especially for the required 'code' parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action and scope: 'Scan a snippet of code for leaked secrets and insecure patterns (OWASP Top 10).' It also mentions returning findings sorted by severity, giving a complete picture. This distinguishes it from sibling tools by focusing on 'snippet' and explicitly stating 'No filesystem access', which contrasts with scan_path.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for code snippets and excludes filesystem scanning via 'No filesystem access', but it does not explicitly name alternatives or say 'use scan_path for filesystem scanning'. The guidance is implicit rather than explicit, so it does not fully meet the 'when-to-use vs alternatives' criterion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_pathA

Scan a single source file for leaked secrets and insecure patterns. path must be relative to the server's workspace root; paths that escape the workspace are refused.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses that paths must be relative to the workspace root and that escaping paths are refused, which is valuable. However, it does not explicitly state that the operation is read-only, nor describe the output or error behavior beyond path rejection.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with the main action, followed by a critical constraint. Every sentence earns its place with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple single-file scan tool with one parameter and no output schema, the description covers the essential purpose and the key path constraint. It could additionally mention typical output format or error cases, but overall it is sufficiently complete for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema only lists 'path' as a string, but the description enriches it by specifying it must be relative to the workspace root and that escaping paths are refused. This gives the parameter meaning beyond the raw schema, compensating for the 0% schema description coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool scans a single source file for leaked secrets and insecure patterns. The verb 'scan' and specific resource 'single source file' make the purpose distinct, especially against the sibling scan_code.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for scanning a specific file, but does not explicitly compare to scan_code or state when to prefer one over the other. There are no exclusions beyond the path constraint, which is more a security limitation than a usage guideline.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.9/5.0
Disambiguation4/5

The two tools are clearly distinguished by their input type: scan_code takes a code snippet, while scan_path takes a file path. Though both perform similar security scanning, the descriptions make the boundary unambiguous, so an agent should rarely misselect.

Naming Consistency5/5

Both tools follow a consistent 'scan_<target>' pattern with snake_case, making the naming predictable and intuitive. The verb-noun structure is uniform and there are no stylistic deviations.

Tool Count3/5

With only two tools, the server feels thin for a security scanning purpose. The count is borderline—not egregiously small, but it offers only the most basic scanning operations and lacks the breadth one might expect.

Completeness2/5

The server only supports scanning a snippet or a single file, with no ability to scan directories, repositories, or multiple files at once. This is a significant gap for a security scanner, as users would likely need batch or recursive scanning to be practical.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Agent-native "safe to ship?" security gate for AI-generated code. Uses real parsers and inter-rocedural taint analysis (JS/TS, Python, Go) to flag the classes AI coding agents get wrong — secrets, SQL injection, SS, SSRF, path traversal, command injection, weak JWT/CORS — and ranks findings by confidence. Exposes a scan tool over MCP.
    1
    10
    2
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables scanning of AI agent code for security vulnerabilities such as prompt injection, tool abuse, and data exfiltration, directly from MCP-compatible clients like Claude Code.
    1
    LGPL 3.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Security scanner for AI agent skills, providing tools to scan skill files for threats such as credential theft and prompt injection.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides local, dependency-free security scanning tools for LLM configurations, prompts, RAG sources, and more, enabling AI coding agents to detect prompt injections and other vulnerabilities without external network access.
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Th3Circle-app/provekit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server