MCP Sourcify Server
About
Verify and retrieve smart contract source code using the Sourcify API.
Details
- Author
- soyrubio
- Categories
- Developer Tools, Other
Jump to
Setup
Install MCP Sourcify Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/soyrubio/mcp-sourcify
Follow the installation instructions in the repository README, then restart your MCP client.
A Model Context Protocol (MCP) server that provides tools for interacting with the Sourcify API to verify and retrieve smart contract source code.
This MCP server enables LLMs to interact with Sourcify, a decentralized repository of verified smart contract source code. It provides tools to check contract verification status, retrieve source code, and access contract metadata across multiple blockchain networks.
- Check Contract Verification: Verify if a contract is registered on Sourcify
- Get Contract Source: Retrieve the complete source code of verified contracts
- Get Contract Metadata: Access compiler settings and ABI information
- Batch Verification: Check multiple contracts in a single request
# Clone the repository git clone <repository-url> cd mcp-sourcify # Install dependencies npm install # Build the project npm run build
The server can be configured using environment variables:
- SOURCIFY_API_URL: The Sourcify API endpoint (default:https://sourcify.dev/server)
- PORT: Server port (default: 3000) - Note: This is not used in stdio mode
Add the following to your Claude Desktop configuration file:
macOS:~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:%APPDATA%\Claude\claude_desktop_config.json
{ "mcpServers": { "sourcify": { "command": "node", "args": ["/path/to/mcp-sourcify/dist/index.js"] } } }
Install the MCP extension for VS Code and add the server configuration to your workspace settings.
# Run in development mode npm run dev # Or run the built version npm start
Check if a contract is verified on Sourcify.
- chainId(number): The blockchain chain ID
- address(string): The contract address to check
Returns:Verification status (perfect,partial, orfalse)
Retrieve the source code of a verified contract.
- chainId(number): The blockchain chain ID
- address(string): The contract address
Returns:Object with file names as keys and source code as values
Get the metadata of a verified contract including compiler settings and ABI.
- chainId(number): The blockchain chain ID
- address(string): The contract address
Returns:Contract metadata including compiler version, ABI, and settings
Check verification status for multiple contracts at once.
- chainId(number): The blockchain chain ID
- addresses(array): Array of contract addresses to check
Once configured, you can use natural language to interact with Sourcify through your MCP-enabled client:
"Check if contract 0x1234... on Ethereum mainnet (chain 1) is verified on Sourcify" "Get the source code for contract 0x5678... on Polygon (chain 137)" "Show me the ABI for contract 0xabcd... on Arbitrum (chain 42161)"
This server supports all networks that are supported by Sourcify. Common chain IDs include:
- Ethereum Mainnet: 1
- Goerli: 5
- Polygon: 137
- Arbitrum: 42161
- Optimism: 10
- BSC: 56
For a complete list, visitSourcify's supported chains.
# Watch mode for development npm run watch # Build the project npm run build # Run type checking tsc --noEmit
The server includes comprehensive error handling for:
- Invalid contract addresses
- Unsupported chain IDs
- Network timeouts
- Contracts not found in Sourcify
Contributions are welcome! Please submit pull requests or open issues for any improvements or bug fixes.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Read/write to over 2k blockchains, enabling data querying, contract analysis/deployment, and transaction execution, powered by Thirdweb.
Server-side EVM wallet for Ai agents. Send transactions, manage tokens, and interact with smart contracts across multiple chains.
Interact with Aptos documentation and create full-stack Aptos blockchain applications.
A MCP server for interacting with Aptos NPM packages.
A server for blockchain interactions, offering Ethereum vanity address generation, 4byte lookup, ABI encoding, and multi-chain RPC calls.
Automatically integrate the Divvi referral SDK into JavaScript and TypeScript blockchain applications.
A comprehensive toolkit for Ethereum blockchain analysis directly within Claude AI.
A set of tools for interacting with the Flow blockchain through the Model Context Protocol.
Analyzes smart contract source code on the Monad blockchain for functionality and security.
A toolkit for building and deploying AI agents with blockchain capabilities, featuring a Model Context Protocol (MCP) server.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





