Get up and running with Mythril's MCP server in 5 minutes!
# Clone the repository (if you haven't already)
git clone https://github.com/avaloki108/mythril2.0.git
cd mythril2.0
# Install Mythril with MCP support
pip install -e .
# Verify installation
mythril2-mcp-server --help-
Find your config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
Add Mythril configuration:
{ "mcpServers": { "mythril2": { "command": "mythril2-mcp-server", "args": [] } } } -
Restart Claude Desktop
- Install the Cline extension in VS Code
- Open Cline settings
- Add to MCP settings:
{ "mcpServers": { "mythril2": { "command": "mythril2-mcp-server" } } } - Reload VS Code
Once configured, you can interact with Mythril through natural language!
Analyze this Solidity contract for security vulnerabilities:
pragma solidity ^0.8.0;
contract Example {
address public owner;
constructor() {
owner = msg.sender;
}
function destroy() public {
selfdestruct(payable(msg.sender));
}
}
The AI will use Mythril to analyze the contract and report any vulnerabilities.
What does this bytecode do?
0x608060405234801561001057600080fd5b50600080546001600160a01b0319163317905560d1806100316000396000f3fe
The AI will disassemble it into readable assembly.
What security detectors are available in Mythril?
The AI will list all available security analysis modules.
✨ Smart Contract Analysis
- Detects 20+ types of vulnerabilities
- Reentrancy, integer overflow, unprotected functions, and more
- Works with Solidity source code or EVM bytecode
🔍 Bytecode Disassembly
- Convert bytecode to readable assembly
- Understand what contracts really do
📋 Security Insights
- Detailed vulnerability reports
- Severity classifications
- Remediation guidance
Analyze this contract with deeper analysis:
- max_depth: 256
- execution_timeout: 3600
- strategy: bfs
[paste contract code]
Analyze the contract at address 0x1234...5678 on Ethereum mainnet
If the command isn't found, use the full path:
# Find the path
which mythril2-mcp-server
# Use in config
{
"command": "/full/path/to/mythril2-mcp-server"
}If analysis is taking too long, try:
- Reduce max_depth (e.g., 64 or 128)
- Increase timeout
- Simplify the contract
On Unix systems:
chmod +x $(which mythril2-mcp-server)- 📖 Read README-MCP.md for detailed documentation
- 📚 Check MCP_INTEGRATION.md for comprehensive guide
- 💡 Explore examples/ for more configurations
- 🧪 Try the examples in examples/usage_examples.md
- Issues: GitHub Issues
- Discord: Join ConsenSys Discord
- Docs: Mythril Documentation
MIT License - See LICENSE file
Ready to analyze some smart contracts? Start asking your AI assistant! 🚀