tool-poisoning-scanner

v0.6.0
io.github.GuardBee/tool-poisoning-scanner Checked 1 day ago Published 1 month ago

Scans MCP tool definitions for hidden instructions and confused-deputy sinks

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

scan_text

Scan MCP server source (TypeScript/JavaScript, Python, Go) for tool poisoning (hidden instructions embedded in a tool's `description` string, read by the calling LLM as trusted context) and confused-deputy tools (a name/description promising read-only behavior while the handler has a shell/eval/file-write/env-dump sink).

ParameterTypeDescription
content *stringThe source code to scan
labelstringOptional label shown in findings (e.g. filename); its extension picks the language
languagestringSource language, when the label has no extension (default: typescript)

scan_file

Scan a single file for tool-poisoning and confused-deputy patterns in MCP tool registrations

ParameterTypeDescription
path *stringAbsolute or relative path to the file to scan

scan_directory

Recursively scan a directory of MCP server source for tool-poisoning and confused-deputy patterns

ParameterTypeDescription
path *stringAbsolute or relative path to the directory to scan
excludearraySkip files/dirs whose path contains one of these strings
includearrayOnly scan files whose path contains one of these strings
maxFilesintegerMaximum number of files to scan (default: 5000)

list_patterns

List every description-injection phrase and confused-deputy sink rule this scanner detects