Remote MCP Scanner
A comprehensive security scanner for remote MCP (Model Context Protocol) servers that tests for OAuth dynamic client registration vulnerabilities.
Features
- OAuth Well-Known Endpoint Discovery - Automatically discovers OAuth authorization server configurations
- Dynamic Client Registration Testing - Tests OAuth client registration endpoints for security issues
- Comprehensive XSS Testing - Tests both
redirect_uriandwebsite_urifields with 60+ XSS payloads - Manual Testing URLs - Generates ready-to-use URLs for manual vulnerability verification
- Colorized Output - Easy-to-read colored console output with clear vulnerability reporting
- Multiple Attack Vectors - JavaScript, Data URIs, HTML injection, encoding bypasses, and more
Installation
From PyPI (Recommended)
pip install remote-mcp-scanner
From Source
git clone https://github.com/novasecuritynz/remote-mcp-scanner
cd remote-mcp-scanner
pip install -e .
Usage
Command Line
# Basic scan
mcp-scanner https://mcp-server.example.com
# Verbose output
mcp-scanner https://mcp-server.example.com --verbose
# Alternative command name
remote-mcp-scanner https://mcp-server.example.com
Python API
from remote_mcp_scanner import run_scan
# Run a scan programmatically
oauth_configs = run_scan("https://mcp-server.example.com", verbose=True)
print(f"Found OAuth configs: {oauth_configs}")
What It Tests
1. OAuth Well-Known Endpoints
/.well-known/oauth-protected-resource/.well-known/oauth-authorization-server- Tests both full MCP path and base domain
2. Dynamic Client Registration
- Tests client registration with standard OAuth payload
- Verifies registration endpoint accessibility
- Captures client credentials for further testing
3. Redirect URI Validation
Tests 40+ attack vectors including:
- JavaScript Execution:
javascript:alert('XSS') - Data URIs:
data:text/html,<script>alert('XSS')</script> - Protocol Bypasses: VBScript, File, FTP protocols
- Domain Confusion: Authority bypasses, subdomain tricks
- Encoding Bypasses: URL encoding, HTML entities, null bytes
4. Website URI XSS Testing
Tests 60+ attack vectors including:
- Advanced JavaScript: Function constructors, bracket notation
- HTML Injection: Event handlers, form actions, meta redirects
- Template Injection: Multiple template engine syntaxes
- Polyglot Payloads: Multi-context XSS vectors
- CSS Injection: Expression-based attacks
Output Example
🔗 REDIRECT_URI XSS MANUAL TESTING:
📋 INSTRUCTIONS: Complete the full OAuth flow to test XSS:
1. Click the URL below in your browser
2. Complete any login/authorization steps
3. Watch for JavaScript execution during redirect
4. Check browser console and network tabs for XSS
🚨 REDIRECT_URI XSS Test (JavaScript schema XSS):
Client ID: abc123
Payload: javascript://domain.com/%0aalert(1);//
Test URL: https://oauth.example.com/authorize?response_type=code&client_id=abc123&redirect_uri=javascript%3A//domain.com/%250aalert%281%29%3B//&state=xss_test_redirect
=== REDIRECT URI VALIDATION SUMMARY ===
🚨 XSS RISKS FOUND:
• javascript://domain.com/%0aalert(1);// - JavaScript schema XSS
→ These redirect URIs can lead to XSS attacks!
📊 Total bypasses found: 5/40
Security Features
- Defensive Purpose Only - Designed for legitimate security testing
- Comprehensive Reporting - Detailed vulnerability categorization
- Manual Verification - Provides URLs for manual testing confirmation
- Professional Output - Clear, actionable security findings
Requirements
- Python 3.8+
- httpx
- click
- beautifulsoup4
License
MIT License - see LICENSE file for details.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Disclaimer
This tool is intended for authorized security testing only. Users are responsible for ensuring they have proper permission before testing any systems.
Support
- Issues: GitHub Issues
- Email: info@novasecurity.co.nz
- Website: Nova Security
Metadata
Release files for remote-mcp-scanner 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| remote_mcp_scanner-1.0.0.tar.gz | 14.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| remote_mcp_scanner-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.7 kB
Release files / remote_mcp_scanner-1.0.0.tar.gz
| Download URL | remote_mcp_scanner-1.0.0.tar.gz |
|---|---|
| Size | 14.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d803280092416e96f28ae7339e6ee03c21e8c1a4d59b22b79d1ad890d75b325a
|
|
BLAKE2b-256 checksum How to use checksums |
db542a96f0efa11abf3cd6ed4f8506744e84c8dcb2ef591f280b8dfa9638a7bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / remote_mcp_scanner-1.0.0-py3-none-any.whl
| Download URL | remote_mcp_scanner-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf15d11e18db5fbe56c0d8fbf4026d14cfabd3c0c9f8607f6906a2d191853b7a
|
|
BLAKE2b-256 checksum How to use checksums |
84a6c8a502250914a65e4505abff9c1eef2506958fa36340e346d9301a7fa548
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for remote-mcp-scanner 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.