@securecode-ai/mcp 0.5.6 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,12 @@ Standalone MCP (Model Context Protocol) server for SecureCode AI. Provides secur
|
|
|
8
8
|
npm install -g @securecode-ai/mcp
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
Or use directly with npx (no install needed):
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @securecode-ai/mcp scan src/app.ts
|
|
15
|
+
```
|
|
16
|
+
|
|
11
17
|
## Quick Start
|
|
12
18
|
|
|
13
19
|
```bash
|
|
@@ -61,6 +67,22 @@ securecode-mcp scan src/app.ts --json
|
|
|
61
67
|
|
|
62
68
|
### Cursor / Windsurf
|
|
63
69
|
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"mcpServers": {
|
|
73
|
+
"securecode": {
|
|
74
|
+
"command": "npx",
|
|
75
|
+
"args": ["-y", "@securecode-ai/mcp@latest", "serve", "--workspace", "/path/to/your/project"],
|
|
76
|
+
"env": {
|
|
77
|
+
"SECURECODE_API_TOKEN": "your-api-token-here"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Or if installed globally:
|
|
85
|
+
|
|
64
86
|
```json
|
|
65
87
|
{
|
|
66
88
|
"mcpServers": {
|
|
@@ -78,14 +100,14 @@ securecode-mcp scan src/app.ts --json
|
|
|
78
100
|
claude mcp add securecode -s user -- securecode-mcp serve --workspace /path/to/your/project
|
|
79
101
|
```
|
|
80
102
|
|
|
81
|
-
## Tools (
|
|
103
|
+
## Tools (16)
|
|
82
104
|
|
|
83
105
|
### Scanning
|
|
84
106
|
|
|
85
107
|
| Tool | Description | Approval |
|
|
86
108
|
|------|-------------|----------|
|
|
87
109
|
| `securecode.scan` | Scan code for vulnerabilities (AI pipeline) | No |
|
|
88
|
-
| `securecode.agent-scan` | Agent-mode deep scan with
|
|
110
|
+
| `securecode.agent-scan` | Agent-mode deep scan with 20+ tools, structured proof, and sandbox verification | No |
|
|
89
111
|
| `securecode.scan-batch` | Scan multiple files in one call | No |
|
|
90
112
|
| `securecode.scan-secrets` | Scan for hardcoded secrets and PII (local, no AI) | No |
|
|
91
113
|
| `securecode.scan-dependencies` | Scan lockfiles for known vulnerabilities (OSV/NVD) | No |
|
|
@@ -94,7 +116,7 @@ claude mcp add securecode -s user -- securecode-mcp serve --workspace /path/to/y
|
|
|
94
116
|
|
|
95
117
|
| Tool | Description | Approval |
|
|
96
118
|
|------|-------------|----------|
|
|
97
|
-
| `securecode.map` |
|
|
119
|
+
| `securecode.map` | Build project map: endpoints, middleware, auth, architecture context | No |
|
|
98
120
|
|
|
99
121
|
### Fixes & Testing
|
|
100
122
|
|
|
@@ -102,6 +124,7 @@ claude mcp add securecode -s user -- securecode-mcp serve --workspace /path/to/y
|
|
|
102
124
|
|------|-------------|----------|
|
|
103
125
|
| `securecode.fix` | Generate a patch for a specific finding | Yes |
|
|
104
126
|
| `securecode.attack` | Endpoint red-team testing (beta) | Yes |
|
|
127
|
+
| `securecode.run-tests` | Run tests in sandbox for verification | Yes |
|
|
105
128
|
|
|
106
129
|
### Agent Memory (FP Learning)
|
|
107
130
|
|
|
@@ -112,6 +135,14 @@ claude mcp add securecode -s user -- securecode-mcp serve --workspace /path/to/y
|
|
|
112
135
|
| `securecode.clear-agent-memory` | Clear all agent memory (or one FP by ID) | No |
|
|
113
136
|
| `securecode.add-known-fact` | Add a project fact for faster investigations | No |
|
|
114
137
|
|
|
138
|
+
### Finding Review
|
|
139
|
+
|
|
140
|
+
| Tool | Description | Approval |
|
|
141
|
+
|------|-------------|----------|
|
|
142
|
+
| `securecode.review-findings` | Review the finding queue for a workspace | No |
|
|
143
|
+
| `securecode.decide-finding` | Accept or reject a finding in the review queue | No |
|
|
144
|
+
| `securecode.clear-finding-reviews` | Clear all finding reviews for a workspace | No |
|
|
145
|
+
|
|
115
146
|
### How Agent Memory Works
|
|
116
147
|
|
|
117
148
|
When the agent reports a false positive, dismiss it with `record-false-positive`. The agent stores the pattern in `.securecode/agent-memory.json` and will not report similar patterns in future scans of that workspace.
|
|
@@ -125,17 +156,25 @@ Memory is per-workspace, user-owned, and deletable. No cross-tenant leakage.
|
|
|
125
156
|
|
|
126
157
|
## Agent Scan Architecture
|
|
127
158
|
|
|
128
|
-
The agent scan (`securecode.agent-scan`) is an AI investigator that:
|
|
159
|
+
The agent scan (`securecode.agent-scan`) is an AI security investigator that:
|
|
160
|
+
|
|
161
|
+
1. **Maps** the project architecture (architecture scout with trust boundaries, security controls, risks)
|
|
162
|
+
2. **Reads** the target file and related files across the codebase
|
|
163
|
+
3. **Traces** data flows (taint tracking, cross-file flow with structured source→sink→hop chains)
|
|
164
|
+
4. **Checks** guards, endpoint policies, and configuration
|
|
165
|
+
5. **Verifies** threat model applicability and capability reachability
|
|
166
|
+
6. **Self-critiques** before reporting (selfCritique field)
|
|
167
|
+
7. **Gets reviewed** by an independent critique LLM
|
|
168
|
+
8. **Proves** findings in a sandbox (PROVEN/UNPROVEN)
|
|
169
|
+
9. **Generates fixes** for proven findings
|
|
129
170
|
|
|
130
|
-
|
|
131
|
-
2. **Traces** data flows (taint tracking, cross-file)
|
|
132
|
-
3. **Checks** guards and endpoint policies
|
|
133
|
-
4. **Self-critiques** before reporting (selfCritique field)
|
|
134
|
-
5. **Gets reviewed** by an independent critique LLM
|
|
135
|
-
6. **Proves** findings in a sandbox (PROVEN/UNPROVEN)
|
|
136
|
-
7. **Generates fixes** for proven findings
|
|
171
|
+
Agent tools (20+): `read_file`, `search_code`, `trace_flow`, `trace_flow_cross_file`, `check_guard`, `check_policy`, `get_endpoints`, `list_imports`, `list_files`, `call_graph`, `git_blame`, `git_history`, `git_diff`, `check_dependencies`, `read_config`, `find_definition`, `find_references`, `find_tests`, `run_tests`, `finish`.
|
|
137
172
|
|
|
138
|
-
|
|
173
|
+
The deterministic control plane enforces proof quality:
|
|
174
|
+
- Every finding requires source, reachability, control, threat-model, and impact evidence
|
|
175
|
+
- Unproven concerns become investigation notes, not findings
|
|
176
|
+
- Architecture risks expand across related files (callers, implementations, sinks)
|
|
177
|
+
- The finish gate rejects finish while proof requirements remain unsatisfied
|
|
139
178
|
|
|
140
179
|
Languages: JavaScript, TypeScript, Python (partial).
|
|
141
180
|
|
|
@@ -145,6 +184,7 @@ Languages: JavaScript, TypeScript, Python (partial).
|
|
|
145
184
|
|----------|---------|-------------|
|
|
146
185
|
| `SECURECODE_API_TOKEN` | — | API token (alternative to login) |
|
|
147
186
|
| `SECURECODE_API_URL` | `https://api.usesecurecode.tech` | API base URL |
|
|
187
|
+
| `SECURECODE_ATTACK_ENABLED` | — | Set to `1` to enable the attack tool |
|
|
148
188
|
|
|
149
189
|
## Security
|
|
150
190
|
|
package/package.json
CHANGED