mastrophot avatar

Contract Security Scanner

mastrophot/near-mcp-contract-security

Brings smart contract security scanning into Claude with heuristic analysis for Solidity, Rust, and TypeScript contracts. Exposes three tools: scan_contract checks for reentrancy, integer overflow, access control flaws, front-running vectors, and oracle manipulation risks, returning a vulnerability list with severity ratings and line numbers. compare_security_models and audit_checklist generate language-specific security guidance. The scanner includes NEAR-specific context, scoring contracts against NEAR's security model and providing cross-chain migration recommendations. Install globally via npm and point Claude Desktop at the mcp-contract-security command. Useful when reviewing contract code during development or audits, especially if you're evaluating patterns across EVM and NEAR ecosystems.

tools
3
transport
STDIO
last updated
Mar 16, 2026

Tools

3 tools

Public tool metadata for what this MCP can expose to an agent.

scan_contractScans contract source code for heuristic security patterns such as reentrancy, integer overflow/underflow risk, access control issues, front-running exposure, and oracle manipulation risk.

Scans contract source code for heuristic security patterns such as reentrancy, integer overflow/underflow risk, access control issues, front-running exposure, and oracle manipulation risk.

No parameter schema in public metadata yet.

compare_security_modelsCompares security models for the given language (optional input).

Compares security models for the given language (optional input).

No parameter schema in public metadata yet.

audit_checklistReturns an audit checklist for the given language (optional input).

Returns an audit checklist for the given language (optional input).

No parameter schema in public metadata yet.

Sponsors

Readme

mcp-contract-security

MCP server for smart contract security scanning.

Implements the required tools:

  • scan_contract
  • compare_security_models
  • audit_checklist

Supports languages:

  • solidity
  • rust
  • typescript

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_score
  • near_equivalent_score
  • NEAR-specific security notes and recommendation

Install

npm install -g mcp-contract-security

Published package:

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):


View the full README on GitHub

Details

Repository
github.com/mastrophot/near-mcp-contract-security
Category
Security & Pentesting
Package
mcp-contract-security
Transport
STDIO
Registry
MCP registry, active

More from mastrophot

Related Security & Pentesting MCP servers

View all
1viridis-security avatarInjection Detectorviridis-security/mcp-services-sdkFormally-verified injection/exfiltration detector for AI agents (MCP-02).0stars
2weiseer avatarcve-cacheweiseer/cve-cache-mcpRecent CVE + GHSA cache for AI agents auditing dependencies (npm/PyPI/Cargo/Maven/Go).0stars
3shrike-security avatarShrikeshrike-security/shrike-mcpGoverns what AI agents do: tool calls, SQL, commands, files checked against policy before they run.2stars
4promptguardhq avatarPromptGuardpromptguardhq/promptguardScan prompts for injection attacks, redact PII, and audit LLM SDK usage from any MCP client0stars
5egoughnour avatarCode Firewall Mcpegoughnour/code-firewall-mcpStructural similarity-based code filter. Stops malicious code pattern reaching execution tools.0stars
6kloudle avatarKloudle Cloud Security Scannerio.github.kloudle/cloud-security-scannerAWS cloud security scanners for AI agents — S3, IAM, EC2, EKS, RDS, CloudTrail, CloudWatch Logs0stars