About contract-security-scanner
contract-security-scanner is an MCP server for heuristic smart-contract security scans, with security context focused on NEAR. It supports Solidity, Rust, and TypeScript and reports findings with severity, type, and line information.
Key features
- 01Scan Solidity, Rust, and TypeScript
- 02Detect five heuristic risk patterns
- 03Report severity, type, and line
- 04Provide security and NEAR-equivalent scores
- 05Offer NEAR-specific notes and recommendations
Use cases
- 01Review a contract for common security risks
- 02Compare security models by language
- 03Use a language-specific audit checklist
MCP support
Exposes `scan_contract`, `compare_security_models`, and `audit_checklist` tools to MCP clients. Scan results include vulnerability findings and NEAR-focused security context.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
3Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | |
| language | enum | Yes | rust | solidity | typescript |
Details
From the project READMEmcp-contract-security
MCP server for smart contract security scanning.
Implements the required tools:
scan_contractcompare_security_modelsaudit_checklist
Supports languages:
solidityrusttypescript
What it checks
scan_contract currently detects heuristic patterns for:
- Reentrancy
- Integer overflow/underflow risk
- Access control issues
- Front-running exposure
- Oracle manipulation risk
The output includes:
- vulnerability list with severity/type/line
security_scorenear_equivalent_score- NEAR-specific security notes and recommendation
Install
npm install -g mcp-contract-security
Published package:
- npm: https://www.npmjs.com/package/mcp-contract-security
- MCP Registry: https://registry.modelcontextprotocol.io/v0/servers/io.github.mastrophot%2Fcontract-security-scanner/versions/0.1.1
MCP config (Claude Desktop)
{
"mcpServers": {
"contract-security": {
"command": "mcp-contract-security"
}
}
}
Tool usage
scan_contract
Input:
{
"code": "contract source code here",
"language": "solidity"
}
compare_security_models
Input (optional):
{
"language": "solidity"
}
audit_checklist
Input (optional):
{
"language": "rust"
}
Local development
npm install
npm run check
Deliverable assets
Additional publish assets are prepared in deliverables/:
deliverables/mcp-registry-submission.mddeliverables/security-subreddit-posts.mddeliverables/blog-why-near-contracts-safer.mdserver.json(MCP Registry metadata, schema-validated)
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.