LLMs get more accurate Solidity analysis and lower token usage with Slither-MCP
Integrating Slither-MCP with LLMs improves the correctness of Solidity-related prompts and reduces token consumption.
Security & privacy Trail of Bits 15 Nov 2025 Tooling Prototype evidence
Published as “Level up your Solidity LLM tooling with Slither-MCP”
Why it matters
If the claimed benefits hold, developers can build more reliable and cost-effective LLM-assisted Solidity auditing tools.
Summary
The authors released Slither-MCP, a server that wraps Slither’s static analysis and exposes it via the Model Context Protocol. By calling simple MCP methods, an LLM can retrieve function source code, callers, inheritance information, and run Slither detectors without using grep or read_file. The writeup claims this reduces token usage and raises the chance that a prompt is answered correctly. No empirical evaluation is provided, only qualitative arguments.
What they found 2
- Slither-MCP reduces token use and increases prompt correctness for LLMs.
“it reduces token use and increases the probability a prompt is answered correctly.”
- LLMs no longer need to rely on grep or read_file for Solidity navigation when using Slither-MCP.
“When an LLM uses Slither-MCP, it no longer has to rely on rudimentary tools like grep and read_file to identify where certain functions are implemented, who a function’s callers are, and other complex, error-prone tasks.”
Caveats 3
- The AGPLv3 license requires publishing the full source code of your application if you use it in a web service or SaaS product, which may limit adoption.
- This license requires publishing the full source code of your application if you use it in a web service or SaaS product.
- For now, Slither-MCP exposes a subset of Slither’s analysis engine that we believe LLMs would have the most benefit consuming.
What’s new here 4
- A Model Context Protocol (MCP) server that makes Slither’s static analysis callable by LLMs.
- APIs such as get_function_source, callers/callees, inheritance queries, and detector filtering.
- Support for common Solidity project layouts (Foundry, Hardhat, etc.).
- Dual-licensing option to avoid AGPLv3 restrictions for commercial SaaS use.