I Built an MCP Tool That Scans Smart Contracts for Security Risks

TL;DR: I deployed a contract security scanner on Base L2, then wrapped it as an MCP server so any AI assistant (Claude, Cursor, Cline) can scan contracts on demand. Free, open, permissionless. The ...

By · · 1 min read
I Built an MCP Tool That Scans Smart Contracts for Security Risks

Source: DEV Community

TL;DR: I deployed a contract security scanner on Base L2, then wrapped it as an MCP server so any AI assistant (Claude, Cursor, Cline) can scan contracts on demand. Free, open, permissionless. The problem Before interacting with a smart contract — approving a token, depositing in a DeFi protocol, buying an NFT — you should check if it's safe. But most devs just... don't. It's too slow to manually check Etherscan, read the ABI, look for rug patterns. I wanted to make this a one-liner inside my AI assistant. What I built An MCP (Model Context Protocol) server that exposes a contract scanner as a tool. Once installed, you just ask: "Is this token safe to buy? 0x4ed4e862860bed51a9570b96d89af5e1b0efefed" And your AI assistant calls the tool automatically and returns: ## 🟡 Risk Score: 30/100 — MEDIUM Contract: 0x4ed4e862... Name: DEGEN Age: 412 days Source verified: ✅ Yes ### 🟠 HIGH (1) - mint(address,uint256): Selector 0x40c10f19 found in bytecode ### ✅ GOOD (3) - Source code verified - E