check-contractLABSCO SUMMARY
The perfect-versus-partial distinction is the answer, not a footnote.
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.
What it is
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.
What you get
check-contracttakes achainIdand anaddressand returns the verification status asperfect,partialorfalseget-contract-sourcereturns the full source, as an object keyed by file nameget-contract-metadatareturns the metadata, including compiler version, settings and the ABIcheck-multiple-contractstakes 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
Requirements
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.
Setup effort
Build from source — git clone https://github.com/soyrubio/mcp-sourcify
USE CASES
Deciding whether to trust a contract's published source
Check the verification status first and read whether the match is perfect or only partial.
Reading the code behind an address
Pull the verified source files by chain ID and address instead of hunting through an explorer.
Getting the ABI to call a contract
Read the metadata for the ABI and the compiler settings it was built with.
Auditing a list of addresses
Check them all in one call rather than one request per contract.
4 tools
Listed in project docs. Your client may show a different list.
get-contract-sourceget-contract-metadatacheck-multiple-contractsBEFORE YOU INSTALL
What to know first
Tools you get
4 tools named in the project's documentation.
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
# Clone the repository
git clone https://github.com/soyrubio/mcp-sourcify
cd mcp-sourcify
# Install dependencies
npm install
# Build the project
npm run buildMCP Clients
Claude Desktop
{
"mcpServers": {
"sourcify": {
"command": "node",
"args": [
"<YOUR_PATH_TO_MCP_SOURCIFY>/dist/index.js"
]
}
}
}