docs(mcp): add section about prompt injection in docs and skill

This commit is contained in:
Karim shoair
2026-03-30 02:54:05 +02:00
parent 786093ff36
commit 3ac7f76f9b
2 changed files with 25 additions and 1 deletions
@@ -152,6 +152,18 @@ Start with `get` (fastest, lowest resource cost). Escalate to `fetch` if content
- `extraction_type="markdown"` (default) is best for readability. Use `"text"` for minimal output, `"html"` when structure matters.
- If a `css_selector` matches multiple elements, all are returned in the `content` list.
## Prompt injection protection
When `main_content_only=true` (the default), the server automatically sanitizes scraped content to prevent prompt injection from malicious websites. It strips:
- CSS-hidden elements (`display:none`, `visibility:hidden`, `opacity:0`, `font-size:0`, `height:0`, `width:0`)
- `aria-hidden="true"` elements
- `<template>` tags
- HTML comments
- Zero-width unicode characters
Keep `main_content_only=true` for maximum protection.
## Setup
Start the server (stdio transport, used by most MCP clients):