A Model Context Protocol server that turns Claude Code / Cline into a focused Solidity mentor by aggregating key Ethereum learning resources.
- Node.js 18+
- npm 9+ (ships with Node 18)
- Internet access to fetch documentation sources on first run
git clone <your-fork-or-repo-url> solidity-mcp
cd solidity-mcp
npm installCopy the sample environment file and adjust values when needed:
cp .env.example .envKey settings:
CACHE_DIR– where on-disk caches live (./data/cacheby default)CACHE_TTL– cache lifetime in milliseconds (default 24h)MAX_CONCURRENT_REQUESTS/RATE_LIMIT_DELAY– tune scraper politeness
npm run build # compile TypeScript to dist/
npm start # launch the compiled MCP serverFor rapid iteration you can use:
npm run dev # runs src/index.ts via tsx with live reloadnpm run test # exercises scrapers and service plumbing (requires network access)Update your Cline configuration (e.g. ~/.cline/config.json) with the new server:
{
"mcp": {
"servers": {
"solidity-mcp": {
"command": "node",
"args": ["/absolute/path/to/solidity-mcp/dist/index.js"],
"cwd": "/absolute/path/to/solidity-mcp",
"env": {
"CACHE_DIR": "/absolute/path/to/solidity-mcp/data/cache",
"LOG_LEVEL": "info"
}
}
}
}
}Be sure to replace /absolute/path/to/solidity-mcp with the actual location on your machine.
- Use
search_solidity_knowledge_basefor hybrid results. The server now blends an indexed catalog with live scraper lookups, so even fuzzy queries tend to surface something useful. - Combine
get_solidity_code_examplesandget_solidity_referencewhen explaining a new concept. - Run
get_source_overviewto audit which collections are cached, see type breakdowns, and spot high-signal tags before diving deeper. - Run
refresh_content_cacheif upstream docs have changed or results feel stale.
npm run build
npm startAfter making code changes, rebuild and restart the MCP server before reconnecting from Cline.
Need help? Check solidity-mcp-setup.md for a more in-depth walkthrough.