Skip to content
Back to search

SecureMCP

SecureMCP is a security auditing tool designed to detect vulnerabilities and misconfigurations in applications using the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction). It proactively identifies threats like OAuth token leakage, prompt injection vulnerabilities, rogue MCP servers, and tool poisoning attacks.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/makalin--securemcp/badge.svg)](/listings/makalin--securemcp)

HTML

<a href="/listings/makalin--securemcp"><img src="/api/listings/makalin--securemcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Prerequisites

- Go 1.21+ - Docker (optional, for containerized deployment) - Node.js (for dashboard UI)

Installation

From Source

git clone https://github.com/makalin/SecureMCP.git
cd SecureMCP
make build

Using Docker

docker pull makalin/SecureMCP

Basic Usage

Command Line

# Basic scan
./securemcp scan --target https://your-mcp-server.com

# Scan with specific options
./securemcp scan --target https://your-mcp-server.com \
    --scan-oauth \
    --scan-prompt-injection \
    --scan-authentication \
    --timeout 30s

# Generate HTML report
./securemcp scan --target https://your-mcp-server.com --report html

# Generate JSON report
./securemcp scan --target https://your-mcp-server.com --report json

Programmatic Usage

import "github.com/makalin/SecureMCP/internal/scanner"

// Create scanner instance
scanner := scanner.NewScanner()

// Basic scan
results, err := scanner.Scan("https://your-mcp-server.com")

// Scan with options
options := &scanner.ScanOptions{
    ScanOAuth:           true,
    ScanPromptInjection: true,
    ScanAuthentication:  true,
    TestPrompt:          "your test prompt",
    Timeout:             30 * time.Second,
}
results, err := scanner.ScanWithOptions(target, options)

Report Generation

import "github.com/makalin/SecureMCP/internal/report"

// Create report generator
generator := report.NewReportGenerator("reports")

// Generate report
report, err := generator.GenerateReport(target, results)

// Save as HTML
err = generator.SaveReport(report, "html")

