loading…
Search for a command to run...
loading…
Enables smart contract security auditing using Slither, Aderyn, and custom pattern analysis through the Model Context Protocol, allowing AI assistants to run st
Enables smart contract security auditing using Slither, Aderyn, and custom pattern analysis through the Model Context Protocol, allowing AI assistants to run static analysis and vulnerability checks on Solidity and Vyper contracts.
A Model Context Protocol (MCP) server for auditing smart contracts using industry-standard tools like Slither, Aderyn, and custom pattern analysis.
This MCP server provides a unified interface for running multiple smart contract security analysis tools through the Model Context Protocol. It enables AI assistants and other MCP clients to perform comprehensive security audits on Solidity and Vyper smart contracts.
Use Docker for a hassle-free setup with all audit tools pre-installed:
# Clone the repository
git clone https://github.com/italoag/farofino-mcp.git
cd farofino-mcp
# Build and run with Docker Compose
docker-compose build
docker-compose run --rm farofino-mcp
If you encounter network timeout errors during build, see DOCKER_NETWORK_TIMEOUT.md for quick fixes or use:
make build-retry # Automatically handles network issues
Advantages:
See DOCKER.md for detailed Docker setup and configuration.
pip install farofino-mcp
Or install locally from source:
git clone https://github.com/italoag/farofino-mcp.git
cd farofino-mcp
pip install -r requirements.txt
pip install -e .
The server works with various external audit tools. Install the ones you need:
Slither:
pip install slither-analyzer
Aderyn: (via Cyfrinup)
curl -LsSf https://raw.githubusercontent.com/Cyfrin/up/main/install | bash
CYFRINUP_ONLY_INSTALL=aderyn cyfrinup
You can check which tools are installed using the check_tools command.
# Using Docker Compose
docker-compose run --rm farofino-mcp
# Or with Docker directly
docker run -i --rm -v $(pwd)/contracts:/contracts:ro farofino-mcp:latest
See DOCKER.md for detailed Docker usage and configuration.
python3 -m farofino_mcp
Or if installed as a package:
farofino-mcp
Run Slither static analysis on a smart contract.
Parameters:
contract_path (required): Path to the contract file (.sol or .vy)detectors (optional): Comma-separated list of specific detectors to runexclude_detectors (optional): Comma-separated list of detectors to excludeExample: (replace /path/to/MyContract.sol with your actual file path)
{
"contract_path": "/path/to/MyContract.sol",
"detectors": "reentrancy-eth,unchecked-transfer"
}
Run Aderyn static analysis on a smart contract.
Parameters:
contract_path (required): Path to the contract file or project rootExample: (replace /path/to/MyContract.sol with your actual file path)
{
"contract_path": "/path/to/MyContract.sol"
}
Perform basic pattern-based security analysis.
Parameters:
contract_path (required): Path to the contract fileExample: (replace /path/to/MyContract.sol with your actual file path)
{
"contract_path": "/path/to/MyContract.sol"
}
Checks for:
selfdestruct usagedelegatecall usagetx.origin authenticationblock.timestamp manipulation risksRead and return the source code of a smart contract.
Parameters:
contract_path (required): Path to the contract fileExample: (replace /path/to/MyContract.sol with your actual file path)
{
"contract_path": "/path/to/MyContract.sol"
}
Check which audit tools are installed and available.
Parameters: None
Example:
{}
Returns a list of available and missing tools with installation instructions.
Add this to your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"farofino": {
"command": "docker",
"args": ["run", "-i", "--rm", "-v", "${PWD}/contracts:/contracts:ro", "farofino-mcp:latest"],
"cwd": "/path/to/farofino-mcp"
}
}
}
Notes:
/path/to/farofino-mcp with the absolute path to this repository on your host machine so Docker sees the right directory.${PWD} with %CD%.{
"mcpServers": {
"farofino": {
"command": "docker-compose",
"args": ["run", "--rm", "farofino-mcp"],
"cwd": "/path/to/farofino-mcp"
}
}
}
Tip: Replace /path/to/farofino-mcp with the absolute host path so docker-compose finds the repo configuration.
{
"mcpServers": {
"farofino": {
"command": "python3",
"args": ["-m", "farofino_mcp"],
"cwd": "/path/to/farofino-mcp"
}
}
}
Tip: Replace the cwd placeholder with the absolute directory where you installed farofino-mcp.
{
"mcpServers": {
"farofino": {
"command": "farofino-mcp"
}
}
}
For more Docker configuration options, see DOCKER.md.
Replace /path/to/contract.sol with the actual location of your Solidity file in the steps below.
Check available tools:
Use check_tools to see which audit tools are installed
Read the contract:
Use read_contract with contract_path="/path/to/contract.sol"
Run pattern analysis (always available):
Use pattern_analysis with contract_path="/path/to/contract.sol"
Run Slither analysis (if installed):
Use slither_audit with contract_path="/path/to/contract.sol"
Run additional tools as needed:
git clone https://github.com/italoag/farofino-mcp.git
cd farofino-mcp
pip install -r requirements.txt
pip install -e .
# Run directly from source
python3 -m farofino_mcp
# With debugging
python3 -u -m farofino_mcp
farofino-mcp/
├── farofino_mcp/
│ ├── __init__.py # Package initialization
│ └── __main__.py # Main server implementation
├── pyproject.toml # Python project configuration
├── requirements.txt # Python dependencies
├── setup.py # Setup configuration
├── Dockerfile # Docker configuration
└── README.md # This file
If you get errors about tools not being found:
check_tools command to see which tools are installedIf you get permission errors when running audit tools:
For large contracts or complex analysis:
exclude_detectors with Slither to skip certain checksApache-2.0
Contributions are welcome! Please feel free to submit issues or pull requests.
This tool is for educational and professional security auditing purposes. Always:
Выполни в терминале:
claude mcp add farofino-mcp-server -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.