XSS Tester
STDIOMCP server for XSS vulnerability testing and security analysis with AI assistance
MCP server for XSS vulnerability testing and security analysis with AI assistance
For an explanation and POC of what this mcp server does, please visit my article on medium : Mypost. But globally, it's an MCP server for performing XSS tests with AI.
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/yourusername/xss-tester-mcp.git cd xss-tester-mcp
# Initialize uv project uv init # Install dependencies uv add mcp playwright fastmcp # Install Playwright browsers uv run playwright install chromium
uv pip list
Add the following to your MCP client configuration file:
{ "mcpServers": { "XSS tester": { "command": "uv", "args": [ "run", "--with", "mcp[cli]", "--with", "playwright", "mcp", "run", "/path/to/your/project/main.py" ] } } }
Start the MCP server in VSCode:
Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) Type "MCP: List Server" and select it Choose your XSS tester server from the list and run it
=> Go to chat, set AI as agent, and let's go
test_xss_urlTests a URL for XSS vulnerabilities by checking if JavaScript execution is triggered.
https://example.com/search?q=<script>alert(1)</script>)get_raw_html_responseFetches the raw HTML response from a URL using urllib.
search_in_html_responseSearches for specific content within HTML responses.
get_javascript_fileFetches JavaScript files for manual vulnerability analysis.
get_http_headersRetrieves HTTP response headers for security analysis.
make_custom_http_requestMakes HTTP requests with custom headers (authentication, cookies, sessions).
"Header1: Value1\nHeader2: Value2\nCookie: session=abc123"