// Save as JSON
err = generator.SaveReport(report, "json")

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 235 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # SecureMCP
  2. **SecureMCP** is a comprehensive security auditing tool designed to detect vulnerabilities and misconfigurations in applications using the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction). It proactively identifies threats like OAuth token leakage, prompt injection vulnerabilities, rogue MCP servers, and tool poisoning attacks.
  3. ---
  4. ## 🛡️ Features
  5. ### OAuth Token Scanner
  6. - Token format validation and security checks
  7. - Expiration and scope analysis
  8. - Storage security assessment
  9. - Token endpoint validation
  10. - JWT token analysis
  11. ### Prompt Injection Tester
  12. - Multiple injection payload types
  13. - Various injection positions testing
  14. - Response analysis
  15. - System prompt override detection
  16. - Role confusion attack detection
  17. ### Authentication & Server Integrity Check
  18. - SSL/TLS configuration validation
  19. - Authentication method testing
  20. - Security header verification
  21. - Server security assessment
  22. - HSTS and CSP validation
  23. ### Report Generation
  24. - HTML and JSON report formats
  25. - Vulnerability classification
  26. - Severity assessment
  27. - Remediation suggestions
  28. - Summary statistics
  29. ---
  30. ## 👨‍💻 Who Should Use SecureMCP?
  31. - AI Developers integrating MCP in applications
  32. - Security teams securing AI model interactions
  33. - DevSecOps engineers embedding MCP in CI/CD pipelines
  34. - Researchers studying AI model vulnerabilities
  35. - Security auditors assessing MCP implementations
  36. ---
  37. ## 🚀 Getting Started
  38. ### Prerequisites
  39. - Go 1.21+
  40. - Docker (optional, for containerized deployment)
  41. - Node.js (for dashboard UI)
  42. ### Installation
  43. #### From Source
  44. ```bash
  45. git clone https://github.com/makalin/SecureMCP.git
  46. cd SecureMCP
  47. make build
  48. ```
  49. #### Using Docker
  50. ```bash
  51. docker pull makalin/SecureMCP
  52. ```
  53. ### Basic Usage
  54. #### Command Line
  55. ```bash
  56. # Basic scan
  57. ./securemcp scan --target https://your-mcp-server.com
  58. # Scan with specific options
  59. ./securemcp scan --target https://your-mcp-server.com \
  60. --scan-oauth \
  61. --scan-prompt-injection \
  62. --scan-authentication \
  63. --timeout 30s
  64. # Generate HTML report
  65. ./securemcp scan --target https://your-mcp-server.com --report html
  66. # Generate JSON report
  67. ./securemcp scan --target https://your-mcp-server.com --report json
  68. ```
  69. #### Programmatic Usage
  70. ```go
  71. import "github.com/makalin/SecureMCP/internal/scanner"
  72. // Create scanner instance
  73. scanner := scanner.NewScanner()
  74. // Basic scan
  75. results, err := scanner.Scan("https://your-mcp-server.com")
  76. // Scan with options
  77. options := &scanner.ScanOptions{
  78. ScanOAuth: true,
  79. ScanPromptInjection: true,
  80. ScanAuthentication: true,
  81. TestPrompt: "your test prompt",
  82. Timeout: 30 * time.Second,
  83. }
  84. results, err := scanner.ScanWithOptions(target, options)
  85. ```
  86. ### Report Generation
  87. ```go
  88. import "github.com/makalin/SecureMCP/internal/report"
  89. // Create report generator
  90. generator := report.NewReportGenerator("reports")
  91. // Generate report
  92. report, err := generator.GenerateReport(target, results)
  93. // Save as HTML
  94. err = generator.SaveReport(report, "html")
  95. // Save as JSON
  96. err = generator.SaveReport(report, "json")
  97. ```
  98. ---
  99. ## 📊 Example Output
  100. ### Command Line
  101. ```bash
  102. $ ./securemcp scan --target https://example-mcp-server.com
  103. [+] Scanning Target: https://example-mcp-server.com
  104. [!] Token storage vulnerability detected
  105. [!] Prompt Injection vulnerability found in tool 'AutoSummary'
  106. [!] Insecure authentication method detected
  107. [+] Report saved to /reports/scan_2024_03_14_15_30_45.html
  108. ```
  109. ### HTML Report
  110. The HTML report includes:
  111. - Summary statistics
  112. - Vulnerability details
  113. - Severity levels
  114. - Remediation suggestions
  115. - Scan metadata
  116. ### JSON Report
  117. ```json
  118. {
  119. "target": "https://example-mcp-server.com",
  120. "scan_time": "2024-03-14T15:30:45Z",
  121. "vulnerabilities": [
  122. {
  123. "type": "OAuth Token Vulnerability",
  124. "severity": "high",
  125. "description": "Token storage vulnerability detected",
  126. "location": "https://example-mcp-server.com",
  127. "remediation": "Implement secure token storage and proper token validation"
  128. }
  129. ],
  130. "summary": {
  131. "total_vulnerabilities": 3,
  132. "critical_count": 0,
  133. "high_count": 1,
  134. "medium_count": 1,
  135. "low_count": 1
  136. }
  137. }
  138. ```
  139. ---
  140. ## 🛠️ Development
  141. ### Project Structure
  142. ```
  143. SecureMCP/
  144. ├── cmd/
  145. │ └── securemcp/ # Command-line interface
  146. ├── internal/
  147. │ ├── scanner/ # Core scanning functionality
  148. │ │ ├── oauth.go # OAuth token scanning
  149. │ │ ├── prompt.go # Prompt injection testing
  150. │ │ ├── auth.go # Authentication checks
  151. │ │ └── scanner.go # Main scanner implementation
  152. │ └── report/ # Report generation
  153. ├── config/ # Configuration management
  154. ├── Dockerfile # Container configuration
  155. └── Makefile # Build and development tasks
  156. ```
  157. ### Building
  158. ```bash
  159. # Build binary
  160. make build
  161. # Run tests
  162. make test
  163. # Build Docker image
  164. make docker-build
  165. # Run in Docker
  166. make docker-run
  167. ```
  168. ---
  169. ## 📢 Contributing
  170. Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
  171. 1. Fork the repository
  172. 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
  173. 3. Commit your changes (`git commit -m 'Add amazing feature'`)
  174. 4. Push to the branch (`git push origin feature/amazing-feature`)
  175. 5. Open a Pull Request
  176. ---
  177. ## 🚀 License
  178. [MIT License](LICENSE)
  179. ---
  180. ## 🌐 Links
  181. - [GitHub Issues](https://github.com/makalin/SecureMCP/issues)
  182. - [MCP Specification](https://modelcontextprotocol.io/introduction)
  183. - [Documentation](https://github.com/makalin/SecureMCP/wiki)
  184. ---
  185. Protect your MCP applications before they get exploited. 💪 **Use SecureMCP!**

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.