GitHub Contracts Extractor
March 12, 2025 ยท View on GitHub
A simple tool to extract Solidity contracts from GitHub repositories.
Requirements
- Python 3.13 or higher
- uv - Python package manager
- Claude Desktop app
Installation
- Clone the repository:
git clone [repository-url]
cd [repository-name]
- Create a virtual environment and install dependencies:
uv venv
source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
uv pip install -e .
Setting Up with Claude Desktop
-
Download the latest Claude Desktop application
-
Configure MCP server by editing the Claude Desktop configuration:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
- Add the following configuration (replace
Usernamewith your actual username):
{
"mcpServers": {
"github_contracts": {
"command": "/Users/Username/.local/bin/uv",
"args": [
"--directory",
"/Users/Username/mcp-demo",
"run",
"/Users/Username/mcp-demo/github_contracts.py"
]
}
}
}
- Restart Claude Desktop
Usage
Using with Claude Desktop
After completing the setup, you can analyze smart contracts from GitHub repositories by simply typing:
audit smart contracts in the link
You can provide a GitHub repository URL, and Claude will extract and analyze the Solidity contracts.
Project Structure
github_contracts.py- Main application for extracting Solidity contractspyproject.toml- Project configuration and dependencies
License
[Specify license information here]