Sourcify returns three states, and the difference between a perfect and a partial match is exactly what you want to know before trusting source code you did not compile — partial means the source matches but the metadata does not line up. Getting that as a discrete value rather than prose is what makes this useful in an automated check. The batch tool is the one to reach for when auditing a set of addresses, since it saves a round trip per contract.
An MCP server over the Sourcify API, the decentralised repository of verified smart contract source code. It answers the three questions you have about an address on chain: is it verified, what is the source, and what is the ABI.
- `check-contract` takes a `chainId` and an `address` and returns the verification status as `perfect`, `partial` or `false`
- `get-contract-source` returns the full source, as an object keyed by file name
- `get-contract-metadata` returns the metadata, including compiler version, settings and the ABI
- `check-multiple-contracts` takes an array of addresses and returns a status for each, for checking a set in one call
- Every network Sourcify supports, addressed by chain ID — Ethereum mainnet is 1, Polygon 137, Arbitrum 42161, Optimism 10, BSC 56
- Error handling that distinguishes an invalid address, an unsupported chain, a network timeout and a contract Sourcify simply does not have
Node.js. Clone the repository, `npm install` and `npm run build`, then point the client at the built entry point. `SOURCIFY_API_URL` defaults to `https://sourcify.dev/server` and can be changed to a different instance. The package is `mcp-sourcify`, version 1.0.0. No API key is involved.